Files
virt-manager/tests/cli-test-xml/compare/virt-install-singleton-config-2.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

306 lines
9.0 KiB
XML

<domain type="kvm">
<name>foobar</name>
<uuid>00000000-1111-2222-3333-444444444444</uuid>
<title>my-title</title>
<description>my-description</description>
<memory>1048576</memory>
<currentMemory>524288</currentMemory>
<blkiotune>
<weight>100</weight>
<device>
<path>/home/test/1.img</path>
<weight>200</weight>
</device>
</blkiotune>
<memtune>
<hard_limit>10</hard_limit>
<soft_limit>20</soft_limit>
<swap_hard_limit>30</swap_hard_limit>
<min_guarantee>40</min_guarantee>
</memtune>
<memoryBacking>
<nosharepages/>
<locked/>
<hugepages>
<page size="1" unit="G" nodeset="1,2-5"/>
</hugepages>
</memoryBacking>
<vcpu>4</vcpu>
<numatune>
<memory mode="strict" nodeset="1-3,4"/>
</numatune>
<resource>
<partition>/virtualmachines/production</partition>
</resource>
<sysinfo type="smbios">
<bios>
<entry name="vendor">Acme LLC</entry>
<entry name="version">1.2.3</entry>
<entry name="date">01/01/1970</entry>
<entry name="release">10.22</entry>
</bios>
<system>
<entry name="manufacturer">Acme Inc.</entry>
<entry name="product">Computer</entry>
<entry name="version">3.2.1</entry>
<entry name="serial">123456789</entry>
<entry name="uuid">00000000-1111-2222-3333-444444444444</entry>
<entry name="sku">abc-123</entry>
<entry name="family">Server</entry>
</system>
<baseBoard>
<entry name="manufacturer">Acme Corp.</entry>
<entry name="product">Motherboard</entry>
<entry name="version">A01</entry>
<entry name="serial">1234-5678</entry>
<entry name="asset">Tag</entry>
<entry name="location">Chassis</entry>
</baseBoard>
</sysinfo>
<os>
<type arch="x86_64">hvm</type>
<loader>/foo/bar</loader>
<boot dev="network"/>
<smbios mode="sysinfo"/>
<bootmenu enable="no"/>
</os>
<idmap>
<uid start="0" target="1000" count="10"/>
<gid start="0" target="1000" count="10"/>
</idmap>
<features>
<apic eoi="on"/>
<privnet/>
<pmu state="off"/>
<hyperv>
<reset state="on"/>
<spinlocks state="on" retries="1234"/>
<synic state="on"/>
</hyperv>
<vmport state="off"/>
</features>
<cpu mode="custom" match="strict">
<model>foobar</model>
<vendor>meee</vendor>
<topology sockets="2" cores="2" threads="2"/>
<feature policy="force" name="x2apic"/>
<feature policy="force" name="x2apicagain"/>
<feature policy="require" name="reqtest"/>
<feature policy="optional" name="opttest"/>
<feature policy="disable" name="distest2"/>
<feature policy="disable" name="distest"/>
<feature policy="forbid" name="foo"/>
<feature policy="forbid" name="bar"/>
<numa>
<cell id="0" cpus="1,2,3" memory="1024"/>
<cell id="1" cpus="5-8" memory="256"/>
</numa>
</cpu>
<clock offset="utc">
<timer name="rtc" tickpolicy="merge"/>
<timer name="hpet" present="no"/>
</clock>
<on_poweroff>destroy</on_poweroff>
<on_reboot>destroy</on_reboot>
<on_crash>preserve</on_crash>
<pm>
<suspend-to-mem enabled="yes"/>
<suspend-to-disk enabled="no"/>
</pm>
<devices>
<emulator>/usr/bin/qemu-kvm</emulator>
<controller type="usb" index="0" model="nec-xhci"/>
<controller type="virtio-scsi" index="0"/>
<filesystem type="mount" accessmode="mapped">
<source dir="/foo/source"/>
<target dir="/bar/target"/>
</filesystem>
<interface type="bridge">
<source bridge="eth0"/>
<mac address="00:11:22:33:44:55"/>
<model type="virtio"/>
</interface>
<input type="tablet" bus="usb"/>
<graphics type="vnc" port="-1"/>
<console type="pty"/>
<channel type="unix">
<source mode="bind"/>
<target type="virtio" name="org.qemu.guest_agent.0"/>
</channel>
<watchdog model="ib700" action="pause"/>
<memballoon model="virtio"/>
<tpm model="tpm-tis">
<backend type="passthrough">
<device path="/dev/tpm0"/>
</backend>
</tpm>
<rng model="virtio">
<backend model="egd" type="udp">
<source mode="bind" host="127.0.0.1" service="8000"/>
<source mode="connect" host="foo" service="708"/>
</backend>
</rng>
<panic model="isa">
<address iobase="0x506" type="isa"/>
</panic>
</devices>
<seclabel type="static" model="selinux" relabel="yes">
<label>system_u:object_r:svirt_image_t:s0:c100,c200</label>
</seclabel>
<on_lockfailure>ignore</on_lockfailure>
</domain>
<domain type="kvm">
<name>foobar</name>
<uuid>00000000-1111-2222-3333-444444444444</uuid>
<title>my-title</title>
<description>my-description</description>
<memory>1048576</memory>
<currentMemory>524288</currentMemory>
<blkiotune>
<weight>100</weight>
<device>
<path>/home/test/1.img</path>
<weight>200</weight>
</device>
</blkiotune>
<memtune>
<hard_limit>10</hard_limit>
<soft_limit>20</soft_limit>
<swap_hard_limit>30</swap_hard_limit>
<min_guarantee>40</min_guarantee>
</memtune>
<memoryBacking>
<nosharepages/>
<locked/>
<hugepages>
<page size="1" unit="G" nodeset="1,2-5"/>
</hugepages>
</memoryBacking>
<vcpu>4</vcpu>
<numatune>
<memory mode="strict" nodeset="1-3,4"/>
</numatune>
<resource>
<partition>/virtualmachines/production</partition>
</resource>
<sysinfo type="smbios">
<bios>
<entry name="vendor">Acme LLC</entry>
<entry name="version">1.2.3</entry>
<entry name="date">01/01/1970</entry>
<entry name="release">10.22</entry>
</bios>
<system>
<entry name="manufacturer">Acme Inc.</entry>
<entry name="product">Computer</entry>
<entry name="version">3.2.1</entry>
<entry name="serial">123456789</entry>
<entry name="uuid">00000000-1111-2222-3333-444444444444</entry>
<entry name="sku">abc-123</entry>
<entry name="family">Server</entry>
</system>
<baseBoard>
<entry name="manufacturer">Acme Corp.</entry>
<entry name="product">Motherboard</entry>
<entry name="version">A01</entry>
<entry name="serial">1234-5678</entry>
<entry name="asset">Tag</entry>
<entry name="location">Chassis</entry>
</baseBoard>
</sysinfo>
<os>
<type arch="x86_64">hvm</type>
<loader>/foo/bar</loader>
<boot dev="cdrom"/>
<boot dev="fd"/>
<boot dev="hd"/>
<boot dev="network"/>
<smbios mode="sysinfo"/>
<bootmenu enable="no"/>
</os>
<idmap>
<uid start="0" target="1000" count="10"/>
<gid start="0" target="1000" count="10"/>
</idmap>
<features>
<apic eoi="on"/>
<privnet/>
<pmu state="off"/>
<hyperv>
<reset state="on"/>
<spinlocks state="on" retries="1234"/>
<synic state="on"/>
</hyperv>
<vmport state="off"/>
</features>
<cpu mode="custom" match="strict">
<model>foobar</model>
<vendor>meee</vendor>
<topology sockets="2" cores="2" threads="2"/>
<feature policy="force" name="x2apic"/>
<feature policy="force" name="x2apicagain"/>
<feature policy="require" name="reqtest"/>
<feature policy="optional" name="opttest"/>
<feature policy="disable" name="distest2"/>
<feature policy="disable" name="distest"/>
<feature policy="forbid" name="foo"/>
<feature policy="forbid" name="bar"/>
<numa>
<cell id="0" cpus="1,2,3" memory="1024"/>
<cell id="1" cpus="5-8" memory="256"/>
</numa>
</cpu>
<clock offset="utc">
<timer name="rtc" tickpolicy="merge"/>
<timer name="hpet" present="no"/>
</clock>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>preserve</on_crash>
<pm>
<suspend-to-mem enabled="yes"/>
<suspend-to-disk enabled="no"/>
</pm>
<devices>
<emulator>/usr/bin/qemu-kvm</emulator>
<controller type="usb" index="0" model="nec-xhci"/>
<controller type="virtio-scsi" index="0"/>
<filesystem type="mount" accessmode="mapped">
<source dir="/foo/source"/>
<target dir="/bar/target"/>
</filesystem>
<interface type="bridge">
<source bridge="eth0"/>
<mac address="00:11:22:33:44:55"/>
<model type="virtio"/>
</interface>
<input type="tablet" bus="usb"/>
<graphics type="vnc" port="-1"/>
<console type="pty"/>
<channel type="unix">
<source mode="bind"/>
<target type="virtio" name="org.qemu.guest_agent.0"/>
</channel>
<watchdog model="ib700" action="pause"/>
<memballoon model="virtio"/>
<tpm model="tpm-tis">
<backend type="passthrough">
<device path="/dev/tpm0"/>
</backend>
</tpm>
<rng model="virtio">
<backend model="egd" type="udp">
<source mode="bind" host="127.0.0.1" service="8000"/>
<source mode="connect" host="foo" service="708"/>
</backend>
</rng>
<panic model="isa">
<address iobase="0x506" type="isa"/>
</panic>
</devices>
<seclabel type="static" model="selinux" relabel="yes">
<label>system_u:object_r:svirt_image_t:s0:c100,c200</label>
</seclabel>
<on_lockfailure>ignore</on_lockfailure>
</domain>