[libvirt] [PATCH v2] check if console/channel PTY is null before attempting to open
by Shivaprasad G Bhat
Console/channel devices have their pty devices assigned when the emulator is
actually started. If time is spent in guest preparation, someone attempts
to open the console/channel, the libvirt crashes in virChrdevLockFilePath().
The patch attempts to fix the crash by adding a check before attempting to
open.
Signed-off-by: Shivaprasad G Bhat <sbhat(a)linux.vnet.ibm.com>
---
src/conf/virchrdev.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/conf/virchrdev.c b/src/conf/virchrdev.c
index 5f28f29..701b326 100644
--- a/src/conf/virchrdev.c
+++ b/src/conf/virchrdev.c
@@ -350,6 +350,11 @@ int virChrdevOpen(virChrdevsPtr devs,
switch (source->type) {
case VIR_DOMAIN_CHR_TYPE_PTY:
path = source->data.file.path;
+ if (!path) {
+ virReportError(VIR_ERR_OPERATION_FAILED, "%s",
+ _("PTY device is not yet assigned"));
+ return -1;
+ }
break;
case VIR_DOMAIN_CHR_TYPE_UNIX:
path = source->data.nix.path;
9 years, 5 months
[libvirt] [PATCH 0/2] lxc: allow using 802.11 wireless interfaces in LXC domains
by Lubomir Rintel
Hi,
I'm using libvirt-lxc with mac80211_hwsim to construct virtual wireless network
for NetworkManager testing. Currently, I have to move the interfaces to the
domains manually, as sharing wan 802.11 wireless link with a LXC namespace does
not work:
<hostdev mode='capabilities' type='net'>
<source><interface>wlan0</interface></source>
</hostdev>
The wireless links can only be associated to namespaces by moving the
underlying PHY instead of the network interface.
I'm following up with patches that fix the problem for me; please take a look.
Thank you
Lubo
9 years, 5 months
[libvirt] [PATCH] util: Clear output broadcast address before filling it in
by Martin Kletzander
Since commit 55ace7c4789c8a7408139460f4b639cee00e5125, the sockettest
fails without VIR_TEST_DEBUG set. The problem is found by test number
42 (co-incidence?), which tests range '192.168.122.1' -
'192.168.122.255' in network '192.168.122.0/24'. That is supposed to
fail because the end address is equal to the broadcast address.
When comparing these two in 'virSocketAddrEqual(end, &broadcast)',
there is a check for sin_addr as well as for sin_port. That port,
however, is different when we do not enable test debugging. With the
testing enabled, the port is 0 (correctly initialized), but without that
it has a random number there. And that's because the structure is not
initialized anywhere.
By zeroing the structure before filling in the info, we make sure we
return only the address and not any information that was not requested.
And the test work once again.
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
Notes:
Pushed as a build-breaker.
src/util/virsocketaddr.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/util/virsocketaddr.c b/src/util/virsocketaddr.c
index 34f2af31b2e7..81539b3730d4 100644
--- a/src/util/virsocketaddr.c
+++ b/src/util/virsocketaddr.c
@@ -505,6 +505,8 @@ virSocketAddrBroadcast(const virSocketAddr *addr,
const virSocketAddr *netmask,
virSocketAddrPtr broadcast)
{
+ memset(broadcast, 0, sizeof(*broadcast));
+
if ((addr->data.stor.ss_family != AF_INET) ||
(netmask->data.stor.ss_family != AF_INET)) {
broadcast->data.stor.ss_family = AF_UNSPEC;
--
2.4.2
9 years, 5 months
[libvirt] [PATCH] util: process: Refactor and fix virProcessSetAffinity
by Peter Krempa
Refactor the function to return the bitmap instead of an integer and the
inner workings so that they make more sense.
This patch also fixes possible segfault on old systems that was
introduced by commit:
commit f1a43a8e4139b028257ef4ed05a81cfb5f8a8741
Author: Hu Tao <hutao(a)cn.fujitsu.com>
Date: Fri Sep 14 15:46:59 2012 +0800
use virBitmap to store cpu affinity info
---
Pushed after review on the libvirt-security list.
src/qemu/qemu_driver.c | 5 +--
src/util/virprocess.c | 102 ++++++++++++++++++++++---------------------------
src/util/virprocess.h | 4 +-
3 files changed, 48 insertions(+), 63 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index f32b87e..63001b1 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -1457,8 +1457,7 @@ qemuDomainHelperGetVcpus(virDomainObjPtr vm, virVcpuInfoPtr info, int maxinfo,
unsigned char *cpumap = VIR_GET_CPUMAP(cpumaps, maplen, v);
virBitmapPtr map = NULL;
- if (virProcessGetAffinity(priv->vcpupids[v],
- &map, hostcpus) < 0)
+ if (!(map = virProcessGetAffinity(priv->vcpupids[v])))
return -1;
virBitmapToDataBuf(map, cpumap, maplen);
@@ -5727,7 +5726,7 @@ qemuDomainGetIOThreadsLive(virQEMUDriverPtr driver,
goto endjob;
info_ret[i]->iothread_id = iothreads[i]->iothread_id;
- if (virProcessGetAffinity(iothreads[i]->thread_id, &map, hostcpus) < 0)
+ if (!(map = virProcessGetAffinity(iothreads[i]->thread_id)))
goto endjob;
if (virBitmapToData(map, &info_ret[i]->cpumap,
diff --git a/src/util/virprocess.c b/src/util/virprocess.c
index 501569f..a38cb75 100644
--- a/src/util/virprocess.c
+++ b/src/util/virprocess.c
@@ -468,71 +468,60 @@ int virProcessSetAffinity(pid_t pid, virBitmapPtr map)
return 0;
}
-int virProcessGetAffinity(pid_t pid,
- virBitmapPtr *map,
- int maxcpu)
+virBitmapPtr
+virProcessGetAffinity(pid_t pid)
{
size_t i;
-# ifdef CPU_ALLOC
- /* New method dynamically allocates cpu mask, allowing unlimted cpus */
- int numcpus = 1024;
- size_t masklen;
cpu_set_t *mask;
+ size_t masklen;
+ virBitmapPtr ret = NULL;
- /* Not only may the statically allocated cpu_set_t be too small,
- * but there is no way to ask the kernel what size is large enough.
- * So you have no option but to pick a size, try, catch EINVAL,
- * enlarge, and re-try.
- *
- * http://lkml.org/lkml/2009/7/28/620
- */
- realloc:
- masklen = CPU_ALLOC_SIZE(numcpus);
- mask = CPU_ALLOC(numcpus);
+# ifdef CPU_ALLOC
+ /* 262144 cpus ought to be enough for anyone */
+ masklen = CPU_ALLOC_SIZE(1024 << 8);
+ mask = CPU_ALLOC(1024 << 8);
if (!mask) {
virReportOOMError();
- return -1;
+ return NULL;
}
CPU_ZERO_S(masklen, mask);
+# else
+ if (VIR_ALLOC(mask) < 0)
+ return NULL;
+
+ masklen = sizeof(*mask);
+ CPU_ZERO(mask);
+# endif
+
if (sched_getaffinity(pid, masklen, mask) < 0) {
- CPU_FREE(mask);
- if (errno == EINVAL &&
- numcpus < (1024 << 8)) { /* 262144 cpus ought to be enough for anyone */
- numcpus = numcpus << 2;
- goto realloc;
- }
virReportSystemError(errno,
_("cannot get CPU affinity of process %d"), pid);
- return -1;
+ goto cleanup;
}
- *map = virBitmapNew(maxcpu);
- if (!*map)
- return -1;
+ if (!(ret = virBitmapNew(masklen * 8)))
+ goto cleanup;
- for (i = 0; i < maxcpu; i++)
+ for (i = 0; i < masklen * 8; i++) {
+# ifdef CPU_ALLOC
if (CPU_ISSET_S(i, masklen, mask))
- ignore_value(virBitmapSetBit(*map, i));
- CPU_FREE(mask);
+ ignore_value(virBitmapSetBit(ret, i));
# else
- /* Legacy method uses a fixed size cpu mask, only allows up to 1024 cpus */
- cpu_set_t mask;
-
- CPU_ZERO(&mask);
- if (sched_getaffinity(pid, sizeof(mask), &mask) < 0) {
- virReportSystemError(errno,
- _("cannot get CPU affinity of process %d"), pid);
- return -1;
+ if (CPU_ISSET(i, mask))
+ ignore_value(virBitmapSetBit(ret, i));
+# endif
}
- for (i = 0; i < maxcpu; i++)
- if (CPU_ISSET(i, &mask))
- ignore_value(virBitmapSetBit(*map, i));
+ cleanup:
+# ifdef CPU_ALLOC
+ CPU_FREE(mask);
+# else
+ VIR_FREE(mask);
# endif
- return 0;
+ return ret;
}
#elif defined(HAVE_BSD_CPU_AFFINITY)
@@ -562,29 +551,29 @@ int virProcessSetAffinity(pid_t pid,
return 0;
}
-int virProcessGetAffinity(pid_t pid,
- virBitmapPtr *map,
- int maxcpu)
+virBitmapPtr
+virProcessGetAffinity(pid_t pid)
{
size_t i;
cpuset_t mask;
-
- if (!(*map = virBitmapNew(maxcpu)))
- return -1;
+ virBitmapPtr ret = NULL;
CPU_ZERO(&mask);
if (cpuset_getaffinity(CPU_LEVEL_WHICH, CPU_WHICH_PID, pid,
sizeof(mask), &mask) != 0) {
virReportSystemError(errno,
_("cannot get CPU affinity of process %d"), pid);
- return -1;
+ return NULL;
}
- for (i = 0; i < maxcpu; i++)
+ if (!(*map = virBitmapNew(sizeof(mask) * 8)))
+ return NULL;
+
+ for (i = 0; i < sizeof(mask) * 8; i++)
if (CPU_ISSET(i, &mask))
- ignore_value(virBitmapSetBit(*map, i));
+ ignore_value(virBitmapSetBit(ret, i));
- return 0;
+ return ret;
}
#else /* HAVE_SCHED_GETAFFINITY */
@@ -597,13 +586,12 @@ int virProcessSetAffinity(pid_t pid ATTRIBUTE_UNUSED,
return -1;
}
-int virProcessGetAffinity(pid_t pid ATTRIBUTE_UNUSED,
- virBitmapPtr *map ATTRIBUTE_UNUSED,
- int maxcpu ATTRIBUTE_UNUSED)
+virBitmapPtr
+virProcessGetAffinity(pid_t pid ATTRIBUTE_UNUSED)
{
virReportSystemError(ENOSYS, "%s",
_("Process CPU affinity is not supported on this platform"));
- return -1;
+ return NULL;
}
#endif /* HAVE_SCHED_GETAFFINITY */
diff --git a/src/util/virprocess.h b/src/util/virprocess.h
index c812882..1b98493 100644
--- a/src/util/virprocess.h
+++ b/src/util/virprocess.h
@@ -58,9 +58,7 @@ int virProcessKillPainfully(pid_t pid, bool force);
int virProcessSetAffinity(pid_t pid, virBitmapPtr map);
-int virProcessGetAffinity(pid_t pid,
- virBitmapPtr *map,
- int maxcpu);
+virBitmapPtr virProcessGetAffinity(pid_t pid);
int virProcessGetStartTime(pid_t pid,
unsigned long long *timestamp);
--
2.4.1
9 years, 5 months
[libvirt] [PATCH] virsh: Fix Ctrl-C behavior when watching a job
by Jiri Denemark
When watching a job (save, managedsave, dump, migrate) virsh spawns a
thread to call the appropriate API and waits for the result while
watching for interruption signals (SIGINT, Ctrl-C on the terminal).
Whenever such signal is caught, virsh calls virDomainAbortJob, stops
waiting for the job, and returns the result of virDomainAbortJob.
This is wrong because the job might have finished in the meantime or it
might have been cancelled by someone else and virsh would just report
the failure to abort the job. However, we are not interested in the
virDomainAbortJob's result at all, we need to keep waiting for the main
job to finish and report its result instead.
https://bugzilla.redhat.com/show_bug.cgi?id=1131755
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
tools/virsh-domain.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index fc4d1fc..044b088 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -4234,12 +4234,9 @@ vshWatchJob(vshControl *ctl,
if (ret > 0) {
if (pollfd[1].revents & POLLIN &&
saferead(STDIN_FILENO, &retchar, sizeof(retchar)) > 0) {
- if (vshTTYIsInterruptCharacter(ctl, retchar)) {
+ if (vshTTYIsInterruptCharacter(ctl, retchar))
virDomainAbortJob(dom);
- goto cleanup;
- } else {
- continue;
- }
+ continue;
}
if (pollfd[0].revents & POLLIN &&
@@ -4259,9 +4256,8 @@ vshWatchJob(vshControl *ctl,
if (intCaught) {
virDomainAbortJob(dom);
intCaught = 0;
- } else {
- continue;
}
+ continue;
}
goto cleanup;
}
--
2.4.1
9 years, 5 months
[libvirt] [PATCH 0/8 v3] parallels: add vz driver
by Maxim Nestratov
v2-v3 change:
* Patch "parallels: set virtType depending on driver name" reworked.
Implemented ability to set virtType depending on driver name.
v1-v2 change:
* Only "parallels: accept vz as a driver uri and name" patch
is changed. Fixed ability to connect to 'parallels' driver
and deal with 'Paralells' domain virt type.
Maxim Nestratov (8):
parallels: introduce vz driver constant and string
parallels: use newly introduced VIR_DOMAIN_VIRT_VZ
parallels: add new guest capabilities assigned to vz driver
parallels: accept vz as a driver uri and name
parallels: add a new vz connection driver and hypervisor structures
parallels: increment the number of connection drivers
parallels: recommend to connect to vz:///system when connection fails
parallels: set virtType depending on driver name
src/conf/domain_conf.c | 19 ++++++++----
src/conf/domain_conf.h | 1 +
src/libvirt.c | 2 +-
src/parallels/parallels_driver.c | 63 +++++++++++++++++++++++++++++++++++----
src/parallels/parallels_network.c | 3 +-
src/parallels/parallels_sdk.c | 6 +++-
src/parallels/parallels_storage.c | 3 +-
src/parallels/parallels_utils.h | 1 +
8 files changed, 82 insertions(+), 16 deletions(-)
--
2.1.0
9 years, 5 months
[libvirt] [PATCH] conf:audit: fix no audit log when start a vm with iothread
by Luyao Huang
Signed-off-by: Luyao Huang <lhuang(a)redhat.com>
---
src/conf/domain_audit.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/conf/domain_audit.c b/src/conf/domain_audit.c
index 4ea10d2..1900039 100644
--- a/src/conf/domain_audit.c
+++ b/src/conf/domain_audit.c
@@ -885,6 +885,8 @@ virDomainAuditStart(virDomainObjPtr vm, const char *reason, bool success)
virDomainAuditMemory(vm, 0, vm->def->mem.cur_balloon, "start", true);
virDomainAuditVcpu(vm, 0, vm->def->vcpus, "start", true);
+ if (vm->def->iothreads)
+ virDomainAuditIOThread(vm, 0, vm->def->iothreads, "start", true);
virDomainAuditLifecycle(vm, "start", reason, success);
}
--
1.8.3.1
9 years, 5 months
[libvirt] [PATCH] qemu: fix forget pass the return value to variable @ret
by Luyao Huang
If we do not pass the return value from qemuDomainRemoveRNGDevice()
function to variable @ret, qemuDomainRemoveDevice() functiuon will
always fail when recive rng device unplug event from qemu monitor.
Signed-off-by: Luyao Huang <lhuang(a)redhat.com>
---
src/qemu/qemu_hotplug.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index 170768b..f596730 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -3271,7 +3271,7 @@ qemuDomainRemoveDevice(virQEMUDriverPtr driver,
ret = qemuDomainRemoveChrDevice(driver, vm, dev->data.chr);
break;
case VIR_DOMAIN_DEVICE_RNG:
- qemuDomainRemoveRNGDevice(driver, vm, dev->data.rng);
+ ret = qemuDomainRemoveRNGDevice(driver, vm, dev->data.rng);
break;
case VIR_DOMAIN_DEVICE_MEMORY:
--
1.8.3.1
9 years, 5 months
[libvirt] [PATCH] qemu: fix wrong call addressrelease function when attach RNG device success
by Luyao Huang
Add a return value check to avoid the wrong address release.
Signed-off-by: Luyao Huang <lhuang(a)redhat.com>
---
src/qemu/qemu_hotplug.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index 170768b..f70e3d8 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -1695,7 +1695,7 @@ qemuDomainAttachRNGDevice(virQEMUDriverPtr driver,
audit:
virDomainAuditRNG(vm, NULL, rng, "attach", ret == 0);
cleanup:
- if (vm)
+ if (ret < 0 && vm)
qemuDomainReleaseDeviceAddress(vm, &rng->info, NULL);
VIR_FREE(charAlias);
VIR_FREE(objAlias);
--
1.8.3.1
9 years, 5 months
[libvirt] [PATCHv2] Always add 'console' matching the 'serial' device
by Ján Tomko
We have been formatting the first serial device also
as a console device, but only if there were no other consoles.
If there is a <serial> device present in the XML, but no serial
<console>, or if there isn't any <console> at all but the domain
definition hasn't gone through a parse->format->parse round-trip,
the <console> device would not be formatted.
Change the code to always add the stub device for the first
serial device.
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1089914
---
src/conf/domain_conf.c | 23 +++++++++++++
.../qemuxml2argv-console-compat2.xml | 35 ++++++++++++++++++++
.../qemuxml2xmlout-console-compat2.xml | 38 ++++++++++++++++++++++
tests/qemuxml2xmltest.c | 1 +
4 files changed, 97 insertions(+)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-console-compat2.xml
create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-console-compat2.xml
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 6e57425..ec8f9fa 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -3587,6 +3587,25 @@ virDomainDefPostParseInternal(virDomainDefPtr def,
def->consoles[0]->deviceType = VIR_DOMAIN_CHR_DEVICE_TYPE_CONSOLE;
def->consoles[0]->targetType = VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_SERIAL;
}
+ } else if (def->os.type == VIR_DOMAIN_OSTYPE_HVM && def->nserials > 0 &&
+ def->serials[0]->deviceType == VIR_DOMAIN_CHR_DEVICE_TYPE_SERIAL &&
+ def->serials[0]->targetType == VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_ISA) {
+ /* Create a stub console to match the serial port.
+ * console[0] either does not exist
+ * or has a different type than SERIAL or NONE.
+ */
+ virDomainChrDefPtr chr;
+ if (VIR_ALLOC(chr) < 0)
+ return -1;
+
+ if (VIR_INSERT_ELEMENT(def->consoles,
+ 0,
+ def->nconsoles,
+ chr) < 0)
+ return -1;
+
+ def->consoles[0]->deviceType = VIR_DOMAIN_CHR_DEVICE_TYPE_CONSOLE;
+ def->consoles[0]->targetType = VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_SERIAL;
}
if (virDomainDefRejectDuplicateControllers(def) < 0)
@@ -21588,6 +21607,10 @@ virDomainDefFormatInternal(virDomainDefPtr def,
if (virDomainChrDefFormat(buf, &console, flags) < 0)
goto error;
}
+ /* The back-compat console device stub is added when parsing the domain XML
+ * and handled above, this is for formatting definitions created via other
+ * means.
+ */
if (def->os.type == VIR_DOMAIN_OSTYPE_HVM &&
def->nconsoles == 0 &&
def->nserials > 0) {
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-console-compat2.xml b/tests/qemuxml2argvdata/qemuxml2argv-console-compat2.xml
new file mode 100644
index 0000000..ded204a
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-console-compat2.xml
@@ -0,0 +1,35 @@
+<domain type='qemu'>
+ <name>QEMUGuest1</name>
+ <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+ <memory unit='KiB'>219100</memory>
+ <currentMemory unit='KiB'>219100</currentMemory>
+ <vcpu placement='static'>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'>
+ <driver name='qemu' type='raw'/>
+ <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='pci' index='0' model='pci-root'/>
+ <controller type='virtio-serial' index='0'/>
+ <serial type='pty'>
+ <target port='0'/>
+ </serial>
+ <console type='pty'>
+ <target type='virtio' port='0'/>
+ </console>
+ <memballoon model='none'/>
+ </devices>
+</domain>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-console-compat2.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-console-compat2.xml
new file mode 100644
index 0000000..636e984
--- /dev/null
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-console-compat2.xml
@@ -0,0 +1,38 @@
+<domain type='qemu'>
+ <name>QEMUGuest1</name>
+ <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+ <memory unit='KiB'>219100</memory>
+ <currentMemory unit='KiB'>219100</currentMemory>
+ <vcpu placement='static'>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'>
+ <driver name='qemu' type='raw'/>
+ <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='pci' index='0' model='pci-root'/>
+ <controller type='virtio-serial' index='0'/>
+ <serial type='pty'>
+ <target port='0'/>
+ </serial>
+ <console type='pty'>
+ <target type='serial' port='0'/>
+ </console>
+ <console type='pty'>
+ <target type='virtio' port='0'/>
+ </console>
+ <memballoon model='none'/>
+ </devices>
+</domain>
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c
index 53bcc9f..d405e71 100644
--- a/tests/qemuxml2xmltest.c
+++ b/tests/qemuxml2xmltest.c
@@ -472,6 +472,7 @@ mymain(void)
DO_TEST("serial-spiceport-nospice");
DO_TEST("parallel-tcp");
DO_TEST("console-compat");
+ DO_TEST_DIFFERENT("console-compat2");
DO_TEST("console-virtio-many");
DO_TEST("channel-guestfwd");
DO_TEST("channel-virtio");
--
2.3.6
9 years, 5 months