From nobody Sun Apr 28 12:11:25 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.39 as permitted sender) client-ip=209.132.183.39; envelope-from=libvir-list-bounces@redhat.com; helo=mx6-phx2.redhat.com; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.39 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; Return-Path: Received: from mx6-phx2.redhat.com (mx6-phx2.redhat.com [209.132.183.39]) by mx.zohomail.com with SMTPS id 1488161182721954.299212227991; Sun, 26 Feb 2017 18:06:22 -0800 (PST) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx6-phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v1R22mPQ044106; Sun, 26 Feb 2017 21:02:49 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v1R22kJu009161 for ; Sun, 26 Feb 2017 21:02:46 -0500 Received: from mx1.redhat.com (ext-mx06.extmail.prod.ext.phx2.redhat.com [10.5.110.30]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v1R22kSF008794 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Sun, 26 Feb 2017 21:02:46 -0500 Received: from smtp2.provo.novell.com (smtp2.provo.novell.com [137.65.250.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DBEE33B708 for ; Mon, 27 Feb 2017 02:02:45 +0000 (UTC) Received: from linux-tbji.provo.novell.com (prv-ext-foundry1int.gns.novell.com [137.65.251.240]) by smtp2.provo.novell.com with ESMTP (NOT encrypted); Sun, 26 Feb 2017 19:02:41 -0700 From: Jim Fehlig To: libvir-list@redhat.com Date: Sun, 26 Feb 2017 19:02:25 -0700 Message-Id: <20170227020227.15438-2-jfehlig@suse.com> In-Reply-To: <20170227020227.15438-1-jfehlig@suse.com> References: <20170227020227.15438-1-jfehlig@suse.com> X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 202 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Mon, 27 Feb 2017 02:02:46 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Mon, 27 Feb 2017 02:02:46 +0000 (UTC) for IP:'137.65.250.81' DOMAIN:'smtp2.provo.novell.com' HELO:'smtp2.provo.novell.com' FROM:'jfehlig@suse.com' RCPT:'' X-RedHat-Spam-Score: -1.501 (BAYES_50, RCVD_IN_DNSWL_MED, SPF_PASS) 137.65.250.81 smtp2.provo.novell.com 137.65.250.81 smtp2.provo.novell.com X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Scanned-By: MIMEDefang 2.78 on 10.5.110.30 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 1/3] libxl: determine device model version from emulator name X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" libxl exposes a setting for specifying a device model version. The default is LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN, aka upstream qemu. But users can specify LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN_TRADITIONAL if they are using the old forked qemu, aka qemu-dm. libvirt only supports specifying an emulator by name, specifying a version is not supported. Prior to this change libvirt would invoke the specified emulator with '--help' option in an attempt to determine the version. If the help output included the string "Options specific to the Xen version:" it was assumed the emulator was the old forked qemu-dm. This approach works well when creating libxl_domain_config to start a VM, but is problematic when simply creating libxl_domain_config for unit test purposes. Build/development systems running unit tests may not have the emulator installed. Even if installed, invoking the emulator during unit tests is bad form. This change takes the simple-minded approach of determining the device model version based on the emulator name. If it contains "qemu-dm" it is assumed to be LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN_TRADITIONAL, otherwise LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN. Signed-off-by: Jim Fehlig --- src/libxl/libxl_capabilities.c | 37 +++++++++++++++---------------------- 1 file changed, 15 insertions(+), 22 deletions(-) diff --git a/src/libxl/libxl_capabilities.c b/src/libxl/libxl_capabilities.c index 2bbd2d1b4..7ad8e7b57 100644 --- a/src/libxl/libxl_capabilities.c +++ b/src/libxl/libxl_capabilities.c @@ -723,35 +723,28 @@ libxlMakeDomainCapabilities(virDomainCapsPtr domCaps, return 0; } =20 -#define LIBXL_QEMU_DM_STR "Options specific to the Xen version:" =20 +#define LIBXL_QEMU_DM_STR "qemu-dm" + +/* + * libxl exposes a setting for specifying a device model version. The defa= ult + * is LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN (aka upstream qemu). But users c= an + * specify LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN_TRADITIONAL if they are usi= ng + * the old, forked qemu (aka qemu-dm). libvirt only supports specifying an + * emulator. This function makes a poor attempt at determining the device + * model version based on the emulator name. If the emulator name contains + * "qemu-dm", it is assumed to be a + * LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN_TRADITIONAL emulator. + */ int libxlDomainGetEmulatorType(const virDomainDef *def) { - int ret =3D LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN; - virCommandPtr cmd =3D NULL; - char *output =3D NULL; - if (def->os.type =3D=3D VIR_DOMAIN_OSTYPE_HVM) { if (def->emulator) { - if (!virFileExists(def->emulator)) - goto cleanup; - - cmd =3D virCommandNew(def->emulator); - - virCommandAddArgList(cmd, "-help", NULL); - virCommandSetOutputBuffer(cmd, &output); - - if (virCommandRun(cmd, NULL) < 0) - goto cleanup; - - if (strstr(output, LIBXL_QEMU_DM_STR)) - ret =3D LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN_TRADITIONAL; + if (strstr(def->emulator, LIBXL_QEMU_DM_STR)) + return LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN_TRADITIONAL; } } =20 - cleanup: - VIR_FREE(output); - virCommandFree(cmd); - return ret; + return LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN; } --=20 2.11.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun Apr 28 12:11:25 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.24 as permitted sender) client-ip=209.132.183.24; envelope-from=libvir-list-bounces@redhat.com; helo=mx3-phx2.redhat.com; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.24 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; Return-Path: Received: from mx3-phx2.redhat.com (mx3-phx2.redhat.com [209.132.183.24]) by mx.zohomail.com with SMTPS id 1488161183768706.9670924618861; Sun, 26 Feb 2017 18:06:23 -0800 (PST) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx3-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v1R22mit001181; Sun, 26 Feb 2017 21:02:49 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v1R22kUY009160 for ; Sun, 26 Feb 2017 21:02:46 -0500 Received: from mx1.redhat.com (ext-mx07.extmail.prod.ext.phx2.redhat.com [10.5.110.31]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v1R22k5C008792 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Sun, 26 Feb 2017 21:02:46 -0500 Received: from smtp2.provo.novell.com (smtp2.provo.novell.com [137.65.250.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DCAEEC04B32C for ; Mon, 27 Feb 2017 02:02:45 +0000 (UTC) Received: from linux-tbji.provo.novell.com (prv-ext-foundry1int.gns.novell.com [137.65.251.240]) by smtp2.provo.novell.com with ESMTP (NOT encrypted); Sun, 26 Feb 2017 19:02:41 -0700 From: Jim Fehlig To: libvir-list@redhat.com Date: Sun, 26 Feb 2017 19:02:26 -0700 Message-Id: <20170227020227.15438-3-jfehlig@suse.com> In-Reply-To: <20170227020227.15438-1-jfehlig@suse.com> References: <20170227020227.15438-1-jfehlig@suse.com> X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 202 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Mon, 27 Feb 2017 02:02:46 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Mon, 27 Feb 2017 02:02:46 +0000 (UTC) for IP:'137.65.250.81' DOMAIN:'smtp2.provo.novell.com' HELO:'smtp2.provo.novell.com' FROM:'jfehlig@suse.com' RCPT:'' X-RedHat-Spam-Score: -1.501 (BAYES_50, RCVD_IN_DNSWL_MED, SPF_PASS) 137.65.250.81 smtp2.provo.novell.com 137.65.250.81 smtp2.provo.novell.com X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Scanned-By: MIMEDefang 2.78 on 10.5.110.31 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 2/3] libxl: relax checks on X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Checking for the existence and execute permission of a user-specified emulator is fine when actually creating a VM, but is problematic when running unit tests since a development system may not have the emulator installed. Defer the emulator checks to libxl, when actually starting a VM. One downside is errors associated with non-existent or non-executable emulator are reported in the libxl driver log files instead of being returned through the libvirt API. E.g. before this change virsh create test.xml error: Failed to create domain from test.xml error: unsupported configuration: emulator '/foo/bar' not found After this change virsh create test.xml error: Failed to create domain from test.xml error: internal error: libxenlight failed to create new domain 'test' but the libxl driver log file contains 2017-02-23 22:04:18.319+0000: libxl: libxl_dm.c:2050:libxl__spawn_local_dm: device model /foo/bar is not executable: No such file or directory Signed-off-by: Jim Fehlig --- src/libxl/libxl_conf.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c index 4bab651b3..2c10fbe25 100644 --- a/src/libxl/libxl_conf.c +++ b/src/libxl/libxl_conf.c @@ -435,20 +435,6 @@ libxlMakeDomBuildInfo(virDomainDefPtr def, b_info->u.hvm.bios =3D LIBXL_BIOS_TYPE_OVMF; =20 if (def->emulator) { - if (!virFileExists(def->emulator)) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("emulator '%s' not found"), - def->emulator); - return -1; - } - - if (!virFileIsExecutable(def->emulator)) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("emulator '%s' is not executable"), - def->emulator); - return -1; - } - VIR_FREE(b_info->device_model); if (VIR_STRDUP(b_info->device_model, def->emulator) < 0) return -1; --=20 2.11.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun Apr 28 12:11:25 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.37 as permitted sender) client-ip=209.132.183.37; envelope-from=libvir-list-bounces@redhat.com; helo=mx5-phx2.redhat.com; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.37 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; Return-Path: Received: from mx5-phx2.redhat.com (mx5-phx2.redhat.com [209.132.183.37]) by mx.zohomail.com with SMTPS id 1488161254955643.1107936150444; Sun, 26 Feb 2017 18:07:34 -0800 (PST) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx5-phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v1R24ASs034819; Sun, 26 Feb 2017 21:04:10 -0500 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v1R22mhG009178 for ; Sun, 26 Feb 2017 21:02:48 -0500 Received: from mx1.redhat.com (ext-mx08.extmail.prod.ext.phx2.redhat.com [10.5.110.32]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v1R22mlS030701 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Sun, 26 Feb 2017 21:02:48 -0500 Received: from smtp2.provo.novell.com (smtp2.provo.novell.com [137.65.250.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DCE34C054C3B for ; Mon, 27 Feb 2017 02:02:45 +0000 (UTC) Received: from linux-tbji.provo.novell.com (prv-ext-foundry1int.gns.novell.com [137.65.251.240]) by smtp2.provo.novell.com with ESMTP (NOT encrypted); Sun, 26 Feb 2017 19:02:42 -0700 From: Jim Fehlig To: libvir-list@redhat.com Date: Sun, 26 Feb 2017 19:02:27 -0700 Message-Id: <20170227020227.15438-4-jfehlig@suse.com> In-Reply-To: <20170227020227.15438-1-jfehlig@suse.com> References: <20170227020227.15438-1-jfehlig@suse.com> X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 202 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Mon, 27 Feb 2017 02:02:46 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Mon, 27 Feb 2017 02:02:46 +0000 (UTC) for IP:'137.65.250.81' DOMAIN:'smtp2.provo.novell.com' HELO:'smtp2.provo.novell.com' FROM:'jfehlig@suse.com' RCPT:'' X-RedHat-Spam-Score: -1.501 (BAYES_50, RCVD_IN_DNSWL_MED, SPF_PASS) 137.65.250.81 smtp2.provo.novell.com 137.65.250.81 smtp2.provo.novell.com X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-Scanned-By: MIMEDefang 2.78 on 10.5.110.32 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 3/3] libxl: Add a test suite for libxl_domain_config generator X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The libxl library allows a libxl_domain_config object to be serialized from/to a JSON string. Use this to allow testing of the XML to libxl_domain_config conversion process. Test XML is converted to libxl_domain_config, which is then serialized to json. A json template corresponding to the test XML is converted to a libxl_domain_config object using libxl_domain_config_from_json(), and then serialized back to json using libxl_domain_config_to_json(). The two json docs are then compared. Using libxl to convert the json template to a libxl_domain_config object and then back to json provides a simple way to account for any changes or additions to the json representation across Xen releases. Signed-off-by: Jim Fehlig --- m4/virt-driver-libxl.m4 | 6 +- tests/Makefile.am | 18 ++- tests/libxlxml2domconfigdata/basic-hvm.json | 89 +++++++++++ tests/libxlxml2domconfigdata/basic-hvm.xml | 36 +++++ tests/libxlxml2domconfigdata/basic-pv.json | 65 ++++++++ tests/libxlxml2domconfigdata/basic-pv.xml | 28 ++++ tests/libxlxml2domconfigdata/moredevs-hvm.json | 111 +++++++++++++ tests/libxlxml2domconfigdata/moredevs-hvm.xml | 63 ++++++++ tests/libxlxml2domconfigtest.c | 208 +++++++++++++++++++++= ++++ tests/virmocklibxl.c | 87 +++++++++++ 10 files changed, 708 insertions(+), 3 deletions(-) diff --git a/m4/virt-driver-libxl.m4 b/m4/virt-driver-libxl.m4 index 96a9d4736..3d635f0a6 100644 --- a/m4/virt-driver-libxl.m4 +++ b/m4/virt-driver-libxl.m4 @@ -35,7 +35,7 @@ AC_DEFUN([LIBVIRT_DRIVER_CHECK_LIBXL], [ if test "x$with_libxl" =3D "xyes" ; then LIBXL_FIRMWARE_DIR=3D$($PKG_CONFIG --variable xenfirmwaredir xenlight) LIBXL_EXECBIN_DIR=3D$($PKG_CONFIG --variable libexec_bin xenlight) - fi + fi =20 dnl pkgconfig file not found, fallback to lib probe if test "x$with_libxl" =3D "xno" ; then @@ -80,6 +80,10 @@ AC_DEFUN([LIBVIRT_DRIVER_CHECK_LIBXL], [ LIBXL_LIBS=3D"$LIBXL_LIBS -lxenctrl" ]) =20 + dnl Check if libxl_domain_config_from_json is available for domXML to + dnl libxl_domain_config tests + LIBS=3D"$LIBS -lxenlight -lxenctrl" + AC_CHECK_FUNCS([libxl_domain_config_from_json]) CFLAGS=3D"$old_CFLAGS" LIBS=3D"$old_LIBS" fi diff --git a/tests/Makefile.am b/tests/Makefile.am index 35e82abf5..6b00b4f94 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -100,6 +100,7 @@ EXTRA_DIST =3D \ genericxml2xmlindata \ genericxml2xmloutdata \ interfaceschemadata \ + libxlxml2domconfigdata \ lxcconf2xmldata \ lxcxml2xmldata \ lxcxml2xmloutdata \ @@ -268,7 +269,8 @@ test_programs +=3D xml2sexprtest sexpr2xmltest \ endif WITH_XEN =20 if WITH_LIBXL -test_programs +=3D xlconfigtest +test_programs +=3D xlconfigtest libxlxml2domconfigtest +test_libraries +=3D virmocklibxl.la endif WITH_LIBXL =20 if WITH_QEMU @@ -521,8 +523,20 @@ xlconfigtest_SOURCES =3D \ xlconfigtest.c testutilsxen.c testutilsxen.h \ testutils.c testutils.h xlconfigtest_LDADD =3D$(libxl_LDADDS) + +libxlxml2domconfigtest_SOURCES =3D \ + libxlxml2domconfigtest.c testutilsxen.c testutilsxen.h \ + testutils.c testutils.h +libxlxml2domconfigtest_LDADD =3D $(libxl_LDADDS) $(LIBXML_LIBS) + +virmocklibxl_la_SOURCES =3D \ + virmocklibxl.c +virmocklibxl_la_CFLAGS =3D $(AM_CFLAGS) +virmocklibxl_la_LDFLAGS =3D -module -avoid-version \ + -rpath /evil/libtool/hack/to/force/shared/lib/creation + else ! WITH_LIBXL -EXTRA_DIST +=3D xlconfigtest.c +EXTRA_DIST +=3D xlconfigtest.c libxlxml2domconfigtest.c endif ! WITH_LIBXL =20 QEMUMONITORTESTUTILS_SOURCES =3D \ diff --git a/tests/libxlxml2domconfigdata/basic-hvm.json b/tests/libxlxml2d= omconfigdata/basic-hvm.json new file mode 100644 index 000000000..e4771920e --- /dev/null +++ b/tests/libxlxml2domconfigdata/basic-hvm.json @@ -0,0 +1,89 @@ +{ + "c_info": { + "type": "hvm", + "name": "test-hvm", + "uuid": "2147d599-9cc6-c0dc-92ab-4064b5446e9b" + }, + "b_info": { + "max_vcpus": 4, + "avail_vcpus": [ + 0, + 1, + 2, + 3 + ], + "max_memkb": 1048576, + "target_memkb": 1048576, + "video_memkb": 8192, + "shadow_memkb": 12288, + "device_model_version": "qemu_xen", + "device_model": "/usr/lib/xen/bin/qemu-system-i386", + "sched_params": { + "weight": 1000 + }, + "type.hvm": { + "pae": "True", + "apic": "True", + "acpi": "True", + "vga": { + "kind": "cirrus" + }, + "vnc": { + "enable": "True", + "listen": "0.0.0.0", + "findunused": "False" + }, + "sdl": { + "enable": "False" + }, + "spice": { + + }, + "boot": "c", + "rdm": { + + } + }, + "arch_arm": { + + } + }, + "disks": [ + { + "pdev_path": "/var/lib/xen/images/test-hvm.img", + "vdev": "hda", + "backend": "qdisk", + "format": "raw", + "removable": 1, + "readwrite": 1 + } + ], + "nics": [ + { + "devid": 0, + "mac": "00:16:3e:66:12:b4", + "bridge": "br0", + "script": "/etc/xen/scripts/vif-bridge", + "nictype": "vif_ioemu" + } + ], + "vfbs": [ + { + "devid": -1, + "vnc": { + "enable": "True", + "listen": "0.0.0.0", + "findunused": "False" + }, + "sdl": { + "enable": "False" + } + } + ], + "vkbs": [ + { + "devid": -1 + } + ], + "on_reboot": "restart" +} diff --git a/tests/libxlxml2domconfigdata/basic-hvm.xml b/tests/libxlxml2do= mconfigdata/basic-hvm.xml new file mode 100644 index 000000000..9dedf1729 --- /dev/null +++ b/tests/libxlxml2domconfigdata/basic-hvm.xml @@ -0,0 +1,36 @@ + + test-hvm + None + 2147d599-9cc6-c0dc-92ab-4064b5446e9b + 1048576 + 1048576 + 4 + destroy + restart + destroy + + + hvm + /usr/lib/xen/boot/hvmloader + + + + + + + + + /usr/lib/xen/bin/qemu-system-i386 + + + + + + + + +