虚拟机vcpu热拔(vcpu降配/vcpu缩核)报错,ps:4c4g->2c4g,libvirt热插拔报错:failed to find appropriate hotpluggable vcpus to reach the desired target vcpu count
创建cvm时,vcpu未配置热插拔标签 hotpluggable='yes',可以支持vcpu动态热插,不支持vcpu热拔。
- <domain>
- ...
- <vcpu placement='static' cpuset="1-4,^3,6" current="1">2</vcpu>
- <vcpus>
- <vcpu id='0' enabled='yes' hotpluggable='no' order='1'/>
- <vcpu id='1' enabled='no' hotpluggable='yes'/>
- </vcpus>
- ...
- </domain>
vcpu热插拔时:1.libvirt从qemu获取支持热插拔的vcpu列表;2.libvirt发送热插拔消息给qemu,从qom cpu删除热插拔vcpu信息,再发送sign到libvirt,libvirt更新虚拟机config和live xml记录的vcpu信息。