vmm: Add HTTP API to resize the VM

Currently only increasing the number of vCPUs is supported but in the
future it will be extended.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford
2019-11-26 16:46:10 +00:00
parent e7d4eae527
commit 86339b4cb4
6 changed files with 117 additions and 3 deletions
+8
View File
@@ -649,6 +649,14 @@ impl Vm {
Ok(())
}
pub fn resize(&mut self, desired_vcpus: u8) -> Result<()> {
self.cpu_manager
.lock()
.unwrap()
.resize(desired_vcpus)
.map_err(Error::CpuManager)
}
fn os_signal_handler(signals: Signals, console_input_clone: Arc<Console>) {
for signal in signals.forever() {
if signal == SIGWINCH {