[libvirt-ci PATCH] lcitool: Make Python 3 only
by Andrea Bolognani
All platforms we care about have Python 3 available.
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
guests/lcitool | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/guests/lcitool b/guests/lcitool
index ab3b95f..a30187b 100755
--- a/guests/lcitool
+++ b/guests/lcitool
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# lcitool - libvirt CI guest management tool
# Copyright (C) 2017-2018 Andrea Bolognani <abologna(a)redhat.com>
@@ -17,6 +17,7 @@
# with this program. If not, see <https://www.gnu.org/licenses/>.
import argparse
+import configparser
import distutils.spawn
import fnmatch
import json
@@ -31,12 +32,6 @@ import tempfile
import textwrap
import yaml
-# This is necessary to maintain Python 2.7 compatibility
-try:
- from configparser import ConfigParser
-except ImportError:
- from ConfigParser import SafeConfigParser as ConfigParser
-
class Util:
@@ -263,7 +258,7 @@ class Inventory:
ansible_cfg_path = os.path.join(base, "ansible.cfg")
try:
- parser = ConfigParser()
+ parser = configparser.ConfigParser()
parser.read(ansible_cfg_path)
inventory_path = parser.get("defaults", "inventory")
except Exception as ex:
--
2.25.4
4 years, 6 months
[GSoC] Introduction
by Prathamesh Chavan
Hello everyone,
I'm Prathamesh Chavan, a GSoC student this year, from IIT Kharagpur.
I'll be working along with my mentors: Erik Skultety, Martin
Kletzander, and Michal Prívozník on the project: 'Introducing Job
Control to Storage Driver'.
This is the first time I'm contributing to Libvirt as a GSoC student.
Any suggestions and comments regarding the project will be appreciated.
Thanks,
Prathamesh Chavan
4 years, 6 months
[PATCH v4 00/34] Configurable policy for handling deprecated interfaces
by Markus Armbruster
This series extends QMP introspection to cover deprecation.
Additionally, new option -compat lets you configure what to do when
deprecated interfaces get used. This is intended for testing users of
the management interfaces. It is experimental.
-compat deprecated-input=<in-policy> configures what to do when
deprecated input is received. Available policies:
* accept: Accept deprecated commands and arguments (default)
* reject: Reject them
* crash: Crash
-compat deprecated-output=<out-policy> configures what to do when
deprecated output is sent. Available output policies:
* accept: Emit deprecated command results and events (default)
* hide: Suppress them
For now, -compat covers only deprecated syntactic aspects of QMP. We
may want to extend it to cover semantic aspects, CLI, and experimental
features.
PATCH 01-04: Documentation fixes
PATCH 05-10: Test improvements
PATCH 11-24: Add feature flags to remaining user-defined types and to
struct members
PATCH 25-26: New special feature 'deprecated', visible in
introspection
PATCH 27-34: New -compat to set policy for handling stuff marked with
feature 'deprecated'
v4:
PATCH 05+07: Temporary memory leak plugged [Marc-André]
PATCH 23: Rewritten [Marc-André]
PATCH 24: Comment typo [Marc-André]
PATCH 30: Memory leaks plugged
v3:
* Rebased, non-trivial conflicts in PATCH 01+26+27+34 due to RST
conversion and code motion
* PATCH 28-29: Old PATCH 28 split up to ease review
* PATCH 30-31: New
* PATCH 32-33: Old PATCH 29 split up to ease review
Comparison to RFC (24 Oct 2019):
* Cover arguments and results in addition to commands and events
* Half-baked "[RFC PATCH 18/19] qapi: Include a warning in the
response to a deprecated command" dropped
See also last item of
Subject: Minutes of KVM Forum BoF on deprecating stuff
Date: Fri, 26 Oct 2018 16:03:51 +0200
Message-ID: <87mur0ls8o.fsf(a)dusky.pond.sub.org>
https://lists.nongnu.org/archive/html/qemu-devel/2018-10/msg05828.html
Cc: Lukáš Doktor <ldoktor(a)redhat.com>
Cc: libguestfs(a)redhat.com
Cc: libvir-list(a)redhat.com
Cc: Daniel P. Berrange <berrange(a)redhat.com>
Cc: Peter Krempa <pkrempa(a)redhat.com>
Cc: Kevin Wolf <kwolf(a)redhat.com>
Markus Armbruster (34):
qemu-doc: Belatedly document QMP command arg & result deprecation
qapi: Belatedly update doc comment for @wait deprecation
docs/devel/qapi-code-gen: Clarify allow-oob introspection
docs/devel/qapi-code-gen: Document 'features' introspection
tests/test-qmp-cmds: Factor out qmp_dispatch() test helpers
tests/test-qmp-cmds: Check responses more thoroughly
tests/test-qmp-cmds: Simplify test data setup
tests/test-qmp-event: Simplify test data setup
tests/test-qmp-event: Use qobject_is_equal()
tests/test-qmp-event: Check event is actually emitted
qapi/schema: Clean up around QAPISchemaEntity.connect_doc()
qapi: Add feature flags to remaining definitions
qapi: Consistently put @features parameter right after @ifcond
qapi/introspect: Rename *qlit* to reduce confusion
qapi/introspect: Factor out _make_tree()
qapi/schema: Change _make_features() to a take feature list
qapi/schema: Reorder classes so related ones are together
qapi/schema: Rename QAPISchemaObjectType{Variant,Variants}
qapi/schema: Call QAPIDoc.connect_member() in just one place
qapi: Add feature flags to struct members
qapi: Inline do_qmp_dispatch() into qmp_dispatch()
qapi: Simplify how qmp_dispatch() deals with QCO_NO_SUCCESS_RESP
qapi: Simplify how qmp_dispatch() gets the request ID
qapi: Replace qmp_dispatch()'s TODO comment by an explanation
qapi: New special feature flag "deprecated"
qapi: Mark deprecated QMP parts with feature 'deprecated'
qemu-options: New -compat to set policy for deprecated interfaces
qapi: Implement deprecated-output=hide for QMP command results
qapi: Implement deprecated-output=hide for QMP events
qapi: Implement deprecated-output=hide for QMP event data
qapi: Implement deprecated-output=hide for QMP introspection
qapi: Implement deprecated-input=reject for QMP commands
qapi: Implement deprecated-input=reject for QMP command arguments
qapi: New -compat deprecated-input=crash
docs/devel/qapi-code-gen.txt | 79 ++-
docs/system/deprecated.rst | 48 +-
tests/qapi-schema/doc-good.texi | 32 ++
qapi/block-core.json | 48 +-
qapi/block.json | 30 +-
qapi/char.json | 1 +
qapi/compat.json | 52 ++
qapi/control.json | 11 +-
qapi/introspect.json | 28 +-
qapi/machine.json | 34 +-
qapi/migration.json | 36 +-
qapi/misc.json | 13 +-
qapi/qapi-schema.json | 1 +
include/qapi/compat-policy.h | 20 +
include/qapi/qmp/dispatch.h | 1 +
include/qapi/qobject-input-visitor.h | 9 +
include/qapi/qobject-output-visitor.h | 9 +
include/qapi/visitor-impl.h | 3 +
include/qapi/visitor.h | 9 +
monitor/monitor-internal.h | 3 -
monitor/misc.c | 2 -
monitor/qmp-cmds-control.c | 102 +++-
qapi/qapi-visit-core.c | 9 +
qapi/qmp-dispatch.c | 149 +++---
qapi/qobject-input-visitor.c | 29 ++
qapi/qobject-output-visitor.c | 20 +
qemu-storage-daemon.c | 2 -
softmmu/vl.c | 17 +
tests/test-qmp-cmds.c | 249 +++++----
tests/test-qmp-event.c | 203 +++-----
qapi/Makefile.objs | 8 +-
qapi/trace-events | 1 +
qemu-options.hx | 22 +
scripts/qapi/commands.py | 20 +-
scripts/qapi/doc.py | 16 +-
scripts/qapi/events.py | 24 +-
scripts/qapi/expr.py | 14 +-
scripts/qapi/introspect.py | 104 ++--
scripts/qapi/schema.py | 488 ++++++++++--------
scripts/qapi/types.py | 8 +-
scripts/qapi/visit.py | 28 +-
tests/Makefile.include | 1 +
tests/qapi-schema/alternate-base.err | 2 +-
tests/qapi-schema/doc-good.json | 22 +-
tests/qapi-schema/doc-good.out | 18 +
.../qapi-schema/features-deprecated-type.err | 2 +
.../qapi-schema/features-deprecated-type.json | 3 +
.../qapi-schema/features-deprecated-type.out | 0
tests/qapi-schema/qapi-schema-test.json | 51 +-
tests/qapi-schema/qapi-schema-test.out | 48 +-
tests/qapi-schema/test-qapi.py | 26 +-
51 files changed, 1393 insertions(+), 762 deletions(-)
create mode 100644 qapi/compat.json
create mode 100644 include/qapi/compat-policy.h
create mode 100644 tests/qapi-schema/features-deprecated-type.err
create mode 100644 tests/qapi-schema/features-deprecated-type.json
create mode 100644 tests/qapi-schema/features-deprecated-type.out
--
2.21.1
4 years, 6 months
[libvirt PATCH] Revert "tests: Use qemu:///embed to simplify fakerootdir management"
by Andrea Bolognani
Turns out that it's not enough to pass the qemu:///embed root to
virQEMUDriverConfigNew(), you also have to make sure the same
string is copied into the virQEMUDriver structure yourself, and
not doing so in our case resulted in the cleanup never happening
and in distcheck failing because of that.
On the other hand, actually setting config->embeddedRoot would
result in different paths being generated for each test run, which
would obviously break qemuxml2argvtest, so that's not an option
either.
This reverts commit d98cc1968e7961cb02ed07406451a7b710cc2f24.
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
Pushed as a CI fix yesterday, forgot to forward it to the list.
tests/qemuhotplugtest.c | 15 ++++++++++++++
tests/qemumemlocktest.c | 20 ++++++++++++++++++-
tests/qemuxml2argvtest.c | 16 +++++++++++++++
tests/qemuxml2xmltest.c | 16 +++++++++++++++
tests/testutilsqemu.c | 43 ++++++++++++++++++++++++++--------------
5 files changed, 94 insertions(+), 16 deletions(-)
diff --git a/tests/qemuhotplugtest.c b/tests/qemuhotplugtest.c
index a67b6ce607..cf87de187f 100644
--- a/tests/qemuhotplugtest.c
+++ b/tests/qemuhotplugtest.c
@@ -594,6 +594,8 @@ testQemuHotplugCpuIndividual(const void *opaque)
return ret;
}
+#define FAKEROOTDIRTEMPLATE abs_builddir "/fakerootdir-XXXXXX"
+
static int
mymain(void)
@@ -602,8 +604,18 @@ mymain(void)
int ret = 0;
struct qemuHotplugTestData data = {0};
struct testQemuHotplugCpuParams cpudata;
+ g_autofree char *fakerootdir = NULL;
g_autoptr(virQEMUDriverConfig) cfg = NULL;
+ fakerootdir = g_strdup(FAKEROOTDIRTEMPLATE);
+
+ if (!g_mkdtemp(fakerootdir)) {
+ fprintf(stderr, "Cannot create fakerootdir");
+ abort();
+ }
+
+ g_setenv("LIBVIRT_FAKE_ROOT_DIR", fakerootdir, TRUE);
+
if (qemuTestDriverInit(&driver) < 0)
return EXIT_FAILURE;
@@ -879,6 +891,9 @@ mymain(void)
DO_TEST_CPU_INDIVIDUAL("ppc64-modern-individual", "16-22", true, true, true);
DO_TEST_CPU_INDIVIDUAL("ppc64-modern-individual", "17", true, true, true);
+ if (getenv("LIBVIRT_SKIP_CLEANUP") == NULL)
+ virFileDeleteTree(fakerootdir);
+
qemuTestDriverFree(&driver);
virObjectUnref(data.vm);
return (ret == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
diff --git a/tests/qemumemlocktest.c b/tests/qemumemlocktest.c
index 4813c7beb0..3f18fed1c3 100644
--- a/tests/qemumemlocktest.c
+++ b/tests/qemumemlocktest.c
@@ -51,14 +51,28 @@ testCompareMemLock(const void *data)
return ret;
}
+# define FAKEROOTDIRTEMPLATE abs_builddir "/fakerootdir-XXXXXX"
+
static int
mymain(void)
{
int ret = 0;
+ char *fakerootdir;
virQEMUCapsPtr qemuCaps = NULL;
- if (qemuTestDriverInit(&driver) < 0)
+ fakerootdir = g_strdup(FAKEROOTDIRTEMPLATE);
+
+ if (!g_mkdtemp(fakerootdir)) {
+ fprintf(stderr, "Cannot create fakerootdir");
+ abort();
+ }
+
+ g_setenv("LIBVIRT_FAKE_ROOT_DIR", fakerootdir, TRUE);
+
+ if (qemuTestDriverInit(&driver) < 0) {
+ VIR_FREE(fakerootdir);
return EXIT_FAILURE;
+ }
driver.privileged = true;
@@ -136,7 +150,11 @@ mymain(void)
cleanup:
virObjectUnref(qemuCaps);
+ if (getenv("LIBVIRT_SKIP_CLEANUP") == NULL)
+ virFileDeleteTree(fakerootdir);
+
qemuTestDriverFree(&driver);
+ VIR_FREE(fakerootdir);
return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
}
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index 8bd6102d26..04febd1b0c 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -609,12 +609,24 @@ testInfoSetPaths(struct testQemuInfo *info,
abs_srcdir, info->name, suffix ? suffix : "");
}
+# define FAKEROOTDIRTEMPLATE abs_builddir "/fakerootdir-XXXXXX"
+
static int
mymain(void)
{
int ret = 0;
+ char *fakerootdir;
virHashTablePtr capslatest = NULL;
+ fakerootdir = g_strdup(FAKEROOTDIRTEMPLATE);
+
+ if (!g_mkdtemp(fakerootdir)) {
+ fprintf(stderr, "Cannot create fakerootdir");
+ abort();
+ }
+
+ g_setenv("LIBVIRT_FAKE_ROOT_DIR", fakerootdir, TRUE);
+
/* Set the timezone because we are mocking the time() function.
* If we don't do that, then localtime() may return unpredictable
* results. In order to detect things that just work by a blind
@@ -3220,8 +3232,12 @@ mymain(void)
DO_TEST_CAPS_LATEST("virtio-9p-multidevs");
+ if (getenv("LIBVIRT_SKIP_CLEANUP") == NULL)
+ virFileDeleteTree(fakerootdir);
+
VIR_FREE(driver.config->nbdTLSx509certdir);
qemuTestDriverFree(&driver);
+ VIR_FREE(fakerootdir);
virHashFree(capslatest);
virFileWrapperClearPrefixes();
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c
index 6a0adab603..86f3d2c1f3 100644
--- a/tests/qemuxml2xmltest.c
+++ b/tests/qemuxml2xmltest.c
@@ -126,10 +126,13 @@ testInfoSetStatusPaths(struct testQemuInfo *info)
}
+# define FAKEROOTDIRTEMPLATE abs_builddir "/fakerootdir-XXXXXX"
+
static int
mymain(void)
{
int ret = 0;
+ char *fakerootdir;
virQEMUDriverConfigPtr cfg = NULL;
virHashTablePtr capslatest = NULL;
@@ -137,6 +140,15 @@ mymain(void)
if (!capslatest)
return EXIT_FAILURE;
+ fakerootdir = g_strdup(FAKEROOTDIRTEMPLATE);
+
+ if (!g_mkdtemp(fakerootdir)) {
+ fprintf(stderr, "Cannot create fakerootdir");
+ abort();
+ }
+
+ g_setenv("LIBVIRT_FAKE_ROOT_DIR", fakerootdir, TRUE);
+
/* Required for tpm-emulator tests
*/
virFileWrapperAddPrefix(SYSCONFDIR "/qemu/firmware",
@@ -1466,8 +1478,12 @@ mymain(void)
DO_TEST_CAPS_LATEST("virtio-9p-multidevs");
+ if (getenv("LIBVIRT_SKIP_CLEANUP") == NULL)
+ virFileDeleteTree(fakerootdir);
+
virHashFree(capslatest);
qemuTestDriverFree(&driver);
+ VIR_FREE(fakerootdir);
virFileWrapperClearPrefixes();
return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
diff --git a/tests/testutilsqemu.c b/tests/testutilsqemu.c
index c7983f0014..9f9eb4033c 100644
--- a/tests/testutilsqemu.c
+++ b/tests/testutilsqemu.c
@@ -307,10 +307,11 @@ qemuTestParseCapabilitiesArch(virArch arch,
void qemuTestDriverFree(virQEMUDriver *driver)
{
- if (g_getenv("LIBVIRT_SKIP_CLEANUP") == NULL)
- virFileDeleteTree(driver->embeddedRoot);
-
virMutexDestroy(&driver->lock);
+ if (driver->config) {
+ virFileDeleteTree(driver->config->stateDir);
+ virFileDeleteTree(driver->config->configDir);
+ }
virObjectUnref(driver->qemuCapsCache);
virObjectUnref(driver->xmlopt);
virObjectUnref(driver->caps);
@@ -369,21 +370,14 @@ int qemuTestCapsCacheInsert(virFileCachePtr cache,
}
-# define FAKEROOTDIRTEMPLATE abs_builddir "/fakerootdir-XXXXXX"
+# define STATEDIRTEMPLATE abs_builddir "/qemustatedir-XXXXXX"
+# define CONFIGDIRTEMPLATE abs_builddir "/qemuconfigdir-XXXXXX"
int qemuTestDriverInit(virQEMUDriver *driver)
{
virSecurityManagerPtr mgr = NULL;
- g_autofree char *fakerootdir = NULL;
-
- fakerootdir = g_strdup(FAKEROOTDIRTEMPLATE);
-
- if (!g_mkdtemp(fakerootdir)) {
- fprintf(stderr, "Cannot create fakerootdir");
- abort();
- }
-
- g_setenv("LIBVIRT_FAKE_ROOT_DIR", fakerootdir, TRUE);
+ char statedir[] = STATEDIRTEMPLATE;
+ char configdir[] = CONFIGDIRTEMPLATE;
memset(driver, 0, sizeof(*driver));
@@ -397,16 +391,35 @@ int qemuTestDriverInit(virQEMUDriver *driver)
return -1;
driver->hostarch = virArchFromHost();
- driver->config = virQEMUDriverConfigNew(false, fakerootdir);
+ driver->config = virQEMUDriverConfigNew(false, NULL);
if (!driver->config)
goto error;
+ /* Do this early so that qemuTestDriverFree() doesn't see (unlink) the real
+ * dirs. */
+ VIR_FREE(driver->config->stateDir);
+ VIR_FREE(driver->config->configDir);
+
/* Overwrite some default paths so it's consistent for tests. */
VIR_FREE(driver->config->libDir);
VIR_FREE(driver->config->channelTargetDir);
driver->config->libDir = g_strdup("/tmp/lib");
driver->config->channelTargetDir = g_strdup("/tmp/channel");
+ if (!g_mkdtemp(statedir)) {
+ fprintf(stderr, "Cannot create fake stateDir");
+ goto error;
+ }
+
+ driver->config->stateDir = g_strdup(statedir);
+
+ if (!g_mkdtemp(configdir)) {
+ fprintf(stderr, "Cannot create fake configDir");
+ goto error;
+ }
+
+ driver->config->configDir = g_strdup(configdir);
+
driver->caps = testQemuCapsInit();
if (!driver->caps)
goto error;
--
2.25.4
4 years, 6 months
[libvirt PATCH] qemu: Skip pre-creation of NVME disk
by Han Han
Unlike the file based disk, NVME disk cannot be pre-created by libvirt.
So skip the step of pre-creation.
https://bugzilla.redhat.com/show_bug.cgi?id=1823639
Signed-off-by: Han Han <hhan(a)redhat.com>
---
src/qemu/qemu_migration.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index 02e8271e..e4bd9077 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -221,13 +221,13 @@ qemuMigrationDstPrecreateDisk(virConnectPtr conn,
break;
case VIR_STORAGE_TYPE_NETWORK:
- VIR_DEBUG("Skipping creation of network disk '%s'",
+ case VIR_STORAGE_TYPE_NVME:
+ VIR_DEBUG("Skipping creation of disk '%s'",
disk->dst);
return 0;
case VIR_STORAGE_TYPE_BLOCK:
case VIR_STORAGE_TYPE_DIR:
- case VIR_STORAGE_TYPE_NVME:
case VIR_STORAGE_TYPE_NONE:
case VIR_STORAGE_TYPE_LAST:
virReportError(VIR_ERR_INTERNAL_ERROR,
--
2.25.0
4 years, 6 months
[libvirt PATCH] libxl: vga.kind none when no device specified
by Artur Puzio
When no video device is specified in config we should set both
hvm.nographic to 1 and hvm.vga.kind to NONE.
Without hvm.vga.kind=LIBXL_VGA_INTERFACE_TYPE_NONE both -nographic and
-device 'cirrus-vga' are on qemu cmdline.
---
src/libxl/libxl_conf.c | 1 +
tests/libxlxml2domconfigdata/fullvirt-acpi-slic.json | 3 +++
tests/libxlxml2domconfigdata/fullvirt-cpuid.json | 3 +++
3 files changed, 7 insertions(+)
diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c
index 458dfc2399..a0059fc2a7 100644
--- a/src/libxl/libxl_conf.c
+++ b/src/libxl/libxl_conf.c
@@ -2404,6 +2404,7 @@ libxlMakeVideo(virDomainDefPtr def, libxl_domain_config *d_config)
b_info->video_memkb = def->videos[0]->vram;
} else {
libxl_defbool_set(&b_info->u.hvm.nographic, 1);
+ b_info->u.hvm.vga.kind = LIBXL_VGA_INTERFACE_TYPE_NONE;
}
return 0;
diff --git a/tests/libxlxml2domconfigdata/fullvirt-acpi-slic.json b/tests/libxlxml2domconfigdata/fullvirt-acpi-slic.json
index e804389fea..f16b4a971a 100644
--- a/tests/libxlxml2domconfigdata/fullvirt-acpi-slic.json
+++ b/tests/libxlxml2domconfigdata/fullvirt-acpi-slic.json
@@ -20,6 +20,9 @@
"acpi": "True",
"acpi_firmware": "/path/to/slic.dat",
"nographic": "True",
+ "vga": {
+ "kind": "none"
+ },
"vnc": {
"enable": "False"
},
diff --git a/tests/libxlxml2domconfigdata/fullvirt-cpuid.json b/tests/libxlxml2domconfigdata/fullvirt-cpuid.json
index d46b464642..ddc423bca7 100644
--- a/tests/libxlxml2domconfigdata/fullvirt-cpuid.json
+++ b/tests/libxlxml2domconfigdata/fullvirt-cpuid.json
@@ -27,6 +27,9 @@
"apic": "True",
"acpi": "True",
"nographic": "True",
+ "vga": {
+ "kind": "none"
+ },
"vnc": {
"enable": "False"
},
--
2.26.2
4 years, 6 months
[PATCH] tests: Fix the libxl xml2domconfig test
by Jim Fehlig
Commit a13b2905f7 missed an adjustment to a test that is only run when
building against xen <= 4.9, where LIBXL_HAVE_BUILDINFO_NESTED_HVM is
not defined. Adjust fullvirt-cpuid-legacy-nest test similar to the others.
Signed-off-by: Jim Fehlig <jfehlig(a)suse.com>
---
Pushing under the build-breaker rule.
tests/libxlxml2domconfigdata/fullvirt-cpuid-legacy-nest.json | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tests/libxlxml2domconfigdata/fullvirt-cpuid-legacy-nest.json b/tests/libxlxml2domconfigdata/fullvirt-cpuid-legacy-nest.json
index cdc8b9867d..0944476151 100644
--- a/tests/libxlxml2domconfigdata/fullvirt-cpuid-legacy-nest.json
+++ b/tests/libxlxml2domconfigdata/fullvirt-cpuid-legacy-nest.json
@@ -27,6 +27,9 @@
"acpi": "True",
"nested_hvm": "False",
"nographic": "True",
+ "vga": {
+ "kind": "none"
+ },
"vnc": {
"enable": "False"
},
--
2.26.0
4 years, 6 months
[libvirt PATCH v2] libxl: vga.kind none when no device specified
by Artur Puzio
When no video device is specified in config we should set both
hvm.nographic to 1 and hvm.vga.kind to NONE.
Without hvm.vga.kind=LIBXL_VGA_INTERFACE_TYPE_NONE both -nographic and
-device 'cirrus-vga' are on qemu cmdline.
Signed-off-by: Artur Puzio <contact(a)puzio.waw.pl>
---
src/libxl/libxl_conf.c | 1 +
tests/libxlxml2domconfigdata/fullvirt-acpi-slic.json | 3 +++
tests/libxlxml2domconfigdata/fullvirt-cpuid.json | 3 +++
3 files changed, 7 insertions(+)
diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c
index 458dfc2399..a0059fc2a7 100644
--- a/src/libxl/libxl_conf.c
+++ b/src/libxl/libxl_conf.c
@@ -2404,6 +2404,7 @@ libxlMakeVideo(virDomainDefPtr def, libxl_domain_config *d_config)
b_info->video_memkb = def->videos[0]->vram;
} else {
libxl_defbool_set(&b_info->u.hvm.nographic, 1);
+ b_info->u.hvm.vga.kind = LIBXL_VGA_INTERFACE_TYPE_NONE;
}
return 0;
diff --git a/tests/libxlxml2domconfigdata/fullvirt-acpi-slic.json b/tests/libxlxml2domconfigdata/fullvirt-acpi-slic.json
index e804389fea..f16b4a971a 100644
--- a/tests/libxlxml2domconfigdata/fullvirt-acpi-slic.json
+++ b/tests/libxlxml2domconfigdata/fullvirt-acpi-slic.json
@@ -20,6 +20,9 @@
"acpi": "True",
"acpi_firmware": "/path/to/slic.dat",
"nographic": "True",
+ "vga": {
+ "kind": "none"
+ },
"vnc": {
"enable": "False"
},
diff --git a/tests/libxlxml2domconfigdata/fullvirt-cpuid.json b/tests/libxlxml2domconfigdata/fullvirt-cpuid.json
index d46b464642..ddc423bca7 100644
--- a/tests/libxlxml2domconfigdata/fullvirt-cpuid.json
+++ b/tests/libxlxml2domconfigdata/fullvirt-cpuid.json
@@ -27,6 +27,9 @@
"apic": "True",
"acpi": "True",
"nographic": "True",
+ "vga": {
+ "kind": "none"
+ },
"vnc": {
"enable": "False"
},
--
2.26.2
4 years, 6 months
[PATCH 00/20] qemu: Remove one of last two instances of -drive if=none usage
by Peter Krempa
QEMU want's to deprecate -drive if=none. Stop clearing
QEMU_CAPS_BLOCKDEV when SD cards are used. Please see 17/20 and 20/20
for more explanation.
Obviously few cleanups snuck in as well.
Peter Krempa (20):
qemuxml2(argv|xml): Modernize 'blkdeviotune' tests
qemuxml2(argv|xml): Modernize 'discard'/'detect-zero' tests
qemuValidateDomainDeviceDefDisk: Separate disk frontend config
validation
qemu: validate: Validate blkdeviotune settings in the validator
qemu: Move disk config validation to
qemuValidateDomainDeviceDefDiskFrontend
qemuCheckDiskConfig: Remove and untangle callers
qemu: Rename qemuDiskBusNeedsDriveArg to qemuDiskBusIsSD
qemuBuildDiskCommandLine: Clarify logic around building -device for
disks
qemuBuildDriveStr: Refactor formatting of command line for 'sd' cards
qemuBuildDiskDeviceStr: Use XML disk bus type names in error message
qemu: command: Remove 'virDomainDiskQEMUBus' enum converters
qemuDomainSetBlockThreshold: Call qemuBlockNodeNamesDetect only
without blockdev
qemuDomainValidateStorageSource: Extract check for BLOCKDEV capability
qemuDomainValidateStorageSource: Allow masking out blockdev support
tests: Add tests for a virtio and sd disk in a single machine
qemu: Forbid 'cdrom' on 'sd' bus
qemu: Refuse blockjobs on disk bus='sd' with -blockdev
qemu: Handle cases when 'qomName' isn't present
qemu: Prepare for 'sd' card use together with blockdev
qemu: process: Don't clear QEMU_CAPS_BLOCKDEV when SD card is present
src/qemu/qemu_backup.c | 3 +
src/qemu/qemu_checkpoint.c | 3 +
src/qemu/qemu_command.c | 404 ++----------------
src/qemu/qemu_command.h | 7 +-
src/qemu/qemu_domain.c | 65 ++-
src/qemu/qemu_domain.h | 7 +-
src/qemu/qemu_driver.c | 46 +-
src/qemu/qemu_hotplug.c | 7 +-
src/qemu/qemu_process.c | 17 +-
src/qemu/qemu_validate.c | 383 +++++++++++++++--
src/qemu/qemu_validate.h | 1 +
tests/qemublocktest.c | 7 +-
... blkdeviotune-group-num.x86_64-4.1.0.args} | 26 +-
.../blkdeviotune-group-num.x86_64-latest.args | 50 +++
.../blkdeviotune-group-num.xml | 5 +-
...blkdeviotune-max-length.x86_64-4.1.0.args} | 26 +-
...blkdeviotune-max-length.x86_64-latest.args | 50 +++
.../blkdeviotune-max-length.xml | 5 +-
...rgs => blkdeviotune-max.x86_64-4.1.0.args} | 26 +-
.../blkdeviotune-max.x86_64-latest.args | 50 +++
tests/qemuxml2argvdata/blkdeviotune-max.xml | 5 +-
.../disk-arm-virtio-sd.aarch64-4.0.0.args | 39 ++
.../disk-arm-virtio-sd.aarch64-latest.args | 43 ++
tests/qemuxml2argvdata/disk-arm-virtio-sd.xml | 36 ++
.../disk-cdrom-bus-other.x86_64-latest.args | 13 +-
.../qemuxml2argvdata/disk-cdrom-bus-other.xml | 11 -
.../disk-detect-zeroes.x86_64-2.12.0.args | 1 +
tests/qemuxml2argvdata/disk-detect-zeroes.xml | 5 +-
...rd.args => disk-discard.x86_64-4.1.0.args} | 22 +-
.../disk-discard.x86_64-latest.args | 46 ++
tests/qemuxml2argvtest.c | 26 +-
... blkdeviotune-group-num.x86_64-latest.xml} | 0
...blkdeviotune-max-length.x86_64-latest.xml} | 0
...xml => blkdeviotune-max.x86_64-latest.xml} | 0
...une.xml => blkdeviotune.x86_64-latest.xml} | 7 +-
.../disk-arm-virtio-sd.aarch64-latest.xml | 41 ++
.../disk-cdrom-bus-other.xml | 11 -
...l => disk-detect-zeroes.x86_64-latest.xml} | 0
...ard.xml => disk-discard.x86_64-latest.xml} | 7 +-
tests/qemuxml2xmltest.c | 14 +-
40 files changed, 958 insertions(+), 557 deletions(-)
rename tests/qemuxml2argvdata/{blkdeviotune-group-num.args => blkdeviotune-group-num.x86_64-4.1.0.args} (69%)
create mode 100644 tests/qemuxml2argvdata/blkdeviotune-group-num.x86_64-latest.args
rename tests/qemuxml2argvdata/{blkdeviotune-max-length.args => blkdeviotune-max-length.x86_64-4.1.0.args} (71%)
create mode 100644 tests/qemuxml2argvdata/blkdeviotune-max-length.x86_64-latest.args
rename tests/qemuxml2argvdata/{blkdeviotune-max.args => blkdeviotune-max.x86_64-4.1.0.args} (67%)
create mode 100644 tests/qemuxml2argvdata/blkdeviotune-max.x86_64-latest.args
create mode 100644 tests/qemuxml2argvdata/disk-arm-virtio-sd.aarch64-4.0.0.args
create mode 100644 tests/qemuxml2argvdata/disk-arm-virtio-sd.aarch64-latest.args
create mode 100644 tests/qemuxml2argvdata/disk-arm-virtio-sd.xml
rename tests/qemuxml2argvdata/{disk-discard.args => disk-discard.x86_64-4.1.0.args} (59%)
create mode 100644 tests/qemuxml2argvdata/disk-discard.x86_64-latest.args
rename tests/qemuxml2xmloutdata/{blkdeviotune-group-num.xml => blkdeviotune-group-num.x86_64-latest.xml} (100%)
rename tests/qemuxml2xmloutdata/{blkdeviotune-max-length.xml => blkdeviotune-max-length.x86_64-latest.xml} (100%)
rename tests/qemuxml2xmloutdata/{blkdeviotune-max.xml => blkdeviotune-max.x86_64-latest.xml} (100%)
rename tests/qemuxml2xmloutdata/{blkdeviotune.xml => blkdeviotune.x86_64-latest.xml} (88%)
create mode 100644 tests/qemuxml2xmloutdata/disk-arm-virtio-sd.aarch64-latest.xml
rename tests/qemuxml2xmloutdata/{disk-detect-zeroes.xml => disk-detect-zeroes.x86_64-latest.xml} (100%)
rename tests/qemuxml2xmloutdata/{disk-discard.xml => disk-discard.x86_64-latest.xml} (87%)
--
2.26.2
4 years, 6 months