virtinst: Add tests for Virtuozzo hypervisor

This commit is contained in:
Mikhail Feoktistov 2017-02-21 17:28:00 +03:00 committed by Cole Robinson
parent f78ff6457b
commit 3870001fd2
5 changed files with 98 additions and 1 deletions

View File

@ -0,0 +1,53 @@
<capabilities>
<host>
<cpu>
<arch>x86_64</arch>
<model>IvyBridge</model>
<vendor>Intel</vendor>
<topology sockets="1" cores="4" threads="1"/>
</cpu>
<power_management/>
<topology>
<cells num="1">
<cell id="0">
<memory unit="KiB">16692408</memory>
<pages unit="KiB" size="4">4173102</pages>
<pages unit="KiB" size="2048">0</pages>
<distances>
<sibling id="0" value="10"/>
</distances>
<cpus num="4">
<cpu id="0" socket_id="0" core_id="0" siblings="0"/>
<cpu id="1" socket_id="0" core_id="1" siblings="1"/>
<cpu id="2" socket_id="0" core_id="2" siblings="2"/>
<cpu id="3" socket_id="0" core_id="3" siblings="3"/>
</cpus>
</cell>
</cells>
</topology>
</host>
<guest>
<os_type>exe</os_type>
<arch name="i686">
<wordsize>32</wordsize>
<emulator>vz</emulator>
<domain type="vz">
<emulator>vz</emulator>
</domain>
</arch>
</guest>
<guest>
<os_type>exe</os_type>
<arch name="x86_64">
<wordsize>64</wordsize>
<emulator>vz</emulator>
<domain type="vz">
<emulator>vz</emulator>
</domain>
</arch>
</guest>
</capabilities>

View File

@ -0,0 +1,26 @@
<domain type="vz">
<name>foobar</name>
<uuid>00000000-1111-2222-3333-444444444444</uuid>
<memory>65536</memory>
<currentMemory>65536</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch="x86_64">exe</type>
<init>/sbin/init</init>
</os>
<features>
<privnet/>
</features>
<devices>
<emulator>vz</emulator>
<filesystem type="template">
<source name="centos-7-x86_64"/>
<target dir="/"/>
</filesystem>
<interface type="network">
<source network="Bridged"/>
<mac address="00:11:22:33:44:55"/>
</interface>
<console type="pty"/>
</devices>
</domain>

View File

@ -81,6 +81,7 @@ test_files = {
'URI-KVM-S390X-KVMIBM' : utils.uri_kvm_s390x_KVMIBM,
'URI-XEN': utils.uri_xen,
'URI-LXC': utils.uri_lxc,
'URI-VZ': utils.uri_vz,
'CLONE_DISK_XML' : "%s/clone-disk.xml" % xmldir,
'CLONE_STORAGE_XML' : "%s/clone-disk-managed.xml" % xmldir,
@ -773,6 +774,20 @@ c.add_compare("--disk %(BLOCKVOL)s --cdrom %(EXISTIMG1)s --livecd --hvm", "xen-h
#####################
# VZ specific tests #
#####################
c = vinst.add_category("vz", "--connect %(URI-VZ)s --noautoconsole")
c.add_compare(""" \
--container \
--filesystem type=template,source=centos-7-x86_64,target="/" \
--network network="Bridged" \
""", "vz-ct-template")
#####################################
# Device option back compat testing #
#####################################

View File

@ -54,6 +54,7 @@ uri_kvm_s390x_KVMIBM = (_uri_kvm_domcaps + _capsprefix + "kvm-s390x-KVMIBM.xml")
uri_xen = uri_test + _capsprefix + "xen-rhel5.4.xml,xen"
uri_lxc = uri_test + _capsprefix + "lxc.xml,lxc"
uri_vz = uri_test + _capsprefix + "vz.xml,vz"
def get_debug():

View File

@ -124,7 +124,7 @@ class MagicURI(object):
files in test/capabilities-xml/
* 'domcaps=%s': Points to a file with domain capabilities XML, that
will be returned in conn.getDomainCapabilities
* qemu or xen or lxc: Fake the specified hypervisor
* qemu, xen, lxc or vz: Fake the specified hypervisor
See tests/utils.py for example URLs
"""
@ -161,6 +161,8 @@ class MagicURI(object):
self.hv = "lxc"
if pop_bool("xen"):
self.hv = "xen"
if pop_bool("vz"):
self.hv = "vz"
self.conn_version = opts.pop("connver", None)
if self.conn_version: