[libvirt] [PATCH 00/20] cpu_map.xml: Make CPU definitions easier to review
by Jiri Denemark
Inheritance among CPU model is cool but it makes reviewing CPU model
definitions and comparing them to CPU models from QEMU rather hard and
unpleasant. Let's define all CPU models from scratch with a sorted list
of features.
Jiri Denemark (20):
cpu_map.xml: Sort features in x86 CPU models
cpu_map.xml: Expand 486 CPU model
cpu_map.xml: Expand pentium CPU model
cpu_map.xml: Expand pentium2 CPU model
cpu_map.xml: Expand pentiumpro CPU model
cpu_map.xml: Expand coreduo CPU model
cpu_map.xml: Expand n270 CPU model
cpu_map.xml: Expand qemu32 CPU model
cpu_map.xml: Expand kvm32 CPU model
cpu_map.xml: Expand cpu64-rhel5 CPU model
cpu_map.xml: Expand kvm64 CPU model
cpu_map.xml: Expand Conroe CPU model
cpu_map.xml: Expand Penryn CPU model
cpu_map.xml: Expand Nehalem CPU model
cpu_map.xml: Expand Westmere CPU model
cpu_map.xml: Expand SandyBridge CPU model
cpu_map.xml: Expand Haswell-noTSX CPU model
cpu_map.xml: Expand Opteron_G1 CPU model
cpu_map.xml: Expand Opteron_G2 CPU model
cpu_map.xml: Expand Opteron_G4 CPU model
src/cpu/cpu_map.xml | 829 +++++++++++++++++++++++++++++++++++++++++++++-------
1 file changed, 729 insertions(+), 100 deletions(-)
--
2.4.4
9 years, 4 months
[libvirt] [PATCH] Revert "Introduce QEMU_CAPS_ARM_VIRT_PCI"
by Peter Krempa
The capability was not used up to the feature freeze.
This reverts commit 7f3515b4bb677d0ead1887547efc844e4761268a.
---
src/qemu/qemu_capabilities.c | 4 ----
src/qemu/qemu_capabilities.h | 1 -
2 files changed, 5 deletions(-)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index e7002a3..27686c3 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -287,7 +287,6 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST,
"aarch64-off",
"vhost-user-multiqueue", /* 190 */
- "arm-virt-pci",
);
@@ -1337,9 +1336,6 @@ virQEMUCapsComputeCmdFlags(const char *help,
virQEMUCapsSet(qemuCaps, QEMU_CAPS_VNC_SHARE_POLICY);
}
- if (version >= 2003000)
- virQEMUCapsSet(qemuCaps, QEMU_CAPS_ARM_VIRT_PCI);
-
return 0;
}
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index f4180a8..30aa504 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -230,7 +230,6 @@ typedef enum {
QEMU_CAPS_DEVICE_PCI_SERIAL = 188, /* -device pci-serial */
QEMU_CAPS_CPU_AARCH64_OFF = 189, /* -cpu ...,aarch64=off */
QEMU_CAPS_VHOSTUSER_MULTIQUEUE = 190, /* vhost-user with -netdev queues= */
- QEMU_CAPS_ARM_VIRT_PCI = 191, /* ARM 'virt' machine has PCI bus */
QEMU_CAPS_LAST, /* this must always be the last item */
} virQEMUCapsFlags;
--
2.4.1
9 years, 4 months
[libvirt] [PATCH] storage: add RBD support to disk source pool translation
by Thibault VINCENT
Hello,
We needed this to avoid redundancies when defining domains with RBD backends,
because monitor list and authentication secret could not be pulled from the
storage pool.
I didn't find any bit of documentation to update, actually it already implies
that disks with source type 'volume' would work with all kinds of backing
pools. But mpath, sheepdog, and gluster would still require an implementation
if it's possible.
Using RBD volumes this way still has a limitation, we cannot list snapshots in
libvirt pools. Whereas they could be accessed read-only if the domain is using
a network source explicitely with a 'snapshot' attribute.
How could we implement this so that snapshots are seen as pool volumes? There
are real use-cases for this like attaching to a VM a backup from it's own
disks. Also it would work the same way with ZFS snapshots, but AFAIK not for
LVM pools.
Cheers
Thibault VINCENT (1):
storage: add RBD support to generic disk source pool translation
src/storage/storage_driver.c | 49 +++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 48 insertions(+), 1 deletion(-)
--
2.1.4
9 years, 4 months
[libvirt] [PATCH 0/2][1.2.17] qemu: fix address allocation on chardev hotplug
by Ján Tomko
For bug https://bugzilla.redhat.com/show_bug.cgi?id=1230039
Patch 1/2 fixes a regression in channel device hotplug which was introduced
in the last release and I would like to get it fixed before the next one.
Patch 2/2 is not that important, but still a bugfix.
Luyao Huang (1):
qemu: fix address allocation on chardev attach
Ján Tomko (1):
qemu: properly free addresses on non-serial chardev unplug
src/qemu/qemu_command.c | 4 +++
src/qemu/qemu_hotplug.c | 78 +++++++++++++++++++++++++++----------------------
2 files changed, 47 insertions(+), 35 deletions(-)
--
2.3.6
9 years, 4 months
[libvirt] [PATCH] conf: qemu: Taint VMs using custom device tree blob
by Peter Krempa
Using a custom device tree image may cause unexpected behavior in
architectures that use this approach to detect platform devices. Since
usually the device tree is generated by qemu and thus it's not normally
used let's taint VMs using it to make it obvious as a possible source of
problems.
---
src/conf/domain_conf.c | 3 ++-
src/conf/domain_conf.h | 1 +
src/qemu/qemu_domain.c | 3 +++
3 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 2c3b96b..9280a76 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -102,7 +102,8 @@ VIR_ENUM_IMPL(virDomainTaint, VIR_DOMAIN_TAINT_LAST,
"external-launch",
"host-cpu",
"hook-script",
- "cdrom-passthrough");
+ "cdrom-passthrough",
+ "custom-dtb");
VIR_ENUM_IMPL(virDomainVirt, VIR_DOMAIN_VIRT_LAST,
"qemu",
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index aeba5a5..2bdbff1 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -2305,6 +2305,7 @@ typedef enum {
VIR_DOMAIN_TAINT_HOST_CPU, /* Host CPU passthrough in use */
VIR_DOMAIN_TAINT_HOOK, /* Domain (possibly) changed via hook script */
VIR_DOMAIN_TAINT_CDROM_PASSTHROUGH,/* CDROM passthrough */
+ VIR_DOMAIN_TAINT_CUSTOM_DTB, /* Custom device tree blob was specifed */
VIR_DOMAIN_TAINT_LAST
} virDomainTaintFlags;
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 6213fd9..22ffa83 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -2105,6 +2105,9 @@ void qemuDomainObjCheckTaint(virQEMUDriverPtr driver,
for (i = 0; i < obj->def->nnets; i++)
qemuDomainObjCheckNetTaint(driver, obj, obj->def->nets[i], logFD);
+ if (obj->def->os.dtb)
+ qemuDomainObjTaint(driver, obj, VIR_DOMAIN_TAINT_CUSTOM_DTB, logFD);
+
virObjectUnref(cfg);
}
--
2.4.1
9 years, 4 months
[libvirt] [PATCH] qemu: fix not end the job after use OpenGraphics(FD) and get fail when exit monitor
by Luyao Huang
If guest unexpect exit(qemu process be killed) and get failed when
exit the monitor, guest job still handled by old function, this will
make guest cannot start later.
Need call qemuDomainObjEndJob to release job status before unref vm.
Signed-off-by: Luyao Huang <lhuang(a)redhat.com>
---
src/qemu/qemu_driver.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 2b530c8..b1c9f08 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -17255,10 +17255,8 @@ qemuDomainOpenGraphics(virDomainPtr dom,
qemuDomainObjEnterMonitor(driver, vm);
ret = qemuMonitorOpenGraphics(priv->mon, protocol, fd, "graphicsfd",
(flags & VIR_DOMAIN_OPEN_GRAPHICS_SKIPAUTH) != 0);
- if (qemuDomainObjExitMonitor(driver, vm) < 0) {
+ if (qemuDomainObjExitMonitor(driver, vm) < 0)
ret = -1;
- goto cleanup;
- }
qemuDomainObjEndJob(driver, vm);
cleanup:
@@ -17327,10 +17325,8 @@ qemuDomainOpenGraphicsFD(virDomainPtr dom,
qemuDomainObjEnterMonitor(driver, vm);
ret = qemuMonitorOpenGraphics(priv->mon, protocol, pair[1], "graphicsfd",
(flags & VIR_DOMAIN_OPEN_GRAPHICS_SKIPAUTH));
- if (qemuDomainObjExitMonitor(driver, vm) < 0) {
+ if (qemuDomainObjExitMonitor(driver, vm) < 0)
ret = -1;
- goto cleanup;
- }
qemuDomainObjEndJob(driver, vm);
if (ret < 0)
goto cleanup;
--
1.8.3.1
9 years, 4 months
[libvirt] [PATCH 0/2] conf: qemu: Fix memory auditing
by Peter Krempa
Peter Krempa (2):
conf: audit: Audit physical memory size rather than balloon request
qemu: Audit memory size with memory hotplug operations
src/conf/domain_audit.c | 3 ++-
src/qemu/qemu_driver.c | 6 +-----
src/qemu/qemu_hotplug.c | 20 ++++++++++++++------
3 files changed, 17 insertions(+), 12 deletions(-)
--
2.4.1
9 years, 4 months
[libvirt] [PATCHv2] virt-aa-helper: Fix permissions for vhost-user socket files
by Michal Dubiel
QEMU working in vhost-user mode communicates with the other end (i.e.
some virtual router application) via unix domain sockets. This requires
that permissions for the socket files are correctly written into
/etc/apparmor.d/libvirt/libvirt-UUID.files.
Signed-off-by: Michal Dubiel <md(a)semihalf.com>
---
Changes since v1:
- Removed unnecessary stat() call and dead 'else' block
src/security/virt-aa-helper.c | 25 ++++++++++++-------------
1 file changed, 12 insertions(+), 13 deletions(-)
diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c
index 35423b5..f39932e 100644
--- a/src/security/virt-aa-helper.c
+++ b/src/security/virt-aa-helper.c
@@ -32,7 +32,6 @@
#include <unistd.h>
#include <errno.h>
#include <sys/types.h>
-#include <sys/stat.h>
#include <fcntl.h>
#include <getopt.h>
#include <sys/utsname.h>
@@ -542,7 +541,6 @@ array_starts_with(const char *str, const char * const *arr, const long size)
static int
valid_path(const char *path, const bool readonly)
{
- struct stat sb;
int npaths, opaths;
const char * const restricted[] = {
"/bin/",
@@ -592,17 +590,6 @@ valid_path(const char *path, const bool readonly)
if (!virFileExists(path)) {
vah_warning(_("path does not exist, skipping file type checks"));
- } else {
- if (stat(path, &sb) == -1)
- return -1;
-
- switch (sb.st_mode & S_IFMT) {
- case S_IFSOCK:
- return 1;
- break;
- default:
- break;
- }
}
opaths = sizeof(override)/sizeof(*(override));
@@ -1101,6 +1088,18 @@ get_files(vahControl * ctl)
}
}
+ for (i = 0; i < ctl->def->nnets; i++) {
+ if (ctl->def->nets[i] &&
+ ctl->def->nets[i]->type == VIR_DOMAIN_NET_TYPE_VHOSTUSER &&
+ ctl->def->nets[i]->data.vhostuser) {
+ virDomainChrSourceDefPtr vhu = ctl->def->nets[i]->data.vhostuser;
+
+ if (vah_add_file_chardev(&buf, vhu->data.nix.path, "rw",
+ vhu->type) != 0)
+ goto cleanup;
+ }
+ }
+
if (ctl->def->virtType == VIR_DOMAIN_VIRT_KVM) {
for (i = 0; i < ctl->def->nnets; i++) {
virDomainNetDefPtr net = ctl->def->nets[i];
--
1.9.1
9 years, 4 months
[libvirt] [PATCH sandbox] Ensure libvirt-sandbox-init-common uses correct ld-linux
by Daniel P. Berrange
The libc.so library requires certainly functionality to be
provided by the ld-linux.so library. The ld-linux.so is loaded
by the kernel based on the PT_INTERP ELF section, and as such
LD_LIBRARY_PATH has no effect.
So, although libvirt-sandbox-init-{qemu,lxc} set LD_LIBRARY_PATH
to force use of the libs from the host OS image, the common
init program was stil using the ld-linux.so from the guest OS
image. Sometimes this works, sometimes it breaks.
When trying to run Fedora 19 as the root filesystem from a
Fedora 22 host, it would break thus:
/etc/libvirt-sandbox/scratch/.libs/libvirt-sandbox-init-common: relocation error: /etc/libvirt-sandbox/scratch/.libs/libc.so.6: symbol _dl_find_dso_for_object, version GLIBC_PRIVATE not defined in file ld-linux-x86-64.so.2 with link time reference
To deal with this we must ensure that we always invoke the
libvirt-sandbox-init-common program using the ld-linux that
was provided by the host OS image.
The sandbox builder is tweaked so that it always copies the
host ld-linux.so into the libs scratch directory, and gives
it a predictable name 'ld.so', since every architecture seems
to have a different name.
The libvirt-sandbox-init-{lxc,qemu} files are changed so that
instead of exec'ing libvirt-sandbox-init-common directly, they
will load it via the ld.so file.
---
libvirt-sandbox/libvirt-sandbox-builder.c | 28 +++++++++++++++++++++++-----
libvirt-sandbox/libvirt-sandbox-init-lxc.c | 1 +
libvirt-sandbox/libvirt-sandbox-init-qemu.c | 1 +
3 files changed, 25 insertions(+), 5 deletions(-)
diff --git a/libvirt-sandbox/libvirt-sandbox-builder.c b/libvirt-sandbox/libvirt-sandbox-builder.c
index 2726868..e615606 100644
--- a/libvirt-sandbox/libvirt-sandbox-builder.c
+++ b/libvirt-sandbox/libvirt-sandbox-builder.c
@@ -252,10 +252,11 @@ GVirConnection *gvir_sandbox_builder_get_connection(GVirSandboxBuilder *builder)
static gboolean gvir_sandbox_builder_copy_file(const char *path,
const char *libsdir,
+ const char *newname,
GError **error)
{
gchar *name = g_path_get_basename(path);
- gchar *target = g_build_filename(libsdir, name, NULL);
+ gchar *target = g_build_filename(libsdir, newname ? newname : name, NULL);
GFile *srcFile = g_file_new_for_path(path);
GFile *tgtFile = g_file_new_for_path(target);
gboolean result = FALSE;
@@ -285,7 +286,7 @@ static gboolean gvir_sandbox_builder_copy_program(const char *program,
const gchar *argv[] = {LDD_PATH, program, NULL};
gboolean result = FALSE;
- if (!gvir_sandbox_builder_copy_file(program, dest, error))
+ if (!gvir_sandbox_builder_copy_file(program, dest, NULL, error))
goto cleanup;
@@ -301,14 +302,31 @@ static gboolean gvir_sandbox_builder_copy_program(const char *program,
*tmp = '\0';
/* Search the line for the library path */
- start = strstr(line, " => ");
+ start = strstr(line, "/");
end = strstr(line, " (");
if (start && end) {
- start = start + 4;
+ const gchar *newname = NULL;
*end = '\0';
- if (!gvir_sandbox_builder_copy_file(start, dest, error))
+ /* There are countless different naming schemes for
+ * the ld-linux.so library across architectures. Pretty
+ * much the only thing in common is they start with
+ * the two letters 'ld'. The LDD program prints it
+ * out differently too - it doesn't include " => "
+ * as this library is special - its actually a static
+ * linked executable not a library.
+ *
+ * To make life easier for libvirt-sandbox-init-{qemu,lxc}
+ * we just call the file 'ld.so' when we copy it into our
+ * scratch dir, no matter what it was called on the host.
+ */
+ if (!strstr(line, " => ") &&
+ strstr(start, "/ld")) {
+ newname = "ld.so";
+ }
+
+ if (!gvir_sandbox_builder_copy_file(start, dest, newname, error))
goto cleanup;
}
diff --git a/libvirt-sandbox/libvirt-sandbox-init-lxc.c b/libvirt-sandbox/libvirt-sandbox-init-lxc.c
index e2fe7f0..d1e4a79 100644
--- a/libvirt-sandbox/libvirt-sandbox-init-lxc.c
+++ b/libvirt-sandbox/libvirt-sandbox-init-lxc.c
@@ -77,6 +77,7 @@ main(int argc, char **argv)
args[narg++] = "1000";
}
+ args[narg++] = SANDBOXCONFIGDIR "/.libs/ld.so";
args[narg++] = SANDBOXCONFIGDIR "/.libs/libvirt-sandbox-init-common";
if (debug)
args[narg++] = "-d";
diff --git a/libvirt-sandbox/libvirt-sandbox-init-qemu.c b/libvirt-sandbox/libvirt-sandbox-init-qemu.c
index 09580da..cd6055a 100644
--- a/libvirt-sandbox/libvirt-sandbox-init-qemu.c
+++ b/libvirt-sandbox/libvirt-sandbox-init-qemu.c
@@ -422,6 +422,7 @@ main(int argc ATTR_UNUSED, char **argv ATTR_UNUSED)
args[narg++] = "1000";
}
+ args[narg++] = SANDBOXCONFIGDIR "/.libs/ld.so";
args[narg++] = SANDBOXCONFIGDIR "/.libs/libvirt-sandbox-init-common";
if (debug)
args[narg++] = "-d";
--
2.4.3
9 years, 4 months
[libvirt] [PATCH] qemu: Avoid using ".(null)" in UNIX socket path
by Jiri Denemark
The code which generates paths for UNIX socket blindly used target name
without checking if it was set. Thus for the following device XML
<channel type='unix'>
<source mode='bind'/>
<target type='virtio'/>
</channel>
we would generate "/var/lib/libvirt/qemu/channel/target/NAME.(null)"
path which works but is not really correct. Let's not use the
".target_name" suffix at all if target name is not set.
https://bugzilla.redhat.com/show_bug.cgi?id=1226854
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
src/qemu/qemu_domain.c | 20 +++++++++---
.../qemuxml2argv-channel-virtio-unix.args | 19 +++++++++++
.../qemuxml2argv-channel-virtio-unix.xml | 37 ++++++++++++++++++++++
tests/qemuxml2argvtest.c | 5 +++
4 files changed, 77 insertions(+), 4 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-channel-virtio-unix.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-channel-virtio-unix.xml
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 6213fd9..404489c 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -1249,11 +1249,23 @@ qemuDomainDeviceDefPostParse(virDomainDeviceDefPtr dev,
dev->data.chr->deviceType == VIR_DOMAIN_CHR_DEVICE_TYPE_CHANNEL &&
dev->data.chr->targetType == VIR_DOMAIN_CHR_CHANNEL_TARGET_TYPE_VIRTIO &&
dev->data.chr->source.type == VIR_DOMAIN_CHR_TYPE_UNIX &&
- !dev->data.chr->source.data.nix.path && cfg) {
- if (virAsprintf(&dev->data.chr->source.data.nix.path, "%s/%s.%s",
- cfg->channelTargetDir,
- def->name, dev->data.chr->target.name) < 0)
+ !dev->data.chr->source.data.nix.path) {
+ if (!cfg) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("cannot generate UNIX socket path"));
goto cleanup;
+ }
+
+ if (dev->data.chr->target.name) {
+ if (virAsprintf(&dev->data.chr->source.data.nix.path, "%s/%s.%s",
+ cfg->channelTargetDir,
+ def->name, dev->data.chr->target.name) < 0)
+ goto cleanup;
+ } else {
+ if (virAsprintf(&dev->data.chr->source.data.nix.path, "%s/%s",
+ cfg->channelTargetDir, def->name) < 0)
+ goto cleanup;
+ }
dev->data.chr->source.data.nix.listen = true;
}
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-channel-virtio-unix.args b/tests/qemuxml2argvdata/qemuxml2argv-channel-virtio-unix.args
new file mode 100644
index 0000000..43a34ce
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-channel-virtio-unix.args
@@ -0,0 +1,19 @@
+LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \
+/usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -nodefconfig -nodefaults \
+-chardev socket,id=charmonitor,path=/tmp/test-monitor,server,nowait \
+-mon chardev=charmonitor,id=monitor,mode=readline \
+-no-acpi \
+-boot c \
+-device virtio-serial-pci,id=virtio-serial1,bus=pci.0,addr=0xa \
+-device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x3 \
+-usb \
+-hda /dev/HostVG/QEMUGuest1 \
+-chardev socket,id=charchannel0,path=\
+/tmp/QEMUGuest1.org.qemu.guest_agent.0,server,nowait \
+-device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,\
+name=org.qemu.guest_agent.0 \
+-chardev socket,id=charchannel1,path=/tmp/QEMUGuest1,server,nowait \
+-device virtserialport,bus=virtio-serial0.0,nr=2,chardev=charchannel1,id=channel1 \
+-chardev socket,id=charchannel2,path=/tmp/QEMUGuest1.ble,server,nowait \
+-device virtserialport,bus=virtio-serial0.0,nr=3,chardev=charchannel2,id=channel2,\
+name=ble
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-channel-virtio-unix.xml b/tests/qemuxml2argvdata/qemuxml2argv-channel-virtio-unix.xml
new file mode 100644
index 0000000..7fac943
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-channel-virtio-unix.xml
@@ -0,0 +1,37 @@
+<domain type='qemu'>
+ <name>QEMUGuest1</name>
+ <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+ <memory unit='KiB'>219136</memory>
+ <vcpu placement='static' cpuset='1-4,8-20,525'>1</vcpu>
+ <os>
+ <type arch='i686' machine='pc'>hvm</type>
+ <boot dev='hd'/>
+ </os>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>destroy</on_crash>
+ <devices>
+ <emulator>/usr/bin/qemu</emulator>
+ <disk type='block' device='disk'>
+ <source dev='/dev/HostVG/QEMUGuest1'/>
+ <target dev='hda' bus='ide'/>
+ <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+ </disk>
+ <controller type='usb' index='0'/>
+ <controller type='ide' index='0'/>
+ <controller type='virtio-serial' index='1'>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/>
+ </controller>
+ <channel type='unix'>
+ <target type='virtio' name='org.qemu.guest_agent.0'/>
+ </channel>
+ <channel type='unix'>
+ <target type='virtio'/>
+ </channel>
+ <channel type='unix'>
+ <target type='virtio' name='ble'/>
+ </channel>
+ <memballoon model='none'/>
+ </devices>
+</domain>
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index 4154601..6f8332d 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -519,6 +519,9 @@ mymain(void)
driver.config->spiceTLS = 1;
if (VIR_STRDUP_QUIET(driver.config->spicePassword, "123456") < 0)
return EXIT_FAILURE;
+ VIR_FREE(driver.config->channelTargetDir);
+ if (VIR_STRDUP_QUIET(driver.config->channelTargetDir, "/tmp") < 0)
+ return EXIT_FAILURE;
# define DO_TEST_FULL(name, migrateFrom, migrateFd, flags, ...) \
do { \
@@ -1113,6 +1116,8 @@ mymain(void)
DO_TEST("channel-virtio-default",
QEMU_CAPS_DEVICE, QEMU_CAPS_CHARDEV, QEMU_CAPS_NODEFCONFIG,
QEMU_CAPS_SPICE, QEMU_CAPS_CHARDEV_SPICEVMC);
+ DO_TEST("channel-virtio-unix",
+ QEMU_CAPS_DEVICE, QEMU_CAPS_CHARDEV, QEMU_CAPS_NODEFCONFIG);
DO_TEST("smartcard-host",
QEMU_CAPS_CHARDEV, QEMU_CAPS_DEVICE,
--
2.4.5
9 years, 4 months