virt-manager/tests/xmlparse-xml/replace-child-build.xml
Pavel Hrdina 39366c37f6 controller: don't set default controller index
Libvirt is able to figure this out and it will make usage of the CLI
options more user-friendly.

For example if users wants to add a new pcie-root-port to existing VM
they have to figure out the latest controller index and call it like
this:

    virt-xml \
        --add-device \
        --controller pci,model=pcie-root-port,index=$nextIndex \
        $VM

After this change it will be simply:

    virt-xml \
        --add-device \
        --controller pci,model=pcie-root-port \
        $VM

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Cole Robinson <crobinso@redhat.com>
2019-12-04 12:38:28 +01:00

68 lines
1.8 KiB
XML

<domain type="test">
<uuid>00000000-1111-2222-3333-444444444444</uuid>
<vcpu>1</vcpu>
<os>
<type arch="i686">hvm</type>
</os>
<features>
<pae/>
<vmport state="off"/>
</features>
<clock offset="utc"/>
<pm>
<suspend-to-mem enabled="no"/>
<suspend-to-disk enabled="no"/>
</pm>
<devices>
<emulator>/usr/bin/test-hv</emulator>
<disk type="file" device="cdrom">
<target dev="sda" bus="scsi"/>
<readonly/>
</disk>
<disk type="file" device="cdrom">
<target dev="sdb" bus="scsi"/>
<readonly/>
</disk>
<disk type="file" device="cdrom">
<target dev="sdz" bus="scsi"/>
<readonly/>
</disk>
<disk type="file" device="cdrom">
<target dev="sdd" bus="scsi"/>
<readonly/>
</disk>
<disk type="file" device="cdrom">
<target dev="sde" bus="scsi"/>
<readonly/>
</disk>
<disk type="file" device="cdrom">
<target dev="sdf" bus="scsi"/>
<readonly/>
</disk>
<controller type="usb" model="ich9-ehci1"/>
<controller type="usb" model="ich9-uhci1">
<master startport="0"/>
</controller>
<controller type="usb" model="ich9-uhci2">
<master startport="2"/>
</controller>
<controller type="usb" model="ich9-uhci3">
<master startport="4"/>
</controller>
<console type="pty"/>
<channel type="spicevmc">
<target type="virtio" name="com.redhat.spice.0"/>
</channel>
<input type="tablet" bus="usb"/>
<graphics type="spice" port="-1" tlsPort="-1" autoport="yes">
<image compression="off"/>
</graphics>
<sound model="ich6"/>
<video>
<model type="qxl"/>
</video>
<redirdev bus="usb" type="spicevmc"/>
<redirdev bus="usb" type="spicevmc"/>
</devices>
</domain>