[libvirt] [PATCH] Fix documentation errors about the path of conf files
by Lily Zhu
The conf files, for example, libvirtd.conf, virtlockd.conf and
virtlogd.conf, should be located under the directory
"/etc/libvirt", rather than "/etc".
Signed-off-by: Lily Zhu <lizhu(a)redhat.com>
---
daemon/libvirtd.pod | 2 +-
src/locking/virtlockd.pod | 2 +-
src/logging/virtlogd.pod | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/daemon/libvirtd.pod b/daemon/libvirtd.pod
index 3b819a2..1bca509 100644
--- a/daemon/libvirtd.pod
+++ b/daemon/libvirtd.pod
@@ -81,7 +81,7 @@ On receipt of B<SIGHUP> libvirtd will reload its configuration.
=over
-=item F<SYSCONFDIR/libvirtd.conf>
+=item F<SYSCONFDIR/libvirt/libvirtd.conf>
The default configuration file used by libvirtd, unless overridden on the
command line using the B<-f>|B<--config> option.
diff --git a/src/locking/virtlockd.pod b/src/locking/virtlockd.pod
index a3bb268..2e155f8 100644
--- a/src/locking/virtlockd.pod
+++ b/src/locking/virtlockd.pod
@@ -67,7 +67,7 @@ upgrades of the virtlockd service.
=over
-=item F<SYSCONFDIR/virtlockd.conf>
+=item F<SYSCONFDIR/libvirt/virtlockd.conf>
The default configuration file used by virtlockd, unless overridden on the
command line using the B<-f>|B<--config> option.
diff --git a/src/logging/virtlogd.pod b/src/logging/virtlogd.pod
index 7e55c9e..5fc20db 100644
--- a/src/logging/virtlogd.pod
+++ b/src/logging/virtlogd.pod
@@ -67,7 +67,7 @@ upgrades of the virtlogd service.
=over
-=item F<SYSCONFDIR/virtlogd.conf>
+=item F<SYSCONFDIR/libvirt/virtlogd.conf>
The default configuration file used by virtlogd, unless overridden on the
command line using the B<-f>|B<--config> option.
--
1.8.3.1
7 years, 6 months
[libvirt] [PATCH] qemu: capabilities: Move comments separating groups of capabilities
by Peter Krempa
Similarly to how we specify the groups of 5 capabilities in the header
file move the labels to separate line also for the VIR_ENUM_IMPL part.
This simplifies rebase conflict resolution in the capability file since
only lines have to be shuffled around, but they don't need to be edited.
---
src/qemu/qemu_capabilities.c | 159 ++++++++++++++++++++++++++++---------------
1 file changed, 106 insertions(+), 53 deletions(-)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index a9171893e..61c9a1066 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -61,319 +61,372 @@ VIR_LOG_INIT("qemu.qemu_capabilities");
* daemon restarts
*/
VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST,
- "kqemu", /* 0 */
+ /* 0 */
+ "kqemu",
"vnc-colon",
"no-reboot",
"drive",
"drive-boot",
- "name", /* 5 */
+ /* 5 */
+ "name",
"uuid",
"domid",
"vnet-hdr",
"migrate-kvm-stdio",
- "migrate-qemu-tcp", /* 10 */
+ /* 10 */
+ "migrate-qemu-tcp",
"migrate-qemu-exec",
"drive-cache-v2",
"kvm",
"drive-format",
- "vga", /* 15 */
+ /* 15 */
+ "vga",
"0.10",
"pci-device",
"mem-path",
"drive-serial",
- "xen-domid", /* 20 */
+ /* 20 */
+ "xen-domid",
"migrate-qemu-unix",
"chardev",
"enable-kvm",
"monitor-json",
- "balloon", /* 25 */
+ /* 25 */
+ "balloon",
"device",
"sdl",
"smp-topology",
"netdev",
- "rtc", /* 30 */
+ /* 30 */
+ "rtc",
"vhost-net",
"rtc-td-hack",
"no-hpet",
"no-kvm-pit",
- "tdf", /* 35 */
+ /* 35 */
+ "tdf",
"pci-configfd",
"nodefconfig",
"boot-menu",
"enable-kqemu",
- "fsdev", /* 40 */
+ /* 40 */
+ "fsdev",
"nesting",
"name-process",
"drive-readonly",
"smbios-type",
- "vga-qxl", /* 45 */
+ /* 45 */
+ "vga-qxl",
"spice",
"vga-none",
"migrate-qemu-fd",
"boot-index",
- "hda-duplex", /* 50 */
+ /* 50 */
+ "hda-duplex",
"drive-aio",
"pci-multibus",
"pci-bootindex",
"ccid-emulated",
- "ccid-passthru", /* 55 */
+ /* 55 */
+ "ccid-passthru",
"chardev-spicevmc",
"device-spicevmc",
"virtio-tx-alg",
"device-qxl-vga",
- "pci-multifunction", /* 60 */
+ /* 60 */
+ "pci-multifunction",
"virtio-blk-pci.ioeventfd",
"sga",
"virtio-blk-pci.event_idx",
"virtio-net-pci.event_idx",
- "cache-directsync", /* 65 */
+ /* 65 */
+ "cache-directsync",
"piix3-usb-uhci",
"piix4-usb-uhci",
"usb-ehci",
"ich9-usb-ehci1",
- "vt82c686b-usb-uhci", /* 70 */
+ /* 70 */
+ "vt82c686b-usb-uhci",
"pci-ohci",
"usb-redir",
"usb-hub",
"no-shutdown",
- "cache-unsafe", /* 75 */
+ /* 75 */
+ "cache-unsafe",
"rombar",
"ich9-ahci",
"no-acpi",
"fsdev-readonly",
- "virtio-blk-pci.scsi", /* 80 */
+ /* 80 */
+ "virtio-blk-pci.scsi",
"blk-sg-io",
"drive-copy-on-read",
"cpu-host",
"fsdev-writeout",
- "drive-iotune", /* 85 */
+ /* 85 */
+ "drive-iotune",
"system_wakeup",
"scsi-disk.channel",
"scsi-block",
"transaction",
- "block-job-sync", /* 90 */
+ /* 90 */
+ "block-job-sync",
"block-job-async",
"scsi-cd",
"ide-cd",
"no-user-config",
- "hda-micro", /* 95 */
+ /* 95 */
+ "hda-micro",
"dump-guest-memory",
"nec-usb-xhci",
"virtio-s390",
"balloon-event",
- "bridge", /* 100 */
+ /* 100 */
+ "bridge",
"lsi",
"virtio-scsi-pci",
"blockio",
"disable-s3",
- "disable-s4", /* 105 */
+ /* 105 */
+ "disable-s4",
"usb-redir.filter",
"ide-drive.wwn",
"scsi-disk.wwn",
"seccomp-sandbox",
- "reboot-timeout", /* 110 */
+ /* 110 */
+ "reboot-timeout",
"dump-guest-core",
"seamless-migration",
"block-commit",
"vnc",
- "drive-mirror", /* 115 */
+ /* 115 */
+ "drive-mirror",
"usb-redir.bootindex",
"usb-host.bootindex",
"blockdev-snapshot-sync",
"qxl",
- "VGA", /* 120 */
+ /* 120 */
+ "VGA",
"cirrus-vga",
"vmware-svga",
"device-video-primary",
"s390-sclp",
- "usb-serial", /* 125 */
+ /* 125 */
+ "usb-serial",
"usb-net",
"add-fd",
"nbd-server",
"virtio-rng",
- "rng-random", /* 130 */
+ /* 130 */
+ "rng-random",
"rng-egd",
"virtio-ccw",
"dtb",
"megasas",
- "ipv6-migration", /* 135 */
+ /* 135 */
+ "ipv6-migration",
"machine-opt",
"machine-usb-opt",
"tpm-passthrough",
"tpm-tis",
- "nvram", /* 140 */
+ /* 140 */
+ "nvram",
"pci-bridge",
"vfio-pci",
"vfio-pci.bootindex",
"scsi-generic",
- "scsi-generic.bootindex", /* 145 */
+ /* 145 */
+ "scsi-generic.bootindex",
"mem-merge",
"vnc-websocket",
"drive-discard",
"mlock",
- "vnc-share-policy", /* 150 */
+ /* 150 */
+ "vnc-share-policy",
"device-del-event",
"dmi-to-pci-bridge",
"i440fx-pci-hole64-size",
"q35-pci-hole64-size",
- "usb-storage", /* 155 */
+ /* 155 */
+ "usb-storage",
"usb-storage.removable",
"virtio-mmio",
"ich9-intel-hda",
"kvm-pit-lost-tick-policy",
- "boot-strict", /* 160 */
+ /* 160 */
+ "boot-strict",
"pvpanic",
"enable-fips",
"spice-file-xfer-disable",
"spiceport",
- "usb-kbd", /* 165 */
+ /* 165 */
+ "usb-kbd",
"host-pci-multidomain",
"msg-timestamp",
"active-commit",
"change-backing-file",
- "memory-backend-ram", /* 170 */
+ /* 170 */
+ "memory-backend-ram",
"numa",
"memory-backend-file",
"usb-audio",
"rtc-reset-reinjection",
- "splash-timeout", /* 175 */
+ /* 175 */
+ "splash-timeout",
"iothread",
"migrate-rdma",
"ivshmem",
"drive-iotune-max",
- "VGA.vgamem_mb", /* 180 */
+ /* 180 */
+ "VGA.vgamem_mb",
"vmware-svga.vgamem_mb",
"qxl.vgamem_mb",
"qxl-vga.vgamem_mb",
"pc-dimm",
- "machine-vmport-opt", /* 185 */
+ /* 185 */
+ "machine-vmport-opt",
"aes-key-wrap",
"dea-key-wrap",
"pci-serial",
"aarch64-off",
- "vhost-user-multiqueue", /* 190 */
+ /* 190 */
+ "vhost-user-multiqueue",
"migration-event",
"gpex-pcihost",
"ioh3420",
"x3130-upstream",
- "xio3130-downstream", /* 195 */
+ /* 195 */
+ "xio3130-downstream",
"rtl8139",
"e1000",
"virtio-net",
"gic-version",
- "incoming-defer", /* 200 */
+ /* 200 */
+ "incoming-defer",
"virtio-gpu",
"virtio-gpu.virgl",
"virtio-keyboard",
"virtio-mouse",
- "virtio-tablet", /* 205 */
+ /* 205 */
+ "virtio-tablet",
"virtio-input-host",
"chardev-file-append",
"ich9-disable-s3",
"ich9-disable-s4",
- "vserport-change-event", /* 210 */
+ /* 210 */
+ "vserport-change-event",
"virtio-balloon-pci.deflate-on-oom",
"mptsas1068",
"spice-gl",
"qxl.vram64_size_mb",
- "qxl-vga.vram64_size_mb", /* 215 */
+ /* 215 */
+ "qxl-vga.vram64_size_mb",
"chardev-logfile",
"debug-threads",
"secret",
"pxb",
- "pxb-pcie", /* 220 */
+ /* 220 */
+ "pxb-pcie",
"device-tray-moved-event",
"nec-usb-xhci-ports",
"virtio-scsi-pci.iothread",
"name-guest",
- "qxl.max_outputs", /* 225 */
+ /* 225 */
+ "qxl.max_outputs",
"qxl-vga.max_outputs",
"spice-unix",
"drive-detect-zeroes",
"tls-creds-x509",
- "display", /* 230 */
+ /* 230 */
+ "display",
"intel-iommu",
"smm",
"virtio-pci-disable-legacy",
"query-hotpluggable-cpus",
- "virtio-net.rx_queue_size", /* 235 */
+ /* 235 */
+ "virtio-net.rx_queue_size",
"machine-iommu",
"virtio-vga",
"drive-iotune-max-length",
"ivshmem-plain",
- "ivshmem-doorbell", /* 240 */
+ /* 240 */
+ "ivshmem-doorbell",
"query-qmp-schema",
"gluster.debug_level",
"vhost-scsi",
"drive-iotune-group",
- "query-cpu-model-expansion", /* 245 */
+ /* 245 */
+ "query-cpu-model-expansion",
"virtio-net.host_mtu",
"spice-rendernode",
"nvdimm",
"pcie-root-port",
- "query-cpu-definitions", /* 250 */
+ /* 250 */
+ "query-cpu-definitions",
"block-write-threshold",
"query-named-block-nodes",
"cpu-cache",
"qemu-xhci",
- "kernel-irqchip", /* 255 */
+ /* 255 */
+ "kernel-irqchip",
"kernel-irqchip.split",
"intel-iommu.intremap",
"intel-iommu.caching-mode",
"intel-iommu.eim",
- "intel-iommu.device-iotlb", /* 260 */
+ /* 260 */
+ "intel-iommu.device-iotlb",
"virtio.iommu_platform",
"virtio.ats",
"loadparm",
--
2.12.2
7 years, 6 months
[libvirt] [PATCH v2] util: fix locale problem with virStrToDouble().
by Julio Faracco
This commit fixes a locale problem with locales that use comma as a mantissa
separator. Example: 12.34 en_US = 12,34 pt_BR. Since strtod() is a non-safe
function, virStrToDouble() will have problems to parse double numbers from
kernel settings and other double numbers from static files (XMLs, JSONs, etc).
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1457634
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1457481
Signed-off-by: Julio Faracco <jcfaracco(a)gmail.com>
---
src/util/virstring.c | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/src/util/virstring.c b/src/util/virstring.c
index 089b539..6dd5138 100644
--- a/src/util/virstring.c
+++ b/src/util/virstring.c
@@ -28,6 +28,7 @@
#include "base64.h"
#include "c-ctype.h"
#include "virstring.h"
+#include "virthread.h"
#include "viralloc.h"
#include "virbuffer.h"
#include "virerror.h"
@@ -516,6 +517,22 @@ virStrToLong_ullp(char const *s, char **end_ptr, int base,
return 0;
}
+#if HAVE_NEWLOCALE
+
+static locale_t virLocale;
+
+static int
+virLocaleOnceInit(void)
+{
+ virLocale = newlocale(LC_ALL_MASK, "C", (locale_t)0);
+ if (!virLocale)
+ return -1;
+ return 0;
+}
+
+VIR_ONCE_GLOBAL_INIT(virLocale);
+#endif
+
int
virStrToDouble(char const *s,
char **end_ptr,
@@ -526,7 +543,17 @@ virStrToDouble(char const *s,
int err;
errno = 0;
+#if HAVE_NEWLOCALE
+ locale_t old_loc;
+ if (virLocaleInitialize() < 0)
+ return -1;
+
+ old_loc = uselocale(virLocale);
+#endif
val = strtod(s, &p); /* exempt from syntax-check */
+#if HAVE_NEWLOCALE
+ uselocale(old_loc);
+#endif
err = (errno || (!end_ptr && *p) || p == s);
if (end_ptr)
*end_ptr = p;
--
2.7.4
7 years, 6 months
[libvirt] [PATCH] util: storage: Make @backingFormat optional in virStorageFileGetMetadataInternal
by Peter Krempa
Some callers don't need to know the backing format. Make the argument
optional by using a dummy int if NULL is passed.
---
src/util/virstoragefile.c | 4 ++++
src/util/virstoragefile.h | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c
index 8047d977f..042698872 100644
--- a/src/util/virstoragefile.c
+++ b/src/util/virstoragefile.c
@@ -966,9 +966,13 @@ virStorageFileGetMetadataInternal(virStorageSourcePtr meta,
size_t len,
int *backingFormat)
{
+ int format;
int ret = -1;
size_t i;
+ if (!backingFormat)
+ backingFormat = &format;
+
VIR_DEBUG("path=%s, buf=%p, len=%zu, meta->format=%d",
meta->path, buf, len, meta->format);
diff --git a/src/util/virstoragefile.h b/src/util/virstoragefile.h
index ce54a19ce..0bff8671f 100644
--- a/src/util/virstoragefile.h
+++ b/src/util/virstoragefile.h
@@ -293,7 +293,7 @@ int virStorageFileGetMetadataInternal(virStorageSourcePtr meta,
char *buf,
size_t len,
int *backingFormat)
- ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(4);
+ ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
virStorageSourcePtr virStorageFileGetMetadataFromFD(const char *path,
int fd,
--
2.12.2
7 years, 6 months
[libvirt] [libvirt-python PATCH] Add details for shutdown event
by Martin Kletzander
In commit a8eba5036cb4b0e2ec827e9e6e019ce70e451377, libvirt added
support for two more details. Follow that in python bindings as well.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1463188
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
examples/event-test.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/examples/event-test.py b/examples/event-test.py
index 3bca9e27c9be..4eb71425cff4 100755
--- a/examples/event-test.py
+++ b/examples/event-test.py
@@ -477,7 +477,7 @@ def domDetailToString(event, detail):
( "Paused", "Migrated", "IOError", "Watchdog", "Restored", "Snapshot", "API error" ),
( "Unpaused", "Migrated", "Snapshot" ),
( "Shutdown", "Destroyed", "Crashed", "Migrated", "Saved", "Failed", "Snapshot"),
- ( "Finished", ),
+ ( "Finished", "On guest request", "On host request"),
( "Memory", "Disk" ),
( "Panicked", ),
)
--
2.13.1
7 years, 6 months
[libvirt] [PATCH 0/5] Fix regression when relative block commit does not work after snapshots
by Peter Krempa
See patch 5/5.
Peter Krempa (5):
qemu: block commit: Determine relative path of images before
initializing
qemu: block commit: Don't overwrite error when rolling back disk
labels
util: storage: Export virStorageIsRelative
storage: Add helper to retrieve the backing store string of a storage
volume
qemu: snapshot: Load data necessary for relative block commit to work
src/libvirt_private.syms | 1 +
src/qemu/qemu_driver.c | 51 +++++++++++++++++++++++++++++++-------------
src/storage/storage_driver.c | 44 ++++++++++++++++++++++++++++++++++++++
src/storage/storage_driver.h | 3 +++
src/util/virstoragefile.c | 2 +-
src/util/virstoragefile.h | 1 +
6 files changed, 86 insertions(+), 16 deletions(-)
--
2.12.2
7 years, 6 months
[libvirt] [PATCH] check the return value of qemuBuildVirtioOptionsStr
by Ján Tomko
Only qemuBuildFSDevStr missed the return check.
---
src/qemu/qemu_command.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 900239f05..57893cfda 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -2527,7 +2527,8 @@ qemuBuildFSDevStr(const virDomainDef *def,
QEMU_FSDEV_HOST_PREFIX, fs->info.alias);
virBufferAsprintf(&opt, ",mount_tag=%s", fs->dst);
- qemuBuildVirtioOptionsStr(&opt, fs->virtio, qemuCaps);
+ if (qemuBuildVirtioOptionsStr(&opt, fs->virtio, qemuCaps) < 0)
+ goto error;
if (qemuBuildDeviceAddressStr(&opt, def, &fs->info, qemuCaps) < 0)
goto error;
--
2.13.0
7 years, 6 months
[libvirt] [PATCH 0/3] Small patches
by Marc Hartmayer
Marc Hartmayer (3):
rpc: first allocate the memory and then set the count
qemu: add a comment for mon->watch
Use ATTRIBUTE_FALLTHROUGH
src/conf/domain_conf.c | 2 +-
src/conf/nwfilter_conf.c | 14 +++++++-------
src/cpu/cpu_ppc64.c | 2 +-
src/libvirt-domain.c | 2 +-
src/libxl/libxl_conf.c | 2 +-
src/network/leaseshelper.c | 4 ++--
src/qemu/qemu_command.c | 2 +-
src/qemu/qemu_domain.c | 4 ++--
src/qemu/qemu_driver.c | 4 ++--
src/qemu/qemu_hotplug.c | 4 ++--
src/qemu/qemu_migration.c | 2 +-
src/qemu/qemu_monitor.c | 6 ++++++
src/remote/remote_driver.c | 2 +-
src/rpc/virnetclientprogram.c | 4 ++--
src/rpc/virnetservermdns.c | 2 +-
src/storage/storage_driver.c | 2 +-
src/util/virconf.c | 2 +-
src/util/virhashcode.c | 6 +++---
src/util/virnetdevbridge.c | 1 +
src/util/virutil.c | 10 +++++-----
tools/virsh-domain.c | 4 ++--
tools/virsh.c | 2 +-
tools/virt-admin.c | 2 +-
23 files changed, 46 insertions(+), 39 deletions(-)
--
2.5.5
7 years, 6 months
[libvirt] [PATCH v2 0/8] Add new JSON pseudo-protocol support for qemu 2.9 changes
by Peter Krempa
Patches 1-3 of old series were pushed already.
Patch 1 of this series is new and adapts to change in 'SocketAddress' in qemu.
Patches 2 and 3 needed to be modified because of patch 1.
Patch 4 fixes the 'lun' field and splits the portal into host and port.
There are a few changes in the rest of the patches, mostly changes from 'tcp' to
'inet' in the test suite.
Peter Krempa (8):
util: storage: Add support for type 'inet' in
virStorageSourceParseBackingJSONSocketAddress
util: storage: Split out parsing of TCP network host from JSON
pseudoprotocol
util: storage: Report errors when source host data is missing
util: storage: Add JSON parser for new options in iSCSI protocol
util: storage: adapt to changes in JSON format for NBD
util: storage: adapt to changes in JSON format for ceph/rbd
util: storage: adapt to changes in JSON format for ssh
util: storage: adapt to changes in JSON format for sheepdog
src/util/virstoragefile.c | 270 ++++++++++++++++++++++++++++++++++++----------
tests/virstoragetest.c | 73 ++++++++++++-
2 files changed, 283 insertions(+), 60 deletions(-)
--
2.12.2
7 years, 6 months
[libvirt] [PATCH] bhyve: add vga configuration for video driver
by Roman Bogorodskiy
Add support for vgaconf driver configuration. In domain xml it looks like
this:
<video>
<driver vgaconf='io|on|off'>
<model .../>
</video>
It was added with bhyve gop video in mind to allow users control how the
video device is exposed to the guest, specifically, how VGA I/O is
handled.
One can refer to the bhyve manual page to get more detailed description
of the possible VGA configuration options:
https://www.freebsd.org/cgi/man.cgi?query=bhyve&manpath=FreeBSD+12-current
The relevant part could be found using the 'vgaconf' keyword.
Also, add some tests for this new feature.
Signed-off-by: Roman Bogorodskiy <bogorodskiy(a)gmail.com>
---
Changes from v1:
* Rebased on top of current master. Specifically, the most important bit
was merging with f5384fb4 which has added video/driver element
* In conjunction with f5384fb4 use video/driver element instead of
video/model/driver
* Squash in conf and bhyve patches to make it easier to understand how
it's used
* Rename *Vgaconf* to *VGAConf*
* Add a little more tests
docs/schemas/domaincommon.rng | 13 ++++-
src/bhyve/bhyve_command.c | 4 ++
src/conf/domain_conf.c | 57 ++++++++++++++++++++--
src/conf/domain_conf.h | 17 +++++++
src/libvirt_private.syms | 2 +
.../bhyvexml2argv-vnc-vgaconf-io.args | 12 +++++
.../bhyvexml2argv-vnc-vgaconf-io.ldargs | 1 +
.../bhyvexml2argv-vnc-vgaconf-io.xml | 30 ++++++++++++
.../bhyvexml2argv-vnc-vgaconf-off.args | 12 +++++
.../bhyvexml2argv-vnc-vgaconf-off.ldargs | 1 +
.../bhyvexml2argv-vnc-vgaconf-off.xml | 30 ++++++++++++
.../bhyvexml2argv-vnc-vgaconf-on.args | 12 +++++
.../bhyvexml2argv-vnc-vgaconf-on.ldargs | 1 +
.../bhyvexml2argv-vnc-vgaconf-on.xml | 30 ++++++++++++
tests/bhyvexml2argvtest.c | 3 ++
.../bhyvexml2xmlout-vnc-vgaconf-io.xml | 41 ++++++++++++++++
.../bhyvexml2xmlout-vnc-vgaconf-off.xml | 42 ++++++++++++++++
.../bhyvexml2xmlout-vnc-vgaconf-on.xml | 42 ++++++++++++++++
tests/bhyvexml2xmltest.c | 3 ++
19 files changed, 348 insertions(+), 5 deletions(-)
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-io.args
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-io.ldargs
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-io.xml
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-off.args
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-off.ldargs
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-off.xml
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-on.args
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-on.ldargs
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-on.xml
create mode 100644 tests/bhyvexml2xmloutdata/bhyvexml2xmlout-vnc-vgaconf-io.xml
create mode 100644 tests/bhyvexml2xmloutdata/bhyvexml2xmlout-vnc-vgaconf-off.xml
create mode 100644 tests/bhyvexml2xmloutdata/bhyvexml2xmlout-vnc-vgaconf-on.xml
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
index 4950ddc10..51acac3ee 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -3220,7 +3220,18 @@
<element name="video">
<optional>
<element name="driver">
- <ref name="virtioOptions"/>
+ <optional>
+ <ref name="virtioOptions"/>
+ </optional>
+ <optional>
+ <attribute name="vgaconf">
+ <choice>
+ <value>io</value>
+ <value>on</value>
+ <value>off</value>
+ </choice>
+ </attribute>
+ </optional>
</element>
</optional>
<optional>
diff --git a/src/bhyve/bhyve_command.c b/src/bhyve/bhyve_command.c
index eae5cb3ca..b3ae315bd 100644
--- a/src/bhyve/bhyve_command.c
+++ b/src/bhyve/bhyve_command.c
@@ -408,6 +408,10 @@ bhyveBuildGraphicsArgStr(const virDomainDef *def ATTRIBUTE_UNUSED,
_("Unsupported listen type"));
}
+ if (video->driver)
+ virBufferAsprintf(&opt, ",vga=%s",
+ virDomainVideoVGAConfTypeToString(video->driver->vgaconf));
+
virCommandAddArg(cmd, "-s");
virCommandAddArgBuffer(cmd, &opt);
return 0;
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 4f79d3825..1e9f91ca8 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -560,6 +560,11 @@ VIR_ENUM_IMPL(virDomainVideo, VIR_DOMAIN_VIDEO_TYPE_LAST,
"virtio",
"gop")
+VIR_ENUM_IMPL(virDomainVideoVGAConf, VIR_DOMAIN_VIDEO_VGACONF_LAST,
+ "io",
+ "on",
+ "off")
+
VIR_ENUM_IMPL(virDomainInput, VIR_DOMAIN_INPUT_TYPE_LAST,
"mouse",
"tablet",
@@ -2355,6 +2360,7 @@ void virDomainVideoDefFree(virDomainVideoDefPtr def)
VIR_FREE(def->accel);
VIR_FREE(def->virtio);
+ VIR_FREE(def->driver);
VIR_FREE(def);
}
@@ -13529,6 +13535,43 @@ virDomainVideoAccelDefParseXML(xmlNodePtr node)
return def;
}
+static virDomainVideoDriverDefPtr
+virDomainVideoDriverDefParseXML(xmlNodePtr node)
+{
+ xmlNodePtr cur;
+ virDomainVideoDriverDefPtr def;
+ char *vgaconf = NULL;
+ int val;
+
+ cur = node->children;
+ while (cur != NULL) {
+ if (cur->type == XML_ELEMENT_NODE) {
+ if (!vgaconf &&
+ xmlStrEqual(cur->name, BAD_CAST "driver")) {
+ vgaconf = virXMLPropString(cur, "vgaconf");
+ }
+ }
+ cur = cur->next;
+ }
+
+ if (!vgaconf)
+ return NULL;
+
+ if (VIR_ALLOC(def) < 0)
+ goto cleanup;
+
+ if ((val = virDomainVideoVGAConfTypeFromString(vgaconf)) <= 0) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ _("unknown vgaconf value '%s'"), vgaconf);
+ goto cleanup;
+ }
+ def->vgaconf = val;
+
+ cleanup:
+ VIR_FREE(vgaconf);
+ return def;
+}
+
static virDomainVideoDefPtr
virDomainVideoDefParseXML(xmlNodePtr node,
xmlXPathContextPtr ctxt,
@@ -13652,6 +13695,8 @@ virDomainVideoDefParseXML(xmlNodePtr node,
if (virDomainVirtioOptionsParseXML(ctxt, &def->virtio) < 0)
goto error;
+ def->driver = virDomainVideoDriverDefParseXML(node);
+
cleanup:
ctxt->node = saved;
@@ -23386,7 +23431,6 @@ virDomainVideoAccelDefFormat(virBufferPtr buf,
virBufferAddLit(buf, "/>\n");
}
-
static int
virDomainVideoDefFormat(virBufferPtr buf,
virDomainVideoDefPtr def,
@@ -23406,9 +23450,13 @@ virDomainVideoDefFormat(virBufferPtr buf,
virDomainVirtioOptionsFormat(&driverBuf, def->virtio);
if (virBufferCheckError(&driverBuf) < 0)
return -1;
- if (virBufferUse(&driverBuf)) {
+ if (virBufferUse(&driverBuf) || (def->driver && def->driver->vgaconf)) {
virBufferAddLit(buf, "<driver");
- virBufferAddBuffer(buf, &driverBuf);
+ if (virBufferUse(&driverBuf))
+ virBufferAddBuffer(buf, &driverBuf);
+ if (def->driver && def->driver->vgaconf)
+ virBufferAsprintf(buf, " vgaconf='%s'",
+ virDomainVideoVGAConfTypeToString(def->driver->vgaconf));
virBufferAddLit(buf, "/>\n");
}
virBufferAsprintf(buf, "<model type='%s'",
@@ -23428,7 +23476,8 @@ virDomainVideoDefFormat(virBufferPtr buf,
if (def->accel) {
virBufferAddLit(buf, ">\n");
virBufferAdjustIndent(buf, 2);
- virDomainVideoAccelDefFormat(buf, def->accel);
+ if (def->accel)
+ virDomainVideoAccelDefFormat(buf, def->accel);
virBufferAdjustIndent(buf, -2);
virBufferAddLit(buf, "</model>\n");
} else {
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index 6d9ee9787..964bc02f9 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -1359,6 +1359,16 @@ typedef enum {
} virDomainVideoType;
+typedef enum {
+ VIR_DOMAIN_VIDEO_VGACONF_IO = 0,
+ VIR_DOMAIN_VIDEO_VGACONF_ON,
+ VIR_DOMAIN_VIDEO_VGACONF_OFF,
+
+ VIR_DOMAIN_VIDEO_VGACONF_LAST
+} virDomainVideoVGAConf;
+
+VIR_ENUM_DECL(virDomainVideoVGAConf)
+
typedef struct _virDomainVideoAccelDef virDomainVideoAccelDef;
typedef virDomainVideoAccelDef *virDomainVideoAccelDefPtr;
struct _virDomainVideoAccelDef {
@@ -1367,6 +1377,12 @@ struct _virDomainVideoAccelDef {
};
+typedef struct _virDomainVideoDriverDef virDomainVideoDriverDef;
+typedef virDomainVideoDriverDef *virDomainVideoDriverDefPtr;
+struct _virDomainVideoDriverDef {
+ virDomainVideoVGAConf vgaconf;
+};
+
struct _virDomainVideoDef {
int type;
unsigned int ram; /* kibibytes (multiples of 1024) */
@@ -1376,6 +1392,7 @@ struct _virDomainVideoDef {
unsigned int heads;
bool primary;
virDomainVideoAccelDefPtr accel;
+ virDomainVideoDriverDefPtr driver;
virDomainDeviceInfo info;
virDomainVirtioOptionsPtr virtio;
};
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 044510f09..41ca62631 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -530,6 +530,8 @@ virDomainVideoDefaultType;
virDomainVideoDefFree;
virDomainVideoTypeFromString;
virDomainVideoTypeToString;
+virDomainVideoVGAConfTypeFromString;
+virDomainVideoVGAConfTypeToString;
virDomainVirtTypeFromString;
virDomainVirtTypeToString;
virDomainWatchdogActionTypeFromString;
diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-io.args b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-io.args
new file mode 100644
index 000000000..da3797100
--- /dev/null
+++ b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-io.args
@@ -0,0 +1,12 @@
+/usr/sbin/bhyve \
+-c 1 \
+-m 214 \
+-u \
+-H \
+-P \
+-s 0:0,hostbridge \
+-l bootrom,/path/to/test.fd \
+-s 2:0,ahci,hd:/tmp/freebsd.img \
+-s 3:0,virtio-net,faketapdev,mac=52:54:00:00:00:00 \
+-s 4:0,fbuf,tcp=127.0.0.1:5904,vga=io \
+-s 1,lpc bhyve
diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-io.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-io.ldargs
new file mode 100644
index 000000000..421376db9
--- /dev/null
+++ b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-io.ldargs
@@ -0,0 +1 @@
+dummy
diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-io.xml b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-io.xml
new file mode 100644
index 000000000..b1bb3793d
--- /dev/null
+++ b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-io.xml
@@ -0,0 +1,30 @@
+<domain type='bhyve'>
+ <name>bhyve</name>
+ <uuid>df3be7e7-a104-11e3-aeb0-50e5492bd3dc</uuid>
+ <memory>219136</memory>
+ <vcpu>1</vcpu>
+ <os>
+ <type>hvm</type>
+ <loader readonly="yes" type="pflash">/path/to/test.fd</loader>
+ </os>
+ <devices>
+ <disk type='file'>
+ <driver name='file' type='raw'/>
+ <source file='/tmp/freebsd.img'/>
+ <target dev='hda' bus='sata'/>
+ <address type='drive' controller='0' bus='0' target='2' unit='0'/>
+ </disk>
+ <interface type='bridge'>
+ <model type='virtio'/>
+ <source bridge="virbr0"/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+ </interface>
+ <graphics type='vnc' port='5904'>
+ <listen type='address' address='127.0.0.1'/>
+ </graphics>
+ <video>
+ <driver vgaconf="io"/>
+ <model type='gop' heads='1' primary='yes'/>
+ </video>
+ </devices>
+</domain>
diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-off.args b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-off.args
new file mode 100644
index 000000000..70347ee0b
--- /dev/null
+++ b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-off.args
@@ -0,0 +1,12 @@
+/usr/sbin/bhyve \
+-c 1 \
+-m 214 \
+-u \
+-H \
+-P \
+-s 0:0,hostbridge \
+-l bootrom,/path/to/test.fd \
+-s 2:0,ahci,hd:/tmp/freebsd.img \
+-s 3:0,virtio-net,faketapdev,mac=52:54:00:00:00:00 \
+-s 4:0,fbuf,tcp=127.0.0.1:5904,vga=off \
+-s 1,lpc bhyve
diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-off.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-off.ldargs
new file mode 100644
index 000000000..421376db9
--- /dev/null
+++ b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-off.ldargs
@@ -0,0 +1 @@
+dummy
diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-off.xml b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-off.xml
new file mode 100644
index 000000000..6e9582840
--- /dev/null
+++ b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-off.xml
@@ -0,0 +1,30 @@
+<domain type='bhyve'>
+ <name>bhyve</name>
+ <uuid>df3be7e7-a104-11e3-aeb0-50e5492bd3dc</uuid>
+ <memory>219136</memory>
+ <vcpu>1</vcpu>
+ <os>
+ <type>hvm</type>
+ <loader readonly="yes" type="pflash">/path/to/test.fd</loader>
+ </os>
+ <devices>
+ <disk type='file'>
+ <driver name='file' type='raw'/>
+ <source file='/tmp/freebsd.img'/>
+ <target dev='hda' bus='sata'/>
+ <address type='drive' controller='0' bus='0' target='2' unit='0'/>
+ </disk>
+ <interface type='bridge'>
+ <model type='virtio'/>
+ <source bridge="virbr0"/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+ </interface>
+ <graphics type='vnc' port='5904'>
+ <listen type='address' address='127.0.0.1'/>
+ </graphics>
+ <video>
+ <driver vgaconf="off"/>
+ <model type='gop' heads='1' primary='yes'/>
+ </video>
+ </devices>
+</domain>
diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-on.args b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-on.args
new file mode 100644
index 000000000..d0e1d81e2
--- /dev/null
+++ b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-on.args
@@ -0,0 +1,12 @@
+/usr/sbin/bhyve \
+-c 1 \
+-m 214 \
+-u \
+-H \
+-P \
+-s 0:0,hostbridge \
+-l bootrom,/path/to/test.fd \
+-s 2:0,ahci,hd:/tmp/freebsd.img \
+-s 3:0,virtio-net,faketapdev,mac=52:54:00:00:00:00 \
+-s 4:0,fbuf,tcp=127.0.0.1:5904,vga=on \
+-s 1,lpc bhyve
diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-on.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-on.ldargs
new file mode 100644
index 000000000..421376db9
--- /dev/null
+++ b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-on.ldargs
@@ -0,0 +1 @@
+dummy
diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-on.xml b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-on.xml
new file mode 100644
index 000000000..a270f6334
--- /dev/null
+++ b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-on.xml
@@ -0,0 +1,30 @@
+<domain type='bhyve'>
+ <name>bhyve</name>
+ <uuid>df3be7e7-a104-11e3-aeb0-50e5492bd3dc</uuid>
+ <memory>219136</memory>
+ <vcpu>1</vcpu>
+ <os>
+ <type>hvm</type>
+ <loader readonly="yes" type="pflash">/path/to/test.fd</loader>
+ </os>
+ <devices>
+ <disk type='file'>
+ <driver name='file' type='raw'/>
+ <source file='/tmp/freebsd.img'/>
+ <target dev='hda' bus='sata'/>
+ <address type='drive' controller='0' bus='0' target='2' unit='0'/>
+ </disk>
+ <interface type='bridge'>
+ <model type='virtio'/>
+ <source bridge="virbr0"/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+ </interface>
+ <graphics type='vnc' port='5904'>
+ <listen type='address' address='127.0.0.1'/>
+ </graphics>
+ <video>
+ <driver vgaconf="on"/>
+ <model type='gop' heads='1' primary='yes'/>
+ </video>
+ </devices>
+</domain>
diff --git a/tests/bhyvexml2argvtest.c b/tests/bhyvexml2argvtest.c
index c8f8c685a..72f10ebc1 100644
--- a/tests/bhyvexml2argvtest.c
+++ b/tests/bhyvexml2argvtest.c
@@ -193,6 +193,9 @@ mymain(void)
DO_TEST("net-e1000");
DO_TEST("uefi");
DO_TEST("vnc");
+ DO_TEST("vnc-vgaconf-on");
+ DO_TEST("vnc-vgaconf-off");
+ DO_TEST("vnc-vgaconf-io");
/* Address allocation tests */
DO_TEST("addr-single-sata-disk");
diff --git a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-vnc-vgaconf-io.xml b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-vnc-vgaconf-io.xml
new file mode 100644
index 000000000..9e470e432
--- /dev/null
+++ b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-vnc-vgaconf-io.xml
@@ -0,0 +1,41 @@
+<domain type='bhyve'>
+ <name>bhyve</name>
+ <uuid>df3be7e7-a104-11e3-aeb0-50e5492bd3dc</uuid>
+ <memory unit='KiB'>219136</memory>
+ <currentMemory unit='KiB'>219136</currentMemory>
+ <vcpu placement='static'>1</vcpu>
+ <os>
+ <type arch='x86_64'>hvm</type>
+ <loader readonly='yes' type='pflash'>/path/to/test.fd</loader>
+ <boot dev='hd'/>
+ </os>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>destroy</on_crash>
+ <devices>
+ <disk type='file' device='disk'>
+ <driver name='file' type='raw'/>
+ <source file='/tmp/freebsd.img'/>
+ <target dev='hda' bus='sata'/>
+ <address type='drive' controller='0' bus='0' target='2' unit='0'/>
+ </disk>
+ <controller type='pci' index='0' model='pci-root'/>
+ <controller type='sata' index='0'>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
+ </controller>
+ <interface type='bridge'>
+ <mac address='52:54:00:00:00:00'/>
+ <source bridge='virbr0'/>
+ <model type='virtio'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+ </interface>
+ <graphics type='vnc' port='5904' autoport='no' listen='127.0.0.1'>
+ <listen type='address' address='127.0.0.1'/>
+ </graphics>
+ <video>
+ <model type='gop' heads='1' primary='yes'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
+ </video>
+ </devices>
+</domain>
diff --git a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-vnc-vgaconf-off.xml b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-vnc-vgaconf-off.xml
new file mode 100644
index 000000000..89c4ceac5
--- /dev/null
+++ b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-vnc-vgaconf-off.xml
@@ -0,0 +1,42 @@
+<domain type='bhyve'>
+ <name>bhyve</name>
+ <uuid>df3be7e7-a104-11e3-aeb0-50e5492bd3dc</uuid>
+ <memory unit='KiB'>219136</memory>
+ <currentMemory unit='KiB'>219136</currentMemory>
+ <vcpu placement='static'>1</vcpu>
+ <os>
+ <type arch='x86_64'>hvm</type>
+ <loader readonly='yes' type='pflash'>/path/to/test.fd</loader>
+ <boot dev='hd'/>
+ </os>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>destroy</on_crash>
+ <devices>
+ <disk type='file' device='disk'>
+ <driver name='file' type='raw'/>
+ <source file='/tmp/freebsd.img'/>
+ <target dev='hda' bus='sata'/>
+ <address type='drive' controller='0' bus='0' target='2' unit='0'/>
+ </disk>
+ <controller type='pci' index='0' model='pci-root'/>
+ <controller type='sata' index='0'>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
+ </controller>
+ <interface type='bridge'>
+ <mac address='52:54:00:00:00:00'/>
+ <source bridge='virbr0'/>
+ <model type='virtio'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+ </interface>
+ <graphics type='vnc' port='5904' autoport='no' listen='127.0.0.1'>
+ <listen type='address' address='127.0.0.1'/>
+ </graphics>
+ <video>
+ <driver vgaconf='off'/>
+ <model type='gop' heads='1' primary='yes'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
+ </video>
+ </devices>
+</domain>
diff --git a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-vnc-vgaconf-on.xml b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-vnc-vgaconf-on.xml
new file mode 100644
index 000000000..86d893936
--- /dev/null
+++ b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-vnc-vgaconf-on.xml
@@ -0,0 +1,42 @@
+<domain type='bhyve'>
+ <name>bhyve</name>
+ <uuid>df3be7e7-a104-11e3-aeb0-50e5492bd3dc</uuid>
+ <memory unit='KiB'>219136</memory>
+ <currentMemory unit='KiB'>219136</currentMemory>
+ <vcpu placement='static'>1</vcpu>
+ <os>
+ <type arch='x86_64'>hvm</type>
+ <loader readonly='yes' type='pflash'>/path/to/test.fd</loader>
+ <boot dev='hd'/>
+ </os>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>destroy</on_crash>
+ <devices>
+ <disk type='file' device='disk'>
+ <driver name='file' type='raw'/>
+ <source file='/tmp/freebsd.img'/>
+ <target dev='hda' bus='sata'/>
+ <address type='drive' controller='0' bus='0' target='2' unit='0'/>
+ </disk>
+ <controller type='pci' index='0' model='pci-root'/>
+ <controller type='sata' index='0'>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
+ </controller>
+ <interface type='bridge'>
+ <mac address='52:54:00:00:00:00'/>
+ <source bridge='virbr0'/>
+ <model type='virtio'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+ </interface>
+ <graphics type='vnc' port='5904' autoport='no' listen='127.0.0.1'>
+ <listen type='address' address='127.0.0.1'/>
+ </graphics>
+ <video>
+ <driver vgaconf='on'/>
+ <model type='gop' heads='1' primary='yes'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
+ </video>
+ </devices>
+</domain>
diff --git a/tests/bhyvexml2xmltest.c b/tests/bhyvexml2xmltest.c
index b3759919e..8e41088a8 100644
--- a/tests/bhyvexml2xmltest.c
+++ b/tests/bhyvexml2xmltest.c
@@ -105,6 +105,9 @@ mymain(void)
DO_TEST_DIFFERENT("serial-grub");
DO_TEST_DIFFERENT("serial-grub-nocons");
DO_TEST_DIFFERENT("vnc");
+ DO_TEST_DIFFERENT("vnc-vgaconf-on");
+ DO_TEST_DIFFERENT("vnc-vgaconf-off");
+ DO_TEST_DIFFERENT("vnc-vgaconf-io");
/* Address allocation tests */
DO_TEST_DIFFERENT("addr-single-sata-disk");
--
2.13.0
7 years, 6 months