Files
virt-manager/tests/cli-test-xml/compare/virt-install-singleton-config-1.xml
Pavel Hrdina 36230c9a18 devicepanic: use model instead of address.type
There are multiple models of the panic device, the address type is only
one and is valid only for "isa" model.

To not break the virt-install/virt-xml the command line parser needs to
be updated.  Before this patch there was only one parameter that
configured the "iobase".  Now the first parameter configures a model
but to keep it backward compatible it follows these rules:

1. there is only one parameter and it matches known model:

  --panic isa

  <panic model='isa'>
    <address iobase='0x505' type='isa'/>
  </panic>

2. there is only one parameter and it doesn't match any model:

  --panic 0x505

  <panic model='isa'>
    <address iobase='0x505' type='isa'/>
  </panic>

3. there are two parameters:

  --panic isa,iobase=0x505

  <panic model='isa'>
    <address iobase='0x505' type='isa'/>
  </panic>

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2017-09-09 10:09:46 +02:00

73 lines
2.0 KiB
XML

<domain type="kvm">
<name>foobar</name>
<uuid>00000000-1111-2222-3333-444444444444</uuid>
<description>foobar &amp; baz</description>
<memory>1048576</memory>
<currentMemory>1048576</currentMemory>
<memoryBacking>
<hugepages/>
</memoryBacking>
<vcpu cpuset="1,3-5">4</vcpu>
<numatune>
<memory nodeset="1,2,3,5-7,^6"/>
</numatune>
<resource>
<partition>/virtualmachines/production</partition>
</resource>
<os>
<type arch="x86_64">hvm</type>
<loader readonly="yes" type="pflash">/usr/share/OVMF/OVMF_CODE.fd</loader>
<boot dev="hd"/>
</os>
<features>
<acpi/>
<vmport state="off"/>
</features>
<cpu mode="host-model"/>
<clock offset="localtime">
<timer name="rtc" tickpolicy="catchup"/>
<timer name="pit" tickpolicy="delay"/>
<timer name="hpet" present="no"/>
</clock>
<on_crash>restart</on_crash>
<pm>
<suspend-to-mem enabled="no"/>
<suspend-to-disk enabled="no"/>
</pm>
<devices>
<emulator>/usr/bin/qemu-kvm</emulator>
<controller type="usb" index="0" model="ich9-ehci1"/>
<controller type="usb" index="0" model="ich9-uhci1">
<master startport="0"/>
</controller>
<controller type="usb" index="0" model="ich9-uhci2">
<master startport="2"/>
</controller>
<controller type="usb" index="0" model="ich9-uhci3">
<master startport="4"/>
</controller>
<input type="tablet" bus="usb"/>
<graphics type="spice" port="-1" tlsPort="-1" autoport="yes">
<image compression="off"/>
</graphics>
<video>
<model type="vga"/>
</video>
<watchdog model="i6300esb" action="reset"/>
<memballoon model="none"/>
<tpm model="tpm-tis">
<backend type="passthrough">
<device path="/dev/tpm0"/>
</backend>
</tpm>
<rng model="virtio">
<backend model="random">/dev/random</backend>
</rng>
<panic model="isa">
<address type="isa" iobase="0x505"/>
</panic>
</devices>
<seclabel type="dynamic" model="selinux"/>
<seclabel type="none" model="dac"/>
</domain>