mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-11-03 11:51:11 +00:00
9eb9106ea5
Add support for using the new approach to hotplug vcpus using device_add during startup of qemu to allow sparse vcpu topologies. There are a few limitations imposed by qemu on the supported configuration: - vcpu0 needs to be always present and not hotpluggable - non-hotpluggable cpus need to be ordered at the beginning - order of the vcpus needs to be unique for every single hotpluggable entity Qemu also doesn't really allow to query the information necessary to start a VM with the vcpus directly on the commandline. Fortunately they can be hotplugged during startup. The new hotplug code uses the following approach: - non-hotpluggable vcpus are counted and put to the -smp option - qemu is started - qemu is queried for the necessary information - the configuration is checked - the hotpluggable vcpus are hotplugged - vcpus are started This patch adds a lot of checking code and enables the support to specify the individual vcpu element with qemu.
30 lines
951 B
XML
30 lines
951 B
XML
<domain type='qemu'>
|
|
<name>QEMUGuest1</name>
|
|
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
|
|
<memory unit='KiB'>219100</memory>
|
|
<currentMemory unit='KiB'>219100</currentMemory>
|
|
<vcpu placement='static' current='3'>6</vcpu>
|
|
<vcpus>
|
|
<vcpu id='0' enabled='yes' hotpluggable='no' order='1'/>
|
|
<vcpu id='1' enabled='no' hotpluggable='yes'/>
|
|
<vcpu id='2' enabled='no' hotpluggable='yes'/>
|
|
<vcpu id='3' enabled='no' hotpluggable='yes'/>
|
|
<vcpu id='4' enabled='yes' hotpluggable='yes' order='2'/>
|
|
<vcpu id='5' enabled='yes' hotpluggable='yes' order='3'/>
|
|
</vcpus>
|
|
<os>
|
|
<type arch='x86_64' machine='pc'>hvm</type>
|
|
<boot dev='network'/>
|
|
</os>
|
|
<cpu>
|
|
<topology sockets="3" cores="2" threads="1"/>
|
|
</cpu>
|
|
<clock offset='utc'/>
|
|
<on_poweroff>destroy</on_poweroff>
|
|
<on_reboot>restart</on_reboot>
|
|
<on_crash>destroy</on_crash>
|
|
<devices>
|
|
<emulator>/usr/bin/qemu</emulator>
|
|
</devices>
|
|
</domain>
|