mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
4bc82cd7eb
'virDomainDefAddController' which is used in code-paths which auto-add controllers to the definition such as 'virDomainDefMaybeAddController', 'virDomainDefAddUSBController', 'qemuDomainDefAddDefaultDevices' was adding the controller at the end of the list. However that is not how the XML parser would order the controller in the list as it uses virDomainControllerInsert grouping them by type and additional properties. This would cause that auto-added controllers would re-order: - between first and any subsequent run of the VM (even on commandline) - after a libvirtd/virtqemud restart - after any update of the definition based on the 'define' operation (e.g. virsh edit) To ensure that the ordering of controllers is identical always use virDomainControllerInsert. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
49 lines
1.9 KiB
XML
49 lines
1.9 KiB
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'>1</vcpu>
|
|
<os>
|
|
<type arch='x86_64' machine='pc-q35-7.2'>hvm</type>
|
|
<boot dev='hd'/>
|
|
</os>
|
|
<cpu mode='host-model' check='partial'/>
|
|
<clock offset='utc'/>
|
|
<on_poweroff>destroy</on_poweroff>
|
|
<on_reboot>restart</on_reboot>
|
|
<on_crash>destroy</on_crash>
|
|
<devices>
|
|
<emulator>/usr/bin/qemu-system-x86_64</emulator>
|
|
<controller type='pci' index='0' model='pcie-root'/>
|
|
<controller type='pci' index='1' model='pcie-root-port'>
|
|
<model name='pcie-root-port'/>
|
|
<target chassis='1' port='0x8'/>
|
|
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0' multifunction='on'/>
|
|
</controller>
|
|
<controller type='pci' index='2' model='pcie-root-port'>
|
|
<model name='pcie-root-port'/>
|
|
<target chassis='2' port='0x9'/>
|
|
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
|
|
</controller>
|
|
<controller type='pci' index='3' model='pcie-root-port'>
|
|
<model name='pcie-root-port'/>
|
|
<target chassis='3' port='0xa'/>
|
|
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
|
|
</controller>
|
|
<controller type='usb' index='0' model='qemu-xhci'>
|
|
<address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
|
|
</controller>
|
|
<controller type='sata' index='0'>
|
|
<address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
|
|
</controller>
|
|
<input type='mouse' bus='ps2'/>
|
|
<input type='keyboard' bus='ps2'/>
|
|
<audio id='1' type='none'/>
|
|
<watchdog model='itco' action='reset'/>
|
|
<memballoon model='virtio'>
|
|
<address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
|
|
</memballoon>
|
|
</devices>
|
|
</domain>
|