mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user