About the change of a VM's vcpu count in runtime?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

We know that there is a command "setvcpus" in virsh used to "change number of virtual CPUs", now we just have the need to change vcpu count dynamically for a running VM, so I tried this command (the vcpu count is 2 in the VM xml file), below is the result:

virsh # setvcpus 3 --count 4
error: invalid argument: requested vcpus is greater than max allowable vcpus for the domain: 4 > 2

virsh # setvcpus 3 --count 1
error: Operation not supported: qemu didn't unplug the vCPUs properly

So I tried another way: log into the running VM, and "echo 0 > /sys/devices/system/cpu/cpu1/online", after that I can find only one processor in the vm through '/proc/cpuinfo', but in virsh, the vcpuinfo still shows:

virsh # vcpuinfo 3
VCPU:           0
CPU:            0
State:          running
CPU time:       13.5s
CPU Affinity:   yyyy

VCPU:           1
CPU:            1
State:          running
CPU time:       6.9s
CPU Affinity:   yyyy

So the question is: is there any method I can't find yet to change the vcpu count of a running vm dynamically?

BRs,
Dennis

_______________________________________________
libvirt-users mailing list
libvirt-users@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvirt-users




[Index of Archives]     [Virt Tools]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux