]> git.proxmox.com Git - qemu-server.git/blobdiff - PVE/API2/Qemu.pm
add cpu_hotplug
[qemu-server.git] / PVE / API2 / Qemu.pm
index d038b06f5ad20f3a56a928358b485ea69b385248..b2c8908a90ef9aa7726a40d5d8c578208be5c094 100644 (file)
@@ -988,6 +988,10 @@ my $update_vm_api  = sub {
                    } elsif($opt eq 'tablet' && $param->{$opt} == 0){
                        PVE::QemuServer::vm_deviceunplug($vmid, $conf, $opt);
                    }
+               
+                   if($opt eq 'cores' && $conf->{maxcpus}){
+                       PVE::QemuServer::qemu_cpu_hotplug($vmid, $conf, $param->{$opt});
+                   }
 
                    $conf->{$opt} = $param->{$opt};
                    PVE::QemuServer::update_config_nolock($vmid, $conf, 1);