tests: Add some tests for virt-xml with KVM
We're mostly interested in how the default bus/model for devices are influenced by knowledge about the guest OS, but since the whole thing requires to be connected to the QEMU driver we might as well create a new category and leave room for more QEMU-specific tests being added down the line. Signed-off-by: Andrea Bolognani <abologna@redhat.com>
This commit is contained in:
parent
ade53764fc
commit
b882dbde9c
|
@ -0,0 +1,13 @@
|
|||
<on_reboot>restart</on_reboot>
|
||||
<on_crash>destroy</on_crash>
|
||||
<devices>
|
||||
+ <disk type="file" device="disk">
|
||||
+ <driver name="qemu" type="qcow2"/>
|
||||
+ <source file="/dev/default-pool/testvol1.img"/>
|
||||
+ <target dev="hda" bus="ide"/>
|
||||
+ </disk>
|
||||
</devices>
|
||||
</domain>
|
||||
|
||||
Domain 'test' defined successfully.
|
||||
Changes will take effect after the domain is fully powered off.
|
|
@ -0,0 +1,14 @@
|
|||
<panic model="s390"/>
|
||||
<panic model="pseries"/>
|
||||
<panic model="hyperv"/>
|
||||
+ <disk type="file" device="disk">
|
||||
+ <driver name="qemu" type="qcow2"/>
|
||||
+ <source file="/dev/default-pool/testvol1.img"/>
|
||||
+ <target dev="vdaf" bus="virtio"/>
|
||||
+ </disk>
|
||||
</devices>
|
||||
<seclabel type="dynamic" model="selinux" relabel="yes"/>
|
||||
<seclabel type="static" model="dac" relabel="yes">
|
||||
|
||||
Domain 'test-many-devices' defined successfully.
|
||||
Changes will take effect after the domain is fully powered off.
|
|
@ -0,0 +1,14 @@
|
|||
<panic model="s390"/>
|
||||
<panic model="pseries"/>
|
||||
<panic model="hyperv"/>
|
||||
+ <disk type="file" device="disk">
|
||||
+ <driver name="qemu" type="qcow2"/>
|
||||
+ <source file="/dev/default-pool/testvol1.img"/>
|
||||
+ <target dev="vdaf" bus="virtio"/>
|
||||
+ </disk>
|
||||
</devices>
|
||||
<seclabel type="dynamic" model="selinux" relabel="yes"/>
|
||||
<seclabel type="static" model="dac" relabel="yes">
|
||||
|
||||
Domain 'test-many-devices' defined successfully.
|
||||
Changes will take effect after the domain is fully powered off.
|
|
@ -0,0 +1,13 @@
|
|||
<on_reboot>restart</on_reboot>
|
||||
<on_crash>destroy</on_crash>
|
||||
<devices>
|
||||
+ <interface type="bridge">
|
||||
+ <source bridge="eth0"/>
|
||||
+ <mac address="00:11:22:33:44:55"/>
|
||||
+ <model type="e1000"/>
|
||||
+ </interface>
|
||||
</devices>
|
||||
</domain>
|
||||
|
||||
Domain 'test' defined successfully.
|
||||
Changes will take effect after the domain is fully powered off.
|
|
@ -0,0 +1,14 @@
|
|||
<panic model="s390"/>
|
||||
<panic model="pseries"/>
|
||||
<panic model="hyperv"/>
|
||||
+ <interface type="bridge">
|
||||
+ <source bridge="eth0"/>
|
||||
+ <mac address="00:11:22:33:44:55"/>
|
||||
+ <model type="virtio"/>
|
||||
+ </interface>
|
||||
</devices>
|
||||
<seclabel type="dynamic" model="selinux" relabel="yes"/>
|
||||
<seclabel type="static" model="dac" relabel="yes">
|
||||
|
||||
Domain 'test-many-devices' defined successfully.
|
||||
Changes will take effect after the domain is fully powered off.
|
|
@ -0,0 +1,14 @@
|
|||
<panic model="s390"/>
|
||||
<panic model="pseries"/>
|
||||
<panic model="hyperv"/>
|
||||
+ <interface type="bridge">
|
||||
+ <source bridge="eth0"/>
|
||||
+ <mac address="00:11:22:33:44:55"/>
|
||||
+ <model type="virtio"/>
|
||||
+ </interface>
|
||||
</devices>
|
||||
<seclabel type="dynamic" model="selinux" relabel="yes"/>
|
||||
<seclabel type="static" model="dac" relabel="yes">
|
||||
|
||||
Domain 'test-many-devices' defined successfully.
|
||||
Changes will take effect after the domain is fully powered off.
|
|
@ -954,6 +954,13 @@ c.add_compare("--remove-device --disk /dev/null", "remove-disk-path")
|
|||
c.add_compare("--remove-device --video all", "remove-video-all", check_version="1.3.3") # check_version=video primary= attribute
|
||||
c.add_compare("--remove-device --host-device 0x04b3:0x4485", "remove-hostdev-name", check_version="1.2.11") # check_version=video ram output change
|
||||
|
||||
c = vixml.add_category("add/rm devices (KVM)", "--connect %(URI-KVM)s --print-diff --define")
|
||||
c.add_compare("test --add-device --disk %(EXISTIMG1)s", "kvm-add-disk-default") # Guest OS is not known
|
||||
c.add_compare("test-many-devices --add-device --disk %(EXISTIMG1)s", "kvm-add-disk-os-from-xml") # Guest OS information taken from the guest XML
|
||||
c.add_compare("test-many-devices --add-device --disk %(EXISTIMG1)s --os-variant winme", "kvm-add-disk-os-from-cmdline") # Guest OS information provided on the command line
|
||||
c.add_compare("test --add-device --network default", "kvm-add-network-default") # Guest OS is not known
|
||||
c.add_compare("test-many-devices --add-device --network default", "kvm-add-network-os-from-xml") # Guest OS information taken from the guest XML
|
||||
c.add_compare("test-many-devices --add-device --network default --os-variant winme", "kvm-add-network-os-from-cmdline") # Guest OS information provided on the command line
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue