[libvirt] Release of libvirt-0.8.7
by Daniel Veillard
The New Year gift just arrived :-)
As expected I made the release this morning, it is available
as usual at:
ftp://libvirt.org/libvirt/libvirt-0.8.7.tar.gz
Due to specific condition (without my workstation and networking
troubles) the release was made a bit differently than usual, but hopefully
that won't lead to troubles, the only thing noticeable should be that
the rpm are not signed and I didn't push a tag for the release commit,
maybe Eric or Dan can push a git tag for it with their key.
The release include among other things new hypervisors support, and a
lot of bugs fixes:
Features:
- Initial support for VirtualBox 4.0 (Matthias Bolte)
- IPv6 support (Laine Stump)
- Add VMware Workstation and Player driver (Jean-Baptiste Rouault)
- add network disk support (MORITA Kazutaka and Josh Durgin)
Documentation:
- esx: Fix "occurence" typo (again) (Matthias Bolte)
- update docs for network disks (MORITA Kazutaka)
- docs: Make VMware Workstation / Player page appear in the menu (Matthias Bolte)
- Add info about VMware driver to the libvirt website (Jean-Baptiste Rouault)
- docs: fixed typo, added table of contents (Justin Clift)
- docs: added compiling page and significantly expanded windows page (Justin Clift)
- docs: Add additional indentation to level 3 menu items (Matthias Bolte)
- maint: doc fix (Eric Blake)
- Update documentation of watchdog dump option and add test data for it (Hu Tao)
- virsh: fix a typo in the memtune help description (Justin Clift)
- docs: updated virsh command reference download links to new version (Justin Clift)
- Moved the nodeinfo command to the 'host' help keyword group (Justin Clift)
- man pages: update the description for the virsh help command (Justin Clift)
- virsh: move two commands from domain group to storage pool group (Osier Yang)
- virCommand: docs for usage of new command APIs (Daniel P. Berrange)
- virsh: update help for "virsh help help" (Osier Yang)
- virsh: remove a badly placed line break in virsh -h output (Justin Clift)
- virsh: Categorize commands into groups for virsh help (Osier Yang)
Portability:
- vbox: Handle different IID representation in Version 2.2 on Windows (Matthias Bolte)
- build: make building on cygwin easier (Eric Blake)
- build: improve testsuite results with older automake (Eric Blake)
- build: allow older libselinux again (Eric Blake)
- build: allow autoconf 2.59 again (Eric Blake)
- build: allow mingw compilation with virCommand (Eric Blake)
- build: quote AC_LANG_PROGRAM to avoid warnings with autoconf 2.68 (Diego Elio Pettenò)
- build: properly handle ./configure --with-libpcap (Diego Elio Pettenò)
- build: avoid shadowing devname() on BSD systems (Eric Blake)
- Fix undefined symbol errors when macvtap support is disabled (Matthias Bolte)
- Fix warning when macvtap support is disabled (Jean-Baptiste Rouault)
Bug fixes:
- virExec: fix logic bug (Eric Blake)
- Set broadcast address for IPv4 addresses on virtual network bridges (Laine Stump)
- Fix misuse of VIR_ERR_INVALID_DOMAIN (Matthias Bolte)
- build: fix building error when building without libvirtd (Wen Congyang)
- spec: Enable ESX driver on RHEL (Jiri Denemark)
- bridge: Fix uninitialized variable (Jiri Denemark)
- make the <dhcp> element optional in network.rng (Laine Stump)
- fix syntax error in configure.ac (Wen Congyang)
- qemu: Reparent children when deleting a snapshot (Matthias Bolte)
- Set bitmap size when allocating a bitmap (Jim Fehlig)
- qemu: Return SPICE ports on domain shutdown (Jiri Denemark)
- virterror: avoid API breakage with vmware (Eric Blake)
- Fix memory leak in virsh (Hu Tao)
- Distribute libvirt_vmx.syms (Matthias Bolte)
- vmware: Fix undefine symbol with loadable drivers enabled (Matthias Bolte)
- esx: Fix cluster resource lookup when connecting to a vCenter (Matthias Bolte)
- command: avoid hanging on daemon processes (Eric Blake)
- storage: Ignore dangling symbolic link for filesystem pool (Osier Yang)
- Skip file-based security checks for network disks (Josh Durgin)
- tests: avoid data race (Eric Blake)
- bridge_driver: avoid double call to VIR_FREE (Paweł Krześniak)
- vbox: Don't leak domain names in vboxListDefinedDomains (Matthias Bolte)
- vbox: Don't leak arrays from XPCOM (Matthias Bolte)
- build: fix typo that broke 'make dist' (Eric Blake)
- util: Fix logical error in virReportSystemErrorFull (Jiri Denemark)
- util: Fix error message in __virExec (Jiri Denemark)
- daemon: Change CWD to / before daemonizing (Jiri Denemark)
- daemon, threads: plug a memory leak (Eric Blake)
- daemon: plug a memory leak (Eric Blake)
- conf: plug memory leaks (Eric Blake)
- tests: plug memory leaks (Eric Blake)
- virExec: avoid undefined behavior (Eric Blake)
- command: plug memory leak (Eric Blake)
- build: distribute commandtest files (Eric Blake)
- spec: do not start libvirt-guests if that service is off (Dan Kenigsberg)
- correct the signal's name (Wen Congyang)
- command: avoid memory leak (Eric Blake)
- qemu: call drive_del in DetachPciDiskDevice (Ryan Harper)
- qemu: call drive_unplug in DetachPciDiskDevice (Ryan Harper)
- qemud: fix memory leak in io error events (Anthony Liguori)
- qemu: Enable disabled debug messages (Jiri Denemark)
- qemu: Use -vga none only if it is supported (Jiri Denemark)
- openvz: avoid potential buffer overflow (Eric Blake)
- tests: fix leaks in commandtest (Eric Blake)
- uuid: require smbios uuid and domain uuid to match (Eric Blake)
- qemu: avoid adding "" in smbios arguments (Eric Blake)
- Fix funny off-by-one error in clock-variable (Dan Kenigsberg)
- syntax error "Bad fd number" when stopping libvirt-guests (Laurent Léonard)
- util: Fix bug which will cause libvirtd crash (Osier Yang)
- qemu: Fix a possible deadlock in p2p migration (Jiri Denemark)
- qemu: Don't try to set input FD to -1 (Matthias Bolte)
- Fix memory leak in logging setup (Daniel P. Berrange)
- schemas: Fix cpu element schema (Jiri Denemark)
- virsh: Remove using phy as default disk driver in cmdAttachDisk (Osier Yang)
- OpenVZ: drop fd leackage (Guido Günther)
- qemu: plug memory leak (Eric Blake)
- libvirtd: avoid memory leak on shutdown (Eric Blake)
- Fix flaw in thread creation APIs (Daniel P. Berrange)
Improvements:
- build: avoid compilation warnings (Eric Blake)
- Improve virSocketAddrMask[ByPrefix] API (Laine Stump)
- Utility functions to produce an IPv4 broadcast address (Laine Stump)
- qemu: add -incoming fd:n capability checking (Eric Blake)
- spec: Automatically turn on cgconfig service (Daniel P. Berrange)
- Replace setuid/setgid/initgroups with virSetUIDGID() (Laine Stump)
- new virSetUIDGID() utility function (Laine Stump)
- Preserve errno across calls to error reporting functions & VIR_FREE (Laine Stump)
- Run radvd for virtual networks with IPv6 addresses (Laine Stump)
- Turn on IPv6 support in the bridge_driver.c virtual network driver (Laine Stump)
- Update iptables.c to also support ip6tables. (Laine Stump)
- Support multiple IP addresses on one network in bridge_driver.c (Laine Stump)
- Change virtual network XML parsing/formatting to support IPv6 (Laine Stump)
- Replace brSetInetAddress/brSetInetNetmask with brAddInetAddress (Laine Stump)
- Make virtual network netmasks optional (Laine Stump)
- Pass prefix rather than netmask into iptables functions (Laine Stump)
- Consistently return 0 on success, -1 on failure in bridge_driver.c (Laine Stump)
- Fix logging of failed iptables commands (Laine Stump)
- New virNetworkDef utility functions (Laine Stump)
- New virSocketAddr utility functions (Laine Stump)
- virsh: Add --force option to update-device (Jiri Denemark)
- esx: Add support for storage volume wiping (Matthias Bolte)
- esx: Add support for storage volume deletion (Matthias Bolte)
- maint: avoid space-tab (Eric Blake)
- build: skip vmware driver when building for RHEL (Eric Blake)
- tests: avoid spurious failure of nodeinfotest (Eric Blake)
- libvirt-guests: avoid sourcing failure (Eric Blake)
- vbox: Handle different array representations of XPCOM and MSCOM (Matthias Bolte)
- vbox: Add glue layer for MSCOM on Windows (Matthias Bolte)
- vbox: Match struct layout of the MSCOM implementation on Windows (Matthias Bolte)
- vbox: Use stdcall convention for all COM methods on Windows (Matthias Bolte)
- maint: improve tests distribution (Eric Blake)
- Update QEMU test cases for new file locations & API renames (Daniel P. Berrange)
- Move QEMU hotplug helper code out of the QEMU driver (Daniel P. Berrange)
- Move QEMU domain lock / job helper code to separate file (Daniel P. Berrange)
- Move QEMU driver lock helpers to a separate file (Daniel P. Berrange)
- Move QEMU hostdev helper code out of the QEMU driver (Daniel P. Berrange)
- Move QEMU cgroup helper code out of the QEMU driver (Daniel P. Berrange)
- Move QEMU audit helper code out of the QEMU driver (Daniel P. Berrange)
- Move QEMU private data & namespace code into separate file (Daniel P. Berrange)
- Move QEMU command line management into a separate file (Daniel P. Berrange)
- Move QEMU capabilities management into a separate file (Daniel P. Berrange)
- Add a new function doStartCPUs (Hu Tao)
- Add a new function doStopCPUs (Hu Tao)
- Add a macro timeval_to_ms to compute micro seconds from timeval (Hu Tao)
- cpu: Unify CPUID data structures (Jiri Denemark)
- esx: Add support for storage volume cloning (Matthias Bolte)
- selinux: avoid memory overhead of matchpathcon (Eric Blake)
- tests: test Fedora 14 qemu-kvm -help parsing (Eric Blake)
- tests: test RHEL 6.0 qemu-kvm -help parsing (Eric Blake)
- sysinfo: convert to virCommand (Eric Blake)
- build: update gnulib for pipe on mingw (Eric Blake)
- test: fix commandtest under autobuild.sh (Eric Blake)
- qemu: Introduce two new job types (Osier Yang)
- qemu: Add RBD support and some network disk fixes (Josh Durgin)
- Missing "Default-Stop" field in LSB comment in libvirt-guests (Laurent Léonard)
- 802.1Qbh: Add support for IFLA_VF_MAC (Roopa Prabhu)
- command: ease use with virBuffer, and fix qemu leak (Eric Blake)
- Convert dhcpStartDhcpDaemon from virRun to virCommand (Laine Stump)
- esx: Refactor storage pool type lookup into a function (Matthias Bolte)
- esx: Improve error reporting for failed tasks (Matthias Bolte)
- tests: Add tests for network disks (Josh Durgin)
- Add a watchdog action `dump' (Hu Tao)
- Add a new function doCoreDump (Hu Tao)
- threadpool impl (Hu Tao)
- qemu: Distinguish between domain shutdown and crash (Jiri Denemark)
- qemu: Only build devstr when needs (attach PCI controller) (Osier Yang)
- configure: improve misleading libnl missing error message (Justin Clift)
- maint: update to latest gnulib (Eric Blake)
- openvz: convert popen to virCommand (Eric Blake)
- command: improve behavior on no output (Eric Blake)
- command: enforce fd vs. buffer considerations (Eric Blake)
- tests: Fix commandtest in VPATH build (Jiri Denemark)
- command: improve allocation failure reporting (Eric Blake)
- tests: Fix detection of expected error (Jiri Denemark)
- tests: Fix code formating in commandtest (Jiri Denemark)
- smbios: allow () in smbios strings (Eric Blake)
- smbios: support system family (Eric Blake)
- threads: add virThreadID for debugging use (Eric Blake)
- tests: Don't ignore return value of getcwd() (Jiri Denemark)
- build: Fix internal docs generation in VPATH builds (Jiri Denemark)
- Change return value of VIR_DRV_SUPPORTS_FEATURE to bool (Jiri Denemark)
- Implement virVMOperationType{To|From}String independent from WITH_MACVTAP (Matthias Bolte)
- Create file in virFileWriteStr() if it doesn't exist (Jean-Baptiste Rouault)
- Remove bogus includes (Daniel P. Berrange)
- uml: convert to virCommand (Daniel P. Berrange)
- qemu: convert to virCommand (Eric Blake)
- Port hooks and iptables code to new command execution APIs (Daniel P. Berrange)
- Introduce new APIs for spawning processes (Daniel P. Berrange)
- util: add virVasprintf (Eric Blake)
- util: fix saferead type (Eric Blake)
- Tweak daemon event debug to include errno (Daniel P. Berrange)
- tests: Add tests for CPU selection in qemu driver (Jiri Denemark)
- tests: Support for faking emulator in qemuxml2argv (Jiri Denemark)
- maint: update .gitignore (Eric Blake)
- qemu: Use macro for max and min vnc port instead of number (Osier Yang)
- tests: Add unit tests for internal CPU APIs (Jiri Denemark)
- cpu: Add support for overriding path to CPU map XML file (Jiri Denemark)
- Fall back to QEMUD_SAVE_FORMAT_RAW if compression method fails. (Hu Tao)
Cleanups:
- esx: Move VMX handling code out of the driver directory (Matthias Bolte)
- qemu: use virAsprintf instead of PATH_MAX (Eric Blake)
- build: fix typo that broke 'make dist' (Wen Congyang)
- sysinfo: formatting cleanups (Eric Blake)
- virsh: Remove redundant commands in group domain (Osier Yang)
- virsh: Remove redundant optional option for cmdHelp (Osier Yang)
- qemu: Fix typo in qemuTeardownDiskPathDeny (Osier Yang)
- maint: allow 'make syntax-check' to run again (Eric Blake)
thanks everybody who helped for this release, with ideas, patches
report or documentation !
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
daniel(a)veillard.com | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library http://libvirt.org/
13 years, 10 months
[libvirt] cgroup limits only affect kvm guest under certain conditions
by Dominik Klein
Hi
I am playing with cgroups and try to limit block io for guests.
The proof of concept is:
# mkdir /dev/cgroup/blkio
# mount -t cgroup -o blkio blkio /dev/cgroup/blkio/
# cd blkio/
# mkdir test
# cd test/
# ls -l /dev/vdisks/kirk
lrwxrwxrwx 1 root root 7 2011-01-06 13:46 /dev/vdisks/kirk -> ../dm-5
# ls -l /dev/dm-5
brw-rw---- 1 root disk 253, 5 2011-01-06 13:36 /dev/dm-5
# echo "253:5 1048576" > blkio.throttle.write_bps_device
# echo $$ > tasks
# dd if=/dev/zero of=/dev/dm-5 bs=1M count=20
20+0 records in
20+0 records out
20971520 bytes (21 MB) copied, 20.0223 s, 1.0 MB/s
So limit applies to the dd child of my shell.
Now I assign /dev/dm-5 (/dev/vdisks/kirk) to a vm and echo the qemu-kvm
pid into tasks. Limits are not applied, the guest can happily use max io
bandwidth.
However, if I start the guest manually like
# qemu-kvm <options like libvirt creates> & echo $! >
/dev/cgroup/blkio/test/tasks
The limits _are_ applied.
So, this looks like some sort of race condition to me.
I tried to get information on this on the kernel mailing list [1], but
either noone read it or at least no one replied. Maybe someone here can
shed some light and maybe even fix the issue, if it is an issue.
Need more information? Please ask for it. I don't know what else to
supply at this point.
My current lab is built by:
OpenSuSE 11.3 64bit
Vanilla Kernel 2.6.37
libvirt 0.8.7
qemu-kvm 0.13.0
vm is started like this:
/usr/bin/qemu-kvm -M pc-0.12 -enable-kvm -m 2048 -smp
2,sockets=2,cores=1,threads=1 -name cliff -uuid
a8247e1e-e3d2-d0fc-c5e5-47a173c3e460 -nodefconfig -nodefaults -chardev
socket,id=monitor,path=/var/lib/libvirt/qemu/cliff.monitor,server,nowait
-mon chardev=monitor,mode=readline -rtc base=utc -boot c -device
lsi,id=scsi0,bus=pci.0,addr=0x6 -drive
file=/dev/vdisks/cliff,if=none,id=drive-virtio-disk0,boot=on,format=raw
-device
virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0
-drive
file=/root/openSUSE-11.3-NET-x86_64.iso,if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw
-device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0
-drive file=/dev/vdisks/jason,if=none,id=drive-virtio-disk1,format=raw
-device
virtio-blk-pci,bus=pci.0,addr=0x7,drive=drive-virtio-disk1,id=virtio-disk1
-drive file=/dev/vdisks/rob,if=none,id=drive-ide0-0-0,format=raw -device
ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 -drive
file=/dev/vdisks/james,if=none,id=drive-scsi0-0-0,format=raw -device
scsi-disk,bus=scsi0.0,scsi-id=0,drive=drive-scsi0-0-0,id=scsi0-0-0
-netdev tap,id=hostnet0 -device
virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:37:84:e0,bus=pci.0,addr=0x5
-usb -vnc 127.0.0.1:0 -vga cirrus -device
virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
Regards
Dominik
[1]
http://help.lockergnome.com/linux/race-condition-net_cls-found-qemu-kvm-e...
13 years, 10 months
[libvirt] [v3] API: Improve log for domain related APIs
by Osier Yang
Add VM name/UUID in log for domain related APIs.
Format: "dom=%p, (VM: name=%s, uuid=%s), param0=%s, param1=%s
*src/libvirt.c (introduce two macros: VIR_DOMAIN_DEBUG, and
VIR_DOMAIN_DEBUG0)
---
src/libvirt.c | 243 +++++++++++++++++++++++++++++++++++++++-----------------
1 files changed, 169 insertions(+), 74 deletions(-)
diff --git a/src/libvirt.c b/src/libvirt.c
index ee2495a..bdf9896 100644
--- a/src/libvirt.c
+++ b/src/libvirt.c
@@ -312,6 +312,39 @@ static struct gcry_thread_cbs virTLSThreadImpl = {
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
};
+#define VIR_DOMAIN_DEBUG(dom, fmt, ...) { \
+ do { \
+ char uuidstr[VIR_UUID_STRING_BUFLEN]; \
+ const char *domname = NULL; \
+ \
+ if (!VIR_IS_DOMAIN(dom)) { \
+ memset(uuidstr, 0, sizeof(uuidstr)); \
+ } else { \
+ virUUIDFormat(dom->uuid, uuidstr); \
+ domname = dom->name; \
+ } \
+ \
+ DEBUG("dom=%p, (VM: name=%s, uuid=%s), " fmt, \
+ dom, NULLSTR(domname), uuidstr, __VA_ARGS__); \
+ } while (0); \
+}
+
+#define VIR_DOMAIN_DEBUG0(dom) { \
+ do { \
+ char uuidstr[VIR_UUID_STRING_BUFLEN]; \
+ const char *name = NULL; \
+ \
+ if (!VIR_IS_DOMAIN(dom)) { \
+ memset(uuidstr, 0, sizeof(uuidstr)); \
+ } else { \
+ virUUIDFormat(dom->uuid, uuidstr); \
+ name = dom->name; \
+ } \
+ \
+ DEBUG("dom=%p, (VM: name=%s, uuid=%s)", \
+ dom, NULLSTR(name), uuidstr); \
+ } while (0); \
+}
/**
* virInitialize:
@@ -1961,7 +1994,7 @@ error:
virConnectPtr
virDomainGetConnect (virDomainPtr dom)
{
- DEBUG("dom=%p", dom);
+ VIR_DOMAIN_DEBUG0(dom);
virResetLastError();
@@ -2100,7 +2133,10 @@ error:
virDomainPtr
virDomainLookupByUUID(virConnectPtr conn, const unsigned char *uuid)
{
- DEBUG("conn=%p, uuid=%s", conn, uuid);
+ char uuidstr[VIR_UUID_STRING_BUFLEN];
+ virUUIDFormat(uuid, uuidstr);
+
+ DEBUG("conn=%p, uuid=%s", conn, uuidstr);
virResetLastError();
@@ -2227,7 +2263,7 @@ virDomainDestroy(virDomainPtr domain)
{
virConnectPtr conn;
- DEBUG("domain=%p", domain);
+ VIR_DOMAIN_DEBUG0(domain);
virResetLastError();
@@ -2270,7 +2306,7 @@ error:
int
virDomainFree(virDomainPtr domain)
{
- DEBUG("domain=%p", domain);
+ VIR_DOMAIN_DEBUG0(domain);
virResetLastError();
@@ -2312,7 +2348,7 @@ virDomainRef(virDomainPtr domain)
return(-1);
}
virMutexLock(&domain->conn->lock);
- DEBUG("domain=%p refs=%d", domain, domain->refs);
+ VIR_DOMAIN_DEBUG(domain, "refs=%d", domain->refs);
domain->refs++;
virMutexUnlock(&domain->conn->lock);
return 0;
@@ -2335,7 +2371,8 @@ int
virDomainSuspend(virDomainPtr domain)
{
virConnectPtr conn;
- DEBUG("domain=%p", domain);
+
+ VIR_DOMAIN_DEBUG0(domain);
virResetLastError();
@@ -2380,7 +2417,8 @@ int
virDomainResume(virDomainPtr domain)
{
virConnectPtr conn;
- DEBUG("domain=%p", domain);
+
+ VIR_DOMAIN_DEBUG0(domain);
virResetLastError();
@@ -2428,7 +2466,8 @@ virDomainSave(virDomainPtr domain, const char *to)
{
char filepath[4096];
virConnectPtr conn;
- DEBUG("domain=%p, to=%s", domain, to);
+
+ VIR_DOMAIN_DEBUG(domain, "to=%s", to);
virResetLastError();
@@ -2570,7 +2609,8 @@ virDomainCoreDump(virDomainPtr domain, const char *to, int flags)
{
char filepath[4096];
virConnectPtr conn;
- DEBUG("domain=%p, to=%s, flags=%d", domain, to, flags);
+
+ VIR_DOMAIN_DEBUG(domain, "to=%s, flags=%d", to, flags);
virResetLastError();
@@ -2647,7 +2687,8 @@ int
virDomainShutdown(virDomainPtr domain)
{
virConnectPtr conn;
- DEBUG("domain=%p", domain);
+
+ VIR_DOMAIN_DEBUG0(domain);
virResetLastError();
@@ -2693,7 +2734,8 @@ int
virDomainReboot(virDomainPtr domain, unsigned int flags)
{
virConnectPtr conn;
- DEBUG("domain=%p, flags=%u", domain, flags);
+
+ VIR_DOMAIN_DEBUG(domain, "flags=%u", flags);
virResetLastError();
@@ -2760,7 +2802,7 @@ virDomainGetName(virDomainPtr domain)
int
virDomainGetUUID(virDomainPtr domain, unsigned char *uuid)
{
- DEBUG("domain=%p, uuid=%p", domain, uuid);
+ VIR_DOMAIN_DEBUG(domain, "uuid=%p", uuid);
virResetLastError();
@@ -2794,7 +2836,8 @@ int
virDomainGetUUIDString(virDomainPtr domain, char *buf)
{
unsigned char uuid[VIR_UUID_BUFLEN];
- DEBUG("domain=%p, buf=%p", domain, buf);
+
+ VIR_DOMAIN_DEBUG(domain, "buf=%p", buf);
virResetLastError();
@@ -2830,7 +2873,7 @@ error:
unsigned int
virDomainGetID(virDomainPtr domain)
{
- DEBUG("domain=%p", domain);
+ VIR_DOMAIN_DEBUG0(domain);
virResetLastError();
@@ -2855,7 +2898,8 @@ char *
virDomainGetOSType(virDomainPtr domain)
{
virConnectPtr conn;
- DEBUG("domain=%p", domain);
+
+ VIR_DOMAIN_DEBUG0(domain);
virResetLastError();
@@ -2896,7 +2940,8 @@ unsigned long
virDomainGetMaxMemory(virDomainPtr domain)
{
virConnectPtr conn;
- DEBUG("domain=%p", domain);
+
+ VIR_DOMAIN_DEBUG0(domain);
virResetLastError();
@@ -2942,7 +2987,8 @@ int
virDomainSetMaxMemory(virDomainPtr domain, unsigned long memory)
{
virConnectPtr conn;
- DEBUG("domain=%p, memory=%lu", domain, memory);
+
+ VIR_DOMAIN_DEBUG(domain, "memory=%lu", memory);
virResetLastError();
@@ -2995,7 +3041,8 @@ int
virDomainSetMemory(virDomainPtr domain, unsigned long memory)
{
virConnectPtr conn;
- DEBUG("domain=%p, memory=%lu", domain, memory);
+
+ VIR_DOMAIN_DEBUG(domain, "memory=%lu", memory);
virResetLastError();
@@ -3049,7 +3096,9 @@ virDomainSetMemoryParameters(virDomainPtr domain,
int nparams, unsigned int flags)
{
virConnectPtr conn;
- DEBUG("domain=%p, params=%p, nparams=%d, flags=%u", domain, params, nparams, flags);
+
+ VIR_DOMAIN_DEBUG(domain, "params=%p, nparams=%d, flags=%u",
+ params, nparams, flags);
virResetLastError();
@@ -3123,7 +3172,9 @@ virDomainGetMemoryParameters(virDomainPtr domain,
int *nparams, unsigned int flags)
{
virConnectPtr conn;
- DEBUG("domain=%p, params=%p, nparams=%d, flags=%u", domain, params, (nparams)?*nparams:-1, flags);
+
+ VIR_DOMAIN_DEBUG(domain, "params=%p, nparams=%d, flags=%u",
+ params, (nparams) ? *nparams : -1, flags);
virResetLastError();
@@ -3167,7 +3218,8 @@ int
virDomainGetInfo(virDomainPtr domain, virDomainInfoPtr info)
{
virConnectPtr conn;
- DEBUG("domain=%p, info=%p", domain, info);
+
+ VIR_DOMAIN_DEBUG(domain, "info=%p", info);
virResetLastError();
@@ -3215,7 +3267,8 @@ char *
virDomainGetXMLDesc(virDomainPtr domain, int flags)
{
virConnectPtr conn;
- DEBUG("domain=%p, flags=%d", domain, flags);
+
+ VIR_DOMAIN_DEBUG(domain, "flags=%d", flags);
virResetLastError();
@@ -3662,8 +3715,9 @@ virDomainMigrate (virDomainPtr domain,
unsigned long bandwidth)
{
virDomainPtr ddomain = NULL;
- DEBUG("domain=%p, dconn=%p, flags=%lu, dname=%s, uri=%s, bandwidth=%lu",
- domain, dconn, flags, NULLSTR(dname), NULLSTR(uri), bandwidth);
+
+ VIR_DOMAIN_DEBUG(domain, "dconn=%p, flags=%lu, dname=%s, uri=%s, bandwidth=%lu",
+ dconn, flags, NULLSTR(dname), NULLSTR(uri), bandwidth);
virResetLastError();
@@ -3811,8 +3865,8 @@ virDomainMigrateToURI (virDomainPtr domain,
const char *dname,
unsigned long bandwidth)
{
- DEBUG("domain=%p, duri=%p, flags=%lu, dname=%s, bandwidth=%lu",
- domain, NULLSTR(duri), flags, NULLSTR(dname), bandwidth);
+ VIR_DOMAIN_DEBUG(domain, "duri=%p, flags=%lu, dname=%s, bandwidth=%lu",
+ NULLSTR(duri), flags, NULLSTR(dname), bandwidth);
virResetLastError();
@@ -3924,9 +3978,10 @@ virDomainMigratePerform (virDomainPtr domain,
unsigned long bandwidth)
{
virConnectPtr conn;
- VIR_DEBUG("domain=%p, cookie=%p, cookielen=%d, uri=%s, flags=%lu, "
- "dname=%s, bandwidth=%lu", domain, cookie, cookielen, uri, flags,
- NULLSTR(dname), bandwidth);
+
+ VIR_DOMAIN_DEBUG(domain, "cookie=%p, cookielen=%d, uri=%s, flags=%lu, "
+ "dname=%s, bandwidth=%lu", cookie, cookielen, uri, flags,
+ NULLSTR(dname), bandwidth);
virResetLastError();
@@ -4290,7 +4345,8 @@ virDomainGetSchedulerType(virDomainPtr domain, int *nparams)
{
virConnectPtr conn;
char *schedtype;
- DEBUG("domain=%p, nparams=%p", domain, nparams);
+
+ VIR_DOMAIN_DEBUG(domain, "nparams=%p", nparams);
virResetLastError();
@@ -4335,7 +4391,8 @@ virDomainGetSchedulerParameters(virDomainPtr domain,
virSchedParameterPtr params, int *nparams)
{
virConnectPtr conn;
- DEBUG("domain=%p, params=%p, nparams=%p", domain, params, nparams);
+
+ VIR_DOMAIN_DEBUG(domain, "params=%p, nparams=%p", params, nparams);
virResetLastError();
@@ -4378,7 +4435,8 @@ virDomainSetSchedulerParameters(virDomainPtr domain,
virSchedParameterPtr params, int nparams)
{
virConnectPtr conn;
- DEBUG("domain=%p, params=%p, nparams=%d", domain, params, nparams);
+
+ VIR_DOMAIN_DEBUG(domain, "params=%p, nparams=%d", params, nparams);
virResetLastError();
@@ -4438,7 +4496,8 @@ virDomainBlockStats (virDomainPtr dom, const char *path,
{
virConnectPtr conn;
struct _virDomainBlockStats stats2 = { -1, -1, -1, -1, -1 };
- DEBUG("domain=%p, path=%s, stats=%p, size=%zi", dom, path, stats, size);
+
+ VIR_DOMAIN_DEBUG(dom, "path=%s, stats=%p, size=%zi", path, stats, size);
virResetLastError();
@@ -4496,7 +4555,9 @@ virDomainInterfaceStats (virDomainPtr dom, const char *path,
virConnectPtr conn;
struct _virDomainInterfaceStats stats2 = { -1, -1, -1, -1,
-1, -1, -1, -1 };
- DEBUG("domain=%p, path=%s, stats=%p, size=%zi", dom, path, stats, size);
+
+ VIR_DOMAIN_DEBUG(dom, "path=%s, stats=%p, size=%zi",
+ path, stats, size);
virResetLastError();
@@ -4561,7 +4622,8 @@ int virDomainMemoryStats (virDomainPtr dom, virDomainMemoryStatPtr stats,
{
virConnectPtr conn;
unsigned long nr_stats_ret = 0;
- DEBUG("domain=%p, stats=%p, nr_stats=%u", dom, stats, nr_stats);
+
+ VIR_DOMAIN_DEBUG(dom, "stats=%p, nr_stats=%u", stats, nr_stats);
if (flags != 0) {
virLibDomainError (dom, VIR_ERR_INVALID_ARG,
@@ -4645,8 +4707,9 @@ virDomainBlockPeek (virDomainPtr dom,
unsigned int flags)
{
virConnectPtr conn;
- DEBUG("domain=%p, path=%s, offset=%lld, size=%zi, buffer=%p",
- dom, path, offset, size, buffer);
+
+ VIR_DOMAIN_DEBUG(dom, "path=%s, offset=%lld, size=%zi, buffer=%p",
+ path, offset, size, buffer);
virResetLastError();
@@ -4736,8 +4799,9 @@ virDomainMemoryPeek (virDomainPtr dom,
unsigned int flags)
{
virConnectPtr conn;
- DEBUG ("domain=%p, start=%lld, size=%zi, buffer=%p, flags=%d",
- dom, start, size, buffer, flags);
+
+ VIR_DOMAIN_DEBUG(dom, "start=%lld, size=%zi, buffer=%p, flags=%d",
+ start, size, buffer, flags);
virResetLastError();
@@ -4821,7 +4885,8 @@ int
virDomainGetBlockInfo(virDomainPtr domain, const char *path, virDomainBlockInfoPtr info, unsigned int flags)
{
virConnectPtr conn;
- DEBUG("domain=%p, info=%p flags=%u", domain, info, flags);
+
+ VIR_DOMAIN_DEBUG(domain, "info=%p flags=%u", info, flags);
virResetLastError();
@@ -4919,7 +4984,8 @@ error:
int
virDomainUndefine(virDomainPtr domain) {
virConnectPtr conn;
- DEBUG("domain=%p", domain);
+
+ VIR_DOMAIN_DEBUG0(domain)
virResetLastError();
@@ -5041,7 +5107,8 @@ error:
int
virDomainCreate(virDomainPtr domain) {
virConnectPtr conn;
- DEBUG("domain=%p", domain);
+
+ VIR_DOMAIN_DEBUG0(domain);
virResetLastError();
@@ -5084,7 +5151,8 @@ error:
int
virDomainCreateWithFlags(virDomainPtr domain, unsigned int flags) {
virConnectPtr conn;
- DEBUG("domain=%p, flags=%d", domain, flags);
+
+ VIR_DOMAIN_DEBUG(domain, "flags=%d", flags);
virResetLastError();
@@ -5130,7 +5198,8 @@ virDomainGetAutostart(virDomainPtr domain,
int *autostart)
{
virConnectPtr conn;
- DEBUG("domain=%p, autostart=%p", domain, autostart);
+
+ VIR_DOMAIN_DEBUG(domain, "autostart=%p", autostart);
virResetLastError();
@@ -5176,7 +5245,8 @@ virDomainSetAutostart(virDomainPtr domain,
int autostart)
{
virConnectPtr conn;
- DEBUG("domain=%p, autostart=%d", domain, autostart);
+
+ VIR_DOMAIN_DEBUG(domain, "autostart=%d", autostart);
virResetLastError();
@@ -5230,7 +5300,8 @@ int
virDomainSetVcpus(virDomainPtr domain, unsigned int nvcpus)
{
virConnectPtr conn;
- DEBUG("domain=%p, nvcpus=%u", domain, nvcpus);
+
+ VIR_DOMAIN_DEBUG(domain, "nvcpus=%u", nvcpus);
virResetLastError();
@@ -5296,7 +5367,8 @@ virDomainSetVcpusFlags(virDomainPtr domain, unsigned int nvcpus,
unsigned int flags)
{
virConnectPtr conn;
- DEBUG("domain=%p, nvcpus=%u, flags=%u", domain, nvcpus, flags);
+
+ VIR_DOMAIN_DEBUG(domain, "nvcpus=%u, flags=%u", nvcpus, flags);
virResetLastError();
@@ -5359,7 +5431,8 @@ int
virDomainGetVcpusFlags(virDomainPtr domain, unsigned int flags)
{
virConnectPtr conn;
- DEBUG("domain=%p, flags=%u", domain, flags);
+
+ VIR_DOMAIN_DEBUG(domain, "flags=%u", flags);
virResetLastError();
@@ -5417,7 +5490,9 @@ virDomainPinVcpu(virDomainPtr domain, unsigned int vcpu,
unsigned char *cpumap, int maplen)
{
virConnectPtr conn;
- DEBUG("domain=%p, vcpu=%u, cpumap=%p, maplen=%d", domain, vcpu, cpumap, maplen);
+
+ VIR_DOMAIN_DEBUG(domain, "vcpu=%u, cpumap=%p, maplen=%d",
+ vcpu, cpumap, maplen);
virResetLastError();
@@ -5480,7 +5555,9 @@ virDomainGetVcpus(virDomainPtr domain, virVcpuInfoPtr info, int maxinfo,
unsigned char *cpumaps, int maplen)
{
virConnectPtr conn;
- DEBUG("domain=%p, info=%p, maxinfo=%d, cpumaps=%p, maplen=%d", domain, info, maxinfo, cpumaps, maplen);
+
+ VIR_DOMAIN_DEBUG(domain, "info=%p, maxinfo=%d, cpumaps=%p, maplen=%d",
+ info, maxinfo, cpumaps, maplen);
virResetLastError();
@@ -5536,7 +5613,8 @@ int
virDomainGetMaxVcpus(virDomainPtr domain)
{
virConnectPtr conn;
- DEBUG("domain=%p", domain);
+
+ VIR_DOMAIN_DEBUG0(domain);
virResetLastError();
@@ -5665,7 +5743,8 @@ int
virDomainAttachDevice(virDomainPtr domain, const char *xml)
{
virConnectPtr conn;
- DEBUG("domain=%p, xml=%s", domain, xml);
+
+ VIR_DOMAIN_DEBUG(domain, "xml=%s", xml);
virResetLastError();
@@ -5724,7 +5803,8 @@ virDomainAttachDeviceFlags(virDomainPtr domain,
const char *xml, unsigned int flags)
{
virConnectPtr conn;
- DEBUG("domain=%p, xml=%s, flags=%d", domain, xml, flags);
+
+ VIR_DOMAIN_DEBUG(domain, "xml=%s, flags=%d", xml, flags);
virResetLastError();
@@ -5767,7 +5847,8 @@ int
virDomainDetachDevice(virDomainPtr domain, const char *xml)
{
virConnectPtr conn;
- DEBUG("domain=%p, xml=%s", domain, xml);
+
+ VIR_DOMAIN_DEBUG(domain, "xml=%s", xml);
virResetLastError();
@@ -5822,7 +5903,8 @@ virDomainDetachDeviceFlags(virDomainPtr domain,
const char *xml, unsigned int flags)
{
virConnectPtr conn;
- DEBUG("domain=%p, xml=%s, flags=%d", domain, xml, flags);
+
+ VIR_DOMAIN_DEBUG(domain, "xml=%s, flags=%d", xml, flags);
virResetLastError();
@@ -5880,7 +5962,8 @@ virDomainUpdateDeviceFlags(virDomainPtr domain,
const char *xml, unsigned int flags)
{
virConnectPtr conn;
- DEBUG("domain=%p, xml=%s, flags=%d", domain, xml, flags);
+
+ VIR_DOMAIN_DEBUG(domain, "xml=%s, flags=%d", xml, flags);
virResetLastError();
@@ -6206,7 +6289,10 @@ error:
virNetworkPtr
virNetworkLookupByUUID(virConnectPtr conn, const unsigned char *uuid)
{
- DEBUG("conn=%p, uuid=%s", conn, uuid);
+ char uuidstr[VIR_UUID_STRING_BUFLEN];
+ virUUIDFormat(uuid, uuidstr);
+
+ DEBUG("conn=%p, uuid=%s", conn, uuidstr);
virResetLastError();
@@ -11431,7 +11517,7 @@ error:
*/
int virDomainIsPersistent(virDomainPtr dom)
{
- DEBUG("dom=%p", dom);
+ VIR_DOMAIN_DEBUG0(dom);
virResetLastError();
@@ -11464,7 +11550,7 @@ error:
*/
int virDomainIsUpdated(virDomainPtr dom)
{
- DEBUG("dom=%p", dom);
+ VIR_DOMAIN_DEBUG0(dom);
virResetLastError();
@@ -12353,7 +12439,8 @@ int
virDomainGetJobInfo(virDomainPtr domain, virDomainJobInfoPtr info)
{
virConnectPtr conn;
- DEBUG("domain=%p, info=%p", domain, info);
+
+ VIR_DOMAIN_DEBUG(domain, "info=%p", info);
virResetLastError();
@@ -12402,7 +12489,7 @@ virDomainAbortJob(virDomainPtr domain)
{
virConnectPtr conn;
- DEBUG("domain=%p", domain);
+ VIR_DOMAIN_DEBUG0(domain);
virResetLastError();
@@ -12453,7 +12540,7 @@ virDomainMigrateSetMaxDowntime(virDomainPtr domain,
{
virConnectPtr conn;
- DEBUG("domain=%p, downtime=%llu, flags=%u", domain, downtime, flags);
+ VIR_DOMAIN_DEBUG(domain, "downtime=%llu, flags=%u", downtime, flags);
virResetLastError();
@@ -12522,7 +12609,9 @@ virConnectDomainEventRegisterAny(virConnectPtr conn,
void *opaque,
virFreeCallback freecb)
{
- DEBUG("conn=%p dom=%p, eventID=%d, cb=%p, opaque=%p, freecb=%p", conn, dom, eventID, cb, opaque, freecb);
+ VIR_DOMAIN_DEBUG(dom, "conn=%p, eventID=%d, cb=%p, opaque=%p, freecb=%p",
+ conn, eventID, cb, opaque, freecb);
+
virResetLastError();
if (!VIR_IS_CONNECT(conn)) {
@@ -12615,7 +12704,7 @@ int virDomainManagedSave(virDomainPtr dom, unsigned int flags)
{
virConnectPtr conn;
- VIR_DEBUG("dom=%p, flags=%u", dom, flags);
+ VIR_DOMAIN_DEBUG(dom, "flags=%u", flags);
virResetLastError();
@@ -12663,7 +12752,7 @@ int virDomainHasManagedSaveImage(virDomainPtr dom, unsigned int flags)
{
virConnectPtr conn;
- VIR_DEBUG("dom=%p, flags=%u", dom, flags);
+ VIR_DOMAIN_DEBUG(dom, "flags=%u", flags);
virResetLastError();
@@ -12704,7 +12793,7 @@ int virDomainManagedSaveRemove(virDomainPtr dom, unsigned int flags)
{
virConnectPtr conn;
- VIR_DEBUG("dom=%p, flags=%u", dom, flags);
+ VIR_DOMAIN_DEBUG(dom, "flags=%u", flags);
virResetLastError();
@@ -12754,7 +12843,7 @@ virDomainSnapshotCreateXML(virDomainPtr domain,
{
virConnectPtr conn;
- DEBUG("domain=%p, xmlDesc=%s, flags=%u", domain, xmlDesc, flags);
+ VIR_DOMAIN_DEBUG(domain, "xmlDesc=%s, flags=%u", xmlDesc, flags);
virResetLastError();
@@ -12845,7 +12934,8 @@ int
virDomainSnapshotNum(virDomainPtr domain, unsigned int flags)
{
virConnectPtr conn;
- DEBUG("domain=%p", domain);
+
+ VIR_DOMAIN_DEBUG0(domain);
virResetLastError();
@@ -12888,8 +12978,8 @@ virDomainSnapshotListNames(virDomainPtr domain, char **names, int nameslen,
{
virConnectPtr conn;
- DEBUG("domain=%p, names=%p, nameslen=%d, flags=%u",
- domain, names, nameslen, flags);
+ VIR_DOMAIN_DEBUG(domain, "names=%p, nameslen=%d, flags=%u",
+ names, nameslen, flags);
virResetLastError();
@@ -12938,7 +13028,8 @@ virDomainSnapshotLookupByName(virDomainPtr domain,
unsigned int flags)
{
virConnectPtr conn;
- DEBUG("domain=%p, name=%s, flags=%u", domain, name, flags);
+
+ VIR_DOMAIN_DEBUG(domain, "name=%s, flags=%u", name, flags);
virResetLastError();
@@ -12982,7 +13073,8 @@ int
virDomainHasCurrentSnapshot(virDomainPtr domain, unsigned int flags)
{
virConnectPtr conn;
- DEBUG("domain=%p, flags=%u", domain, flags);
+
+ VIR_DOMAIN_DEBUG(domain, "flags=%u", flags);
virResetLastError();
@@ -13023,7 +13115,8 @@ virDomainSnapshotCurrent(virDomainPtr domain,
unsigned int flags)
{
virConnectPtr conn;
- DEBUG("domain=%p, flags=%u", domain, flags);
+
+ VIR_DOMAIN_DEBUG(domain, "flags=%u", flags);
virResetLastError();
@@ -13187,7 +13280,9 @@ int virDomainOpenConsole(virDomainPtr dom,
unsigned int flags)
{
virConnectPtr conn;
- DEBUG("dom=%p devname=%s, st=%p flags=%u", dom, NULLSTR(devname), st, flags);
+
+ VIR_DOMAIN_DEBUG(dom, "devname=%s, st=%p, flags=%u",
+ NULLSTR(devname), st, flags);
virResetLastError();
--
1.7.3.2
13 years, 10 months
[libvirt] [PATCH] maint: improve sc_prohibit_strncmp syntax check
by Eric Blake
* .gnulib: Update, for sc_prohibit_strcmp fix.
* cfg.mk: Adjust copyright; the only FSF portions come from when
this file was copied from coreutils.
(sc_prohibit_strncmp): Copy bug-fixes from sc_prohibit_strcmp.
* .x-sc_prohibit_strcmp: Delete, now that rule is smarter.
* .x-sc_prohibit_strncmp: Likewise.
* Makefile.am (syntax_check_exceptions): Track deletion.
---
This patch would have flagged Diego's use of strncmp in
commandtest.c, and will help us catch any future violations
of a similar nature.
I love it when a patch removes more than it adds and still
fixes bugs.
* .gnulib 4f2c339...939dedd (10):
> ignore-value: support aggregate types
> maint.mk: improve sc_prohibit_strcmp regex
> maint: fix ChangeLog order
> signal: work around Haiku issue with SIGBUS
> maint.mk: add pre-release check to ensure submodule commits are public
> ignore-value: make ignore_value more generic; deprecate ignore_ptr
> doc: regenerate INSTALL
> Merge remote branch 'origin/coreutils-8.9'
> Merge branch 'coreutils-8.9'
> avoid an unnecessary sub-shell
.gnulib | 2 +-
.x-sc_prohibit_strcmp | 1 -
.x-sc_prohibit_strncmp | 1 -
Makefile.am | 2 --
cfg.mk | 7 ++++---
5 files changed, 5 insertions(+), 8 deletions(-)
delete mode 100644 .x-sc_prohibit_strcmp
delete mode 100644 .x-sc_prohibit_strncmp
diff --git a/.gnulib b/.gnulib
index 4f2c339..939dedd 160000
--- a/.gnulib
+++ b/.gnulib
@@ -1 +1 @@
-Subproject commit 4f2c339efdaf1fcca9eed7b0700083b5e24942d4
+Subproject commit 939dedd9a2fba934e5ff0313155f9f5f39cb6f6f
diff --git a/.x-sc_prohibit_strcmp b/.x-sc_prohibit_strcmp
deleted file mode 100644
index b7c456e..0000000
--- a/.x-sc_prohibit_strcmp
+++ /dev/null
@@ -1 +0,0 @@
-^gnulib/
diff --git a/.x-sc_prohibit_strncmp b/.x-sc_prohibit_strncmp
deleted file mode 100644
index 8be2055..0000000
--- a/.x-sc_prohibit_strncmp
+++ /dev/null
@@ -1 +0,0 @@
-^src/internal\.h$
diff --git a/Makefile.am b/Makefile.am
index c525e65..36463f5 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -33,8 +33,6 @@ syntax_check_exceptions = \
.x-sc_prohibit_nonreentrant \
.x-sc_prohibit_readlink \
.x-sc_prohibit_sprintf \
- .x-sc_prohibit_strcmp \
- .x-sc_prohibit_strncmp \
.x-sc_prohibit_strncpy \
.x-sc_prohibit_test_minus_ao \
.x-sc_prohibit_VIR_ERR_NO_MEMORY \
diff --git a/cfg.mk b/cfg.mk
index 03186b3..e67315b 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -1,5 +1,6 @@
# Customize Makefile.maint. -*- makefile -*-
-# Copyright (C) 2003-2010 Free Software Foundation, Inc.
+# Copyright (C) 2008-2011 Red Hat, Inc.
+# Copyright (C) 2003-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -249,9 +250,9 @@ sc_prohibit_close:
# Similar to the gnulib maint.mk rule for sc_prohibit_strcmp
# Use STREQLEN or STRPREFIX rather than comparing strncmp == 0, or != 0.
sc_prohibit_strncmp:
- @grep -nE '! *str''ncmp *\(|\<str''ncmp *\([^)]+\) *==' \
+ @grep -nE '! *str''ncmp *\(|\<str''ncmp *\(.+\) *[!=]=' \
$$($(VC_LIST_EXCEPT)) \
- | grep -vE ':# *define STREQ\(' && \
+ | grep -vE ':# *define STR(N?EQLEN|PREFIX)\(' && \
{ echo '$(ME): use STREQLEN or STRPREFIX instead of str''ncmp' \
1>&2; exit 1; } || :
--
1.7.3.4
13 years, 10 months
[libvirt] [PATCH] commandtest: avoid printing loader-control variables from commandhelper
by Diego Elio Pettenò
This avoids throwing the tests off if LD_LIBRARY_PATH or LD_PRELOAD or
other variables are set.
Signed-off-by: Diego Elio Pettenò <flameeyes(a)gmail.com>
---
tests/commandhelper.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/tests/commandhelper.c b/tests/commandhelper.c
index f400e8d..398f002 100644
--- a/tests/commandhelper.c
+++ b/tests/commandhelper.c
@@ -81,7 +81,10 @@ int main(int argc, char **argv) {
qsort(newenv, n, sizeof(newenv[0]), envsort);
for (i = 0 ; i < n ; i++) {
- fprintf(log, "ENV:%s\n", newenv[i]);
+ /* Ignore the variables used to instruct the loader into
+ * behaving differently, as they could throw the tests off. */
+ if ( strncmp(newenv[i], "LD_", 3) != 0 )
+ fprintf(log, "ENV:%s\n", newenv[i]);
}
for (i = 0 ; i < sysconf(_SC_OPEN_MAX) ; i++) {
--
1.7.4.rc1
13 years, 10 months
[libvirt] [TCK] [PATCH v2] Test cases for network ipv6 support
by Stefan Berger
v2:
- added test cases using 'ip addr ...' and 'ip route ...' commands
This patch adds a couple of test cases for the recently added network
ipv6 support.
Signed-off-by: Stefan Berger<stefanb(a)us.ibm.com>
---
scripts/networks/networkxml2hostout/tck-testnet-3.dat | 39 +++++++++++++
scripts/networks/networkxml2hostout/tck-testnet-3.post.dat | 14 ++++
scripts/networks/networkxml2xmlin/tck-testnet-3.xml | 22 +++++++
3 files changed, 75 insertions(+)
Index: libvirt-tck/scripts/networks/networkxml2xmlin/tck-testnet-3.xml
===================================================================
--- /dev/null
+++ libvirt-tck/scripts/networks/networkxml2xmlin/tck-testnet-3.xml
@@ -0,0 +1,22 @@
+<network>
+<name>tck-testnet</name>
+<uuid>aadc8920-502a-4774-ac2b-cd382a204d06</uuid>
+<bridge name="tck-testbr" />
+<forward mode="nat" />
+<ip address="10.1.2.1" netmask="255.255.255.0">
+<dhcp>
+<range start="10.1.2.2" end="10.1.2.254" />
+<host mac="00:16:3e:77:e2:ed" name="a.example.com" ip="10.1.2.10" />
+<host mac="00:16:3e:3e:a9:1a" name="b.example.com" ip="10.1.2.11" />
+</dhcp>
+</ip>
+<ip family="ipv4" address="192.168.123.1" netmask="255.255.255.0">
+</ip>
+<ip family="ipv6" address="2001:db8:ac10:fe01::1" prefix="64">
+</ip>
+<ip family="ipv6" address="2001:db8:ac10:fd01::1" prefix="64">
+</ip>
+<ip family="ipv4" address="10.24.10.1">
+</ip>
+</network>
+
Index: libvirt-tck/scripts/networks/networkxml2hostout/tck-testnet-3.dat
===================================================================
--- /dev/null
+++ libvirt-tck/scripts/networks/networkxml2hostout/tck-testnet-3.dat
@@ -0,0 +1,39 @@
+#iptables -t nat -L -n | grep ' 10\.1\.2\.'
+MASQUERADE tcp -- 10.1.2.0/24 !10.1.2.0/24 masq ports: 1024-65535
+MASQUERADE udp -- 10.1.2.0/24 !10.1.2.0/24 masq ports: 1024-65535
+MASQUERADE all -- 10.1.2.0/24 !10.1.2.0/24
+#iptables -n -L FORWARD | grep ' 10\.1\.2\.'
+ACCEPT all -- 0.0.0.0/0 10.1.2.0/24 state RELATED,ESTABLISHED
+ACCEPT all -- 10.1.2.0/24 0.0.0.0/0
+#ip6tables -n -L FORWARD | grep ' 2001:db8:ac10'
+ACCEPT all ::/0 2001:db8:ac10:fd01::/64
+ACCEPT all 2001:db8:ac10:fd01::/64 ::/0
+ACCEPT all ::/0 2001:db8:ac10:fe01::/64
+ACCEPT all 2001:db8:ac10:fe01::/64 ::/0
+#ps aux | sed -n '/dnsmasq .*10\.1\.2\./ s|.*\(dnsmasq [[:print:]*]\)|\1|p'
+dnsmasq --strict-order --bind-interfaces --pid-file=/var/run/libvirt/network/tck-testnet.pid --conf-file= --listen-address 10.1.2.1 --except-interface lo --dhcp-range 10.1.2.2,10.1.2.254 --dhcp-lease-max=253 --dhcp-no-override
+#ps aux | sed -n '/radvd --.*tck\-testnet\-/ s|.*\(radvd [[:print:]*]\)|\1|p'
+radvd --debug 1 --config /var/lib/libvirt/radvd/tck-testnet-radvd.conf --pidfile /var/run/libvirt/network/tck-testnet-radvd.pid-bin
+#route -n | grep '10\.1\.2\.'
+10.1.2.0 0.0.0.0 255.255.255.0 U 0 0 0 tck-testbr
+#route -n | grep '192\.168\.123\.'
+192.168.123.0 0.0.0.0 255.255.255.0 U 0 0 0 tck-testbr
+#route -n | grep '10\.0\.0\.0'
+10.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 tck-testbr
+#brctl show | grep tck-testbr
+tck-testbr 8000.000000000000 yes
+#ifconfig tck-testbr | grep ':10\.1\.2\.'
+ inet addr:10.1.2.1 Bcast:10.1.2.255 Mask:255.255.255.0
+#ifconfig tck-testbr | grep 'inet6 addr: 2001'
+ inet6 addr: 2001:db8:ac10:fd01::1/64 Scope:Global
+ inet6 addr: 2001:db8:ac10:fe01::1/64 Scope:Global
+#ip addr show tck-testbr | grep "inet "
+ inet 10.1.2.1/24 brd 10.1.2.255 scope global tck-testbr
+ inet 192.168.123.1/24 brd 192.168.123.255 scope global tck-testbr
+ inet 10.24.10.1/8 brd 10.255.255.255 scope global tck-testbr
+#ip route show dev tck-testbr
+10.1.2.0/24 proto kernel scope link src 10.1.2.1
+192.168.123.0/24 proto kernel scope link src 192.168.123.1
+10.0.0.0/8 proto kernel scope link src 10.24.10.1
+#virsh net-list | grep tck-testnet
+tck-testnet active no
Index: libvirt-tck/scripts/networks/networkxml2hostout/tck-testnet-3.post.dat
===================================================================
--- /dev/null
+++ libvirt-tck/scripts/networks/networkxml2hostout/tck-testnet-3.post.dat
@@ -0,0 +1,14 @@
+#iptables -t nat -L -n | grep ' 10\.1\.2\.'
+#iptables -n -L FORWARD | grep ' 10\.1\.2\.'
+#ip6tables -n -L FORWARD | grep ' 2001:db8:ac10'
+#ps aux | sed -n '/dnsmasq .*10\.1\.2\./ s|.*\(dnsmasq [[:print:]*]\)|\1|p'
+#ps aux | sed -n '/radvd --.*tck\-testnet\-/ s|.*\(radvd [[:print:]*]\)|\1|p'
+#route -n | grep '10\.1\.2\.'
+#route -n | grep '192\.168\.123\.'
+#route -n | grep '10\.0\.0\.0'
+#brctl show | grep tck-testbr
+#ifconfig tck-testbr 2>/dev/null | grep ':10\.1\.2\.'
+#ifconfig tck-testbr 2>/dev/null | grep 'inet6 addr: 2001'
+#ip addr show tck-testbr 2>/dev/null | grep "inet "
+#ip route show dev tck-testbr 2>/dev/null
+#virsh net-list | grep tck-testnet
13 years, 10 months
[libvirt] Remove bashisms from libvirt-guests
by Laurent Léonard
Hi,
The attached patch removes bashisms from libvirt-guests.
TEXTDOMAINDIR is not specified, so system default will be used
("/usr/share/locale" on Debian, I don't know if it's the same on Fedora).
"xgettext -L Shell" output is the same with gettext shell functions as with
$"..." deprecated Bash-specific syntax.
Please generate po files somewhere in the source tree.
Thank you,
--
Laurent Léonard
13 years, 10 months
[libvirt] [PATCH] vbox: Use correct VRAM size unit
by Matthias Bolte
VirtualBox uses megabyte, libvirt uses kilobyte.
---
src/vbox/vbox_tmpl.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c
index f45e8ed..5ac94c3 100644
--- a/src/vbox/vbox_tmpl.c
+++ b/src/vbox/vbox_tmpl.c
@@ -2225,7 +2225,7 @@ static char *vboxDomainDumpXML(virDomainPtr dom, int flags) {
if (VIR_ALLOC_N(def->videos, def->nvideos) >= 0) {
if (VIR_ALLOC(def->videos[0]) >= 0) {
/* the default is: vram is 8MB, One monitor, 3dAccel Off */
- PRUint32 VRAMSize = 8 * 1024;
+ PRUint32 VRAMSize = 8;
PRUint32 monitorCount = 1;
PRBool accelerate3DEnabled = PR_FALSE;
PRBool accelerate2DEnabled = PR_FALSE;
@@ -2238,7 +2238,7 @@ static char *vboxDomainDumpXML(virDomainPtr dom, int flags) {
#endif /* VBOX_API_VERSION >= 3001 */
def->videos[0]->type = VIR_DOMAIN_VIDEO_TYPE_VBOX;
- def->videos[0]->vram = VRAMSize;
+ def->videos[0]->vram = VRAMSize * 1024;
def->videos[0]->heads = monitorCount;
if (VIR_ALLOC(def->videos[0]->accel) >= 0) {
def->videos[0]->accel->support3d = accelerate3DEnabled;
@@ -4397,7 +4397,7 @@ vboxAttachVideo(virDomainDefPtr def, IMachine *machine)
{
if ((def->nvideos == 1) &&
(def->videos[0]->type == VIR_DOMAIN_VIDEO_TYPE_VBOX)) {
- machine->vtbl->SetVRAMSize(machine, def->videos[0]->vram);
+ machine->vtbl->SetVRAMSize(machine, def->videos[0]->vram / 1024);
machine->vtbl->SetMonitorCount(machine, def->videos[0]->heads);
if (def->videos[0]->accel) {
machine->vtbl->SetAccelerate3DEnabled(machine,
--
1.7.0.4
13 years, 10 months
[libvirt] [PATCH] vmx: Add support for video device VRAM size
by Matthias Bolte
Update test suite accordingly.
---
src/vmx/vmx.c | 110 ++++++++++++++++++++
src/vmx/vmx.h | 4 +
tests/vmx2xmldata/vmx2xml-annotation.xml | 3 +
tests/vmx2xmldata/vmx2xml-case-insensitive-1.xml | 3 +
tests/vmx2xmldata/vmx2xml-case-insensitive-2.xml | 3 +
tests/vmx2xmldata/vmx2xml-cdrom-ide-device.xml | 3 +
tests/vmx2xmldata/vmx2xml-cdrom-ide-file.xml | 3 +
tests/vmx2xmldata/vmx2xml-cdrom-scsi-device.xml | 3 +
tests/vmx2xmldata/vmx2xml-cdrom-scsi-file.xml | 3 +
tests/vmx2xmldata/vmx2xml-esx-in-the-wild-1.xml | 3 +
tests/vmx2xmldata/vmx2xml-esx-in-the-wild-2.xml | 3 +
tests/vmx2xmldata/vmx2xml-esx-in-the-wild-3.xml | 3 +
tests/vmx2xmldata/vmx2xml-esx-in-the-wild-4.xml | 3 +
tests/vmx2xmldata/vmx2xml-esx-in-the-wild-5.xml | 3 +
tests/vmx2xmldata/vmx2xml-ethernet-bridged.xml | 3 +
tests/vmx2xmldata/vmx2xml-ethernet-custom.xml | 3 +
tests/vmx2xmldata/vmx2xml-ethernet-e1000.xml | 3 +
tests/vmx2xmldata/vmx2xml-ethernet-generated.xml | 3 +
tests/vmx2xmldata/vmx2xml-ethernet-other.xml | 3 +
tests/vmx2xmldata/vmx2xml-ethernet-static.xml | 3 +
tests/vmx2xmldata/vmx2xml-ethernet-vmxnet2.xml | 3 +
tests/vmx2xmldata/vmx2xml-ethernet-vpx.xml | 3 +
tests/vmx2xmldata/vmx2xml-floppy-device.xml | 3 +
tests/vmx2xmldata/vmx2xml-floppy-file.xml | 3 +
tests/vmx2xmldata/vmx2xml-graphics-vnc.xml | 3 +
tests/vmx2xmldata/vmx2xml-gsx-in-the-wild-1.xml | 3 +
tests/vmx2xmldata/vmx2xml-gsx-in-the-wild-2.xml | 3 +
tests/vmx2xmldata/vmx2xml-gsx-in-the-wild-3.xml | 3 +
tests/vmx2xmldata/vmx2xml-gsx-in-the-wild-4.xml | 3 +
tests/vmx2xmldata/vmx2xml-harddisk-ide-file.xml | 3 +
tests/vmx2xmldata/vmx2xml-harddisk-scsi-file.xml | 3 +
tests/vmx2xmldata/vmx2xml-minimal-64bit.xml | 3 +
tests/vmx2xmldata/vmx2xml-minimal.xml | 3 +
tests/vmx2xmldata/vmx2xml-parallel-device.xml | 3 +
tests/vmx2xmldata/vmx2xml-parallel-file.xml | 3 +
tests/vmx2xmldata/vmx2xml-scsi-driver.xml | 3 +
tests/vmx2xmldata/vmx2xml-scsi-writethrough.xml | 3 +
tests/vmx2xmldata/vmx2xml-serial-device.xml | 3 +
tests/vmx2xmldata/vmx2xml-serial-file.xml | 3 +
.../vmx2xmldata/vmx2xml-serial-network-client.xml | 3 +
.../vmx2xmldata/vmx2xml-serial-network-server.xml | 3 +
tests/vmx2xmldata/vmx2xml-serial-pipe.xml | 3 +
tests/vmx2xmldata/vmx2xml-smbios.xml | 3 +
tests/vmx2xmldata/vmx2xml-svga.vmx | 3 +
tests/vmx2xmldata/vmx2xml-svga.xml | 18 +++
tests/vmx2xmltest.c | 2 +
tests/xml2vmxdata/xml2vmx-graphics-vnc.vmx | 1 +
tests/xml2vmxdata/xml2vmx-svga.vmx | 11 ++
tests/xml2vmxdata/xml2vmx-svga.xml | 13 +++
tests/xml2vmxtest.c | 2 +
50 files changed, 287 insertions(+), 0 deletions(-)
create mode 100644 tests/vmx2xmldata/vmx2xml-svga.vmx
create mode 100644 tests/vmx2xmldata/vmx2xml-svga.xml
create mode 100644 tests/xml2vmxdata/xml2vmx-svga.vmx
create mode 100644 tests/xml2vmxdata/xml2vmx-svga.xml
diff --git a/src/vmx/vmx.c b/src/vmx/vmx.c
index 6e3e9af..76cc16a 100644
--- a/src/vmx/vmx.c
+++ b/src/vmx/vmx.c
@@ -326,6 +326,16 @@ def->nets[0]...
################################################################################
+## video #######################################################################
+
+def->videos[0]...
+->type = _VIDEO_TYPE_VMVGA
+->vram = <value kilobyte> <=> svga.vramSize = "<value byte>"
+->heads = 1
+
+
+
+################################################################################
## serials #####################################################################
serial[0..3] -> <port>
@@ -1636,6 +1646,20 @@ virVMXParseConfig(virVMXContext *ctx, virCapsPtr caps, const char *vmx)
/* def:inputs */
/* FIXME */
+ /* def:videos */
+ if (VIR_ALLOC_N(def->videos, 1) < 0) {
+ virReportOOMError();
+ goto cleanup;
+ }
+
+ def->nvideos = 0;
+
+ if (virVMXParseSVGA(conf, &def->videos[def->nvideos]) < 0) {
+ goto cleanup;
+ }
+
+ def->nvideos = 1;
+
/* def:sounds */
/* FIXME */
@@ -2765,6 +2789,45 @@ virVMXParseParallel(virVMXContext *ctx, virConfPtr conf, int port,
+int
+virVMXParseSVGA(virConfPtr conf, virDomainVideoDefPtr *def)
+{
+ int result = -1;
+ long long svga_vramSize = 0;
+
+ if (def == NULL || *def != NULL) {
+ VMX_ERROR(VIR_ERR_INTERNAL_ERROR, "%s", _("Invalid argument"));
+ return -1;
+ }
+
+ if (VIR_ALLOC(*def) < 0) {
+ virReportOOMError();
+ return -1;
+ }
+
+ (*def)->type = VIR_DOMAIN_VIDEO_TYPE_VMVGA;
+
+ /* vmx:vramSize */
+ if (virVMXGetConfigLong(conf, "svga.vramSize", &svga_vramSize,
+ 4 * 1024 * 1024, true) < 0) {
+ goto cleanup;
+ }
+
+ (*def)->vram = svga_vramSize / 1024; /* Scale from bytes to kilobytes */
+
+ result = 0;
+
+ cleanup:
+ if (result < 0) {
+ virDomainVideoDefFree(*def);
+ *def = NULL;
+ }
+
+ return result;
+}
+
+
+
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Domain XML -> VMX
*/
@@ -3064,6 +3127,19 @@ virVMXFormatConfig(virVMXContext *ctx, virCapsPtr caps, virDomainDefPtr def,
/* def:sounds */
/* FIXME */
+ /* def:videos */
+ if (def->nvideos > 0) {
+ if (def->nvideos > 1) {
+ VMX_ERROR(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("No support for multiple video devices"));
+ goto cleanup;
+ }
+
+ if (virVMXFormatSVGA(def->videos[0], &buffer) < 0) {
+ goto cleanup;
+ }
+ }
+
/* def:hostdevs */
/* FIXME */
@@ -3645,3 +3721,37 @@ virVMXFormatParallel(virVMXContext *ctx, virDomainChrDefPtr def,
return 0;
}
+
+
+
+int
+virVMXFormatSVGA(virDomainVideoDefPtr def, virBufferPtr buffer)
+{
+ if (def->type != VIR_DOMAIN_VIDEO_TYPE_VMVGA) {
+ VMX_ERROR(VIR_ERR_INTERNAL_ERROR,
+ _("Unsupported video device type '%s'"),
+ virDomainVideoTypeToString(def->type));
+ return -1;
+ }
+
+ /*
+ * For Windows guests the VRAM size should be a multiple of 64 kilobyte.
+ * See http://kb.vmware.com/kb/1003 and http://kb.vmware.com/kb/1001558
+ */
+ if (def->vram % 64 != 0) {
+ VMX_ERROR(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("Video device VRAM size must be a multiple of 64 kilobyte"));
+ return -1;
+ }
+
+ if (def->heads > 1) {
+ VMX_ERROR(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("Multi-head video devices are unsupported"));
+ return -1;
+ }
+
+ virBufferVSprintf(buffer, "svga.vramSize = \"%d\"\n",
+ def->vram * 1024); /* Scale from kilobytes to bytes */
+
+ return 0;
+}
diff --git a/src/vmx/vmx.h b/src/vmx/vmx.h
index 1a4fd9c..c317108 100644
--- a/src/vmx/vmx.h
+++ b/src/vmx/vmx.h
@@ -100,6 +100,8 @@ int virVMXParseSerial(virVMXContext *ctx, virConfPtr conf, int port,
int virVMXParseParallel(virVMXContext *ctx, virConfPtr conf, int port,
virDomainChrDefPtr *def);
+int virVMXParseSVGA(virConfPtr conf, virDomainVideoDefPtr *def);
+
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
@@ -129,4 +131,6 @@ int virVMXFormatSerial(virVMXContext *ctx, virDomainChrDefPtr def,
int virVMXFormatParallel(virVMXContext *ctx, virDomainChrDefPtr def,
virBufferPtr buffer);
+int virVMXFormatSVGA(virDomainVideoDefPtr def, virBufferPtr buffer);
+
#endif /* __VIR_VMX_H__ */
diff --git a/tests/vmx2xmldata/vmx2xml-annotation.xml b/tests/vmx2xmldata/vmx2xml-annotation.xml
index 1af45aa..f42f77b 100644
--- a/tests/vmx2xmldata/vmx2xml-annotation.xml
+++ b/tests/vmx2xmldata/vmx2xml-annotation.xml
@@ -12,5 +12,8 @@
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
+ <video>
+ <model type='vmvga' vram='4096'/>
+ </video>
</devices>
</domain>
diff --git a/tests/vmx2xmldata/vmx2xml-case-insensitive-1.xml b/tests/vmx2xmldata/vmx2xml-case-insensitive-1.xml
index b47e128..7a5ff5b 100644
--- a/tests/vmx2xmldata/vmx2xml-case-insensitive-1.xml
+++ b/tests/vmx2xmldata/vmx2xml-case-insensitive-1.xml
@@ -22,5 +22,8 @@
<mac address='00:50:56:91:48:c7'/>
<source bridge='VM NETWORK'/>
</interface>
+ <video>
+ <model type='vmvga' vram='4096'/>
+ </video>
</devices>
</domain>
diff --git a/tests/vmx2xmldata/vmx2xml-case-insensitive-2.xml b/tests/vmx2xmldata/vmx2xml-case-insensitive-2.xml
index 4974f4e..18d6461 100644
--- a/tests/vmx2xmldata/vmx2xml-case-insensitive-2.xml
+++ b/tests/vmx2xmldata/vmx2xml-case-insensitive-2.xml
@@ -22,5 +22,8 @@
<mac address='00:50:56:91:48:c7'/>
<source bridge='vm network'/>
</interface>
+ <video>
+ <model type='vmvga' vram='4096'/>
+ </video>
</devices>
</domain>
diff --git a/tests/vmx2xmldata/vmx2xml-cdrom-ide-device.xml b/tests/vmx2xmldata/vmx2xml-cdrom-ide-device.xml
index 1905f9b..e11d2f9 100644
--- a/tests/vmx2xmldata/vmx2xml-cdrom-ide-device.xml
+++ b/tests/vmx2xmldata/vmx2xml-cdrom-ide-device.xml
@@ -17,5 +17,8 @@
<address type='drive' controller='0' bus='0' unit='0'/>
</disk>
<controller type='ide' index='0'/>
+ <video>
+ <model type='vmvga' vram='4096'/>
+ </video>
</devices>
</domain>
diff --git a/tests/vmx2xmldata/vmx2xml-cdrom-ide-file.xml b/tests/vmx2xmldata/vmx2xml-cdrom-ide-file.xml
index b9cf1f9..d1fb690 100644
--- a/tests/vmx2xmldata/vmx2xml-cdrom-ide-file.xml
+++ b/tests/vmx2xmldata/vmx2xml-cdrom-ide-file.xml
@@ -17,5 +17,8 @@
<address type='drive' controller='0' bus='0' unit='0'/>
</disk>
<controller type='ide' index='0'/>
+ <video>
+ <model type='vmvga' vram='4096'/>
+ </video>
</devices>
</domain>
diff --git a/tests/vmx2xmldata/vmx2xml-cdrom-scsi-device.xml b/tests/vmx2xmldata/vmx2xml-cdrom-scsi-device.xml
index 1bb42be..7eb3676 100644
--- a/tests/vmx2xmldata/vmx2xml-cdrom-scsi-device.xml
+++ b/tests/vmx2xmldata/vmx2xml-cdrom-scsi-device.xml
@@ -17,5 +17,8 @@
<address type='drive' controller='0' bus='0' unit='0'/>
</disk>
<controller type='scsi' index='0'/>
+ <video>
+ <model type='vmvga' vram='4096'/>
+ </video>
</devices>
</domain>
diff --git a/tests/vmx2xmldata/vmx2xml-cdrom-scsi-file.xml b/tests/vmx2xmldata/vmx2xml-cdrom-scsi-file.xml
index bdcb0b0..df1e7c4 100644
--- a/tests/vmx2xmldata/vmx2xml-cdrom-scsi-file.xml
+++ b/tests/vmx2xmldata/vmx2xml-cdrom-scsi-file.xml
@@ -17,5 +17,8 @@
<address type='drive' controller='0' bus='0' unit='0'/>
</disk>
<controller type='scsi' index='0'/>
+ <video>
+ <model type='vmvga' vram='4096'/>
+ </video>
</devices>
</domain>
diff --git a/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-1.xml b/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-1.xml
index fd50008..5e67e74 100644
--- a/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-1.xml
+++ b/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-1.xml
@@ -22,5 +22,8 @@
<mac address='00:50:56:91:48:c7'/>
<source bridge='VM Network'/>
</interface>
+ <video>
+ <model type='vmvga' vram='4096'/>
+ </video>
</devices>
</domain>
diff --git a/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-2.xml b/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-2.xml
index e98b679..23fc1f6 100644
--- a/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-2.xml
+++ b/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-2.xml
@@ -52,5 +52,8 @@
<source bridge='VM Network'/>
<model type='vlance'/>
</interface>
+ <video>
+ <model type='vmvga' vram='4096'/>
+ </video>
</devices>
</domain>
diff --git a/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-3.xml b/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-3.xml
index 6d18209..e193fdb 100644
--- a/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-3.xml
+++ b/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-3.xml
@@ -34,5 +34,8 @@
<mac address='00:0c:29:f5:c3:0c'/>
<source bridge='VM Network'/>
</interface>
+ <video>
+ <model type='vmvga' vram='4096'/>
+ </video>
</devices>
</domain>
diff --git a/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-4.xml b/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-4.xml
index 4238882..419df51 100644
--- a/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-4.xml
+++ b/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-4.xml
@@ -38,5 +38,8 @@
<source path='[498076b2-02796c1a-ef5b-000ae484a6a3] virtMonServ1/serial1.file'/>
<target type='serial' port='0'/>
</console>
+ <video>
+ <model type='vmvga' vram='4096'/>
+ </video>
</devices>
</domain>
diff --git a/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-5.xml b/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-5.xml
index d55bf6b..0040163 100644
--- a/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-5.xml
+++ b/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-5.xml
@@ -33,5 +33,8 @@
<source bridge='VM-LAN'/>
<model type='e1000'/>
</interface>
+ <video>
+ <model type='vmvga' vram='4096'/>
+ </video>
</devices>
</domain>
diff --git a/tests/vmx2xmldata/vmx2xml-ethernet-bridged.xml b/tests/vmx2xmldata/vmx2xml-ethernet-bridged.xml
index 7ef2d3d..cec329d 100644
--- a/tests/vmx2xmldata/vmx2xml-ethernet-bridged.xml
+++ b/tests/vmx2xmldata/vmx2xml-ethernet-bridged.xml
@@ -15,5 +15,8 @@
<mac address='00:50:56:11:22:33'/>
<source bridge='VM Network'/>
</interface>
+ <video>
+ <model type='vmvga' vram='4096'/>
+ </video>
</devices>
</domain>
diff --git a/tests/vmx2xmldata/vmx2xml-ethernet-custom.xml b/tests/vmx2xmldata/vmx2xml-ethernet-custom.xml
index e08a450..8c7b833 100644
--- a/tests/vmx2xmldata/vmx2xml-ethernet-custom.xml
+++ b/tests/vmx2xmldata/vmx2xml-ethernet-custom.xml
@@ -16,5 +16,8 @@
<source bridge='VM Network'/>
<target dev='vmnet7'/>
</interface>
+ <video>
+ <model type='vmvga' vram='4096'/>
+ </video>
</devices>
</domain>
diff --git a/tests/vmx2xmldata/vmx2xml-ethernet-e1000.xml b/tests/vmx2xmldata/vmx2xml-ethernet-e1000.xml
index 1e64c52..9b356ea 100644
--- a/tests/vmx2xmldata/vmx2xml-ethernet-e1000.xml
+++ b/tests/vmx2xmldata/vmx2xml-ethernet-e1000.xml
@@ -16,5 +16,8 @@
<source bridge='VM Network'/>
<model type='e1000'/>
</interface>
+ <video>
+ <model type='vmvga' vram='4096'/>
+ </video>
</devices>
</domain>
diff --git a/tests/vmx2xmldata/vmx2xml-ethernet-generated.xml b/tests/vmx2xmldata/vmx2xml-ethernet-generated.xml
index ffb203b..aead831 100644
--- a/tests/vmx2xmldata/vmx2xml-ethernet-generated.xml
+++ b/tests/vmx2xmldata/vmx2xml-ethernet-generated.xml
@@ -15,5 +15,8 @@
<mac address='00:0c:29:11:22:33'/>
<source bridge='VM Network'/>
</interface>
+ <video>
+ <model type='vmvga' vram='4096'/>
+ </video>
</devices>
</domain>
diff --git a/tests/vmx2xmldata/vmx2xml-ethernet-other.xml b/tests/vmx2xmldata/vmx2xml-ethernet-other.xml
index 4c44fbc..a746115 100644
--- a/tests/vmx2xmldata/vmx2xml-ethernet-other.xml
+++ b/tests/vmx2xmldata/vmx2xml-ethernet-other.xml
@@ -15,5 +15,8 @@
<mac address='00:12:34:56:78:90'/>
<source bridge='VM Network'/>
</interface>
+ <video>
+ <model type='vmvga' vram='4096'/>
+ </video>
</devices>
</domain>
diff --git a/tests/vmx2xmldata/vmx2xml-ethernet-static.xml b/tests/vmx2xmldata/vmx2xml-ethernet-static.xml
index 7ef2d3d..cec329d 100644
--- a/tests/vmx2xmldata/vmx2xml-ethernet-static.xml
+++ b/tests/vmx2xmldata/vmx2xml-ethernet-static.xml
@@ -15,5 +15,8 @@
<mac address='00:50:56:11:22:33'/>
<source bridge='VM Network'/>
</interface>
+ <video>
+ <model type='vmvga' vram='4096'/>
+ </video>
</devices>
</domain>
diff --git a/tests/vmx2xmldata/vmx2xml-ethernet-vmxnet2.xml b/tests/vmx2xmldata/vmx2xml-ethernet-vmxnet2.xml
index 090f7ce..b7773ad 100644
--- a/tests/vmx2xmldata/vmx2xml-ethernet-vmxnet2.xml
+++ b/tests/vmx2xmldata/vmx2xml-ethernet-vmxnet2.xml
@@ -16,5 +16,8 @@
<source bridge='VM Network'/>
<model type='vmxnet2'/>
</interface>
+ <video>
+ <model type='vmvga' vram='4096'/>
+ </video>
</devices>
</domain>
diff --git a/tests/vmx2xmldata/vmx2xml-ethernet-vpx.xml b/tests/vmx2xmldata/vmx2xml-ethernet-vpx.xml
index 1d90f31..bdc8d8c 100644
--- a/tests/vmx2xmldata/vmx2xml-ethernet-vpx.xml
+++ b/tests/vmx2xmldata/vmx2xml-ethernet-vpx.xml
@@ -15,5 +15,8 @@
<mac address='00:50:56:87:65:43'/>
<source bridge='VM Network'/>
</interface>
+ <video>
+ <model type='vmvga' vram='4096'/>
+ </video>
</devices>
</domain>
diff --git a/tests/vmx2xmldata/vmx2xml-floppy-device.xml b/tests/vmx2xmldata/vmx2xml-floppy-device.xml
index 4ae16d5..824849a 100644
--- a/tests/vmx2xmldata/vmx2xml-floppy-device.xml
+++ b/tests/vmx2xmldata/vmx2xml-floppy-device.xml
@@ -17,5 +17,8 @@
<address type='drive' controller='0' bus='0' unit='0'/>
</disk>
<controller type='fdc' index='0'/>
+ <video>
+ <model type='vmvga' vram='4096'/>
+ </video>
</devices>
</domain>
diff --git a/tests/vmx2xmldata/vmx2xml-floppy-file.xml b/tests/vmx2xmldata/vmx2xml-floppy-file.xml
index 5ab538e..75d0d62 100644
--- a/tests/vmx2xmldata/vmx2xml-floppy-file.xml
+++ b/tests/vmx2xmldata/vmx2xml-floppy-file.xml
@@ -17,5 +17,8 @@
<address type='drive' controller='0' bus='0' unit='0'/>
</disk>
<controller type='fdc' index='0'/>
+ <video>
+ <model type='vmvga' vram='4096'/>
+ </video>
</devices>
</domain>
diff --git a/tests/vmx2xmldata/vmx2xml-graphics-vnc.xml b/tests/vmx2xmldata/vmx2xml-graphics-vnc.xml
index 159324d..047e034 100644
--- a/tests/vmx2xmldata/vmx2xml-graphics-vnc.xml
+++ b/tests/vmx2xmldata/vmx2xml-graphics-vnc.xml
@@ -13,5 +13,8 @@
<devices>
<input type='mouse' bus='ps2'/>
<graphics type='vnc' port='5903' autoport='no' keymap='de' passwd='password'/>
+ <video>
+ <model type='vmvga' vram='4096'/>
+ </video>
</devices>
</domain>
diff --git a/tests/vmx2xmldata/vmx2xml-gsx-in-the-wild-1.xml b/tests/vmx2xmldata/vmx2xml-gsx-in-the-wild-1.xml
index 0c308bc..b572ad1 100644
--- a/tests/vmx2xmldata/vmx2xml-gsx-in-the-wild-1.xml
+++ b/tests/vmx2xmldata/vmx2xml-gsx-in-the-wild-1.xml
@@ -23,5 +23,8 @@
<source bridge='net1'/>
<target dev='/dev/vmnet1'/>
</interface>
+ <video>
+ <model type='vmvga' vram='4096'/>
+ </video>
</devices>
</domain>
diff --git a/tests/vmx2xmldata/vmx2xml-gsx-in-the-wild-2.xml b/tests/vmx2xmldata/vmx2xml-gsx-in-the-wild-2.xml
index 7b6158f..180cf68 100644
--- a/tests/vmx2xmldata/vmx2xml-gsx-in-the-wild-2.xml
+++ b/tests/vmx2xmldata/vmx2xml-gsx-in-the-wild-2.xml
@@ -23,5 +23,8 @@
<source bridge='net1'/>
<target dev='/dev/vmnet1'/>
</interface>
+ <video>
+ <model type='vmvga' vram='4096'/>
+ </video>
</devices>
</domain>
diff --git a/tests/vmx2xmldata/vmx2xml-gsx-in-the-wild-3.xml b/tests/vmx2xmldata/vmx2xml-gsx-in-the-wild-3.xml
index b926db5..571c83a 100644
--- a/tests/vmx2xmldata/vmx2xml-gsx-in-the-wild-3.xml
+++ b/tests/vmx2xmldata/vmx2xml-gsx-in-the-wild-3.xml
@@ -28,5 +28,8 @@
<source bridge='net2'/>
<target dev='/dev/vmnet2'/>
</interface>
+ <video>
+ <model type='vmvga' vram='4096'/>
+ </video>
</devices>
</domain>
diff --git a/tests/vmx2xmldata/vmx2xml-gsx-in-the-wild-4.xml b/tests/vmx2xmldata/vmx2xml-gsx-in-the-wild-4.xml
index 5803f4b..fc3b966 100644
--- a/tests/vmx2xmldata/vmx2xml-gsx-in-the-wild-4.xml
+++ b/tests/vmx2xmldata/vmx2xml-gsx-in-the-wild-4.xml
@@ -23,5 +23,8 @@
<source bridge='net2'/>
<target dev='/dev/vmnet2'/>
</interface>
+ <video>
+ <model type='vmvga' vram='4096'/>
+ </video>
</devices>
</domain>
diff --git a/tests/vmx2xmldata/vmx2xml-harddisk-ide-file.xml b/tests/vmx2xmldata/vmx2xml-harddisk-ide-file.xml
index 7699fbb..72a5c1f 100644
--- a/tests/vmx2xmldata/vmx2xml-harddisk-ide-file.xml
+++ b/tests/vmx2xmldata/vmx2xml-harddisk-ide-file.xml
@@ -17,5 +17,8 @@
<address type='drive' controller='0' bus='0' unit='0'/>
</disk>
<controller type='ide' index='0'/>
+ <video>
+ <model type='vmvga' vram='4096'/>
+ </video>
</devices>
</domain>
diff --git a/tests/vmx2xmldata/vmx2xml-harddisk-scsi-file.xml b/tests/vmx2xmldata/vmx2xml-harddisk-scsi-file.xml
index b04597b..189e72d 100644
--- a/tests/vmx2xmldata/vmx2xml-harddisk-scsi-file.xml
+++ b/tests/vmx2xmldata/vmx2xml-harddisk-scsi-file.xml
@@ -17,5 +17,8 @@
<address type='drive' controller='0' bus='0' unit='0'/>
</disk>
<controller type='scsi' index='0'/>
+ <video>
+ <model type='vmvga' vram='4096'/>
+ </video>
</devices>
</domain>
diff --git a/tests/vmx2xmldata/vmx2xml-minimal-64bit.xml b/tests/vmx2xmldata/vmx2xml-minimal-64bit.xml
index cec8ba0..188d31a 100644
--- a/tests/vmx2xmldata/vmx2xml-minimal-64bit.xml
+++ b/tests/vmx2xmldata/vmx2xml-minimal-64bit.xml
@@ -11,5 +11,8 @@
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
+ <video>
+ <model type='vmvga' vram='4096'/>
+ </video>
</devices>
</domain>
diff --git a/tests/vmx2xmldata/vmx2xml-minimal.xml b/tests/vmx2xmldata/vmx2xml-minimal.xml
index acfd9bd..ce2cfd6 100644
--- a/tests/vmx2xmldata/vmx2xml-minimal.xml
+++ b/tests/vmx2xmldata/vmx2xml-minimal.xml
@@ -11,5 +11,8 @@
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
+ <video>
+ <model type='vmvga' vram='4096'/>
+ </video>
</devices>
</domain>
diff --git a/tests/vmx2xmldata/vmx2xml-parallel-device.xml b/tests/vmx2xmldata/vmx2xml-parallel-device.xml
index 28c2302..bc288a6 100644
--- a/tests/vmx2xmldata/vmx2xml-parallel-device.xml
+++ b/tests/vmx2xmldata/vmx2xml-parallel-device.xml
@@ -15,5 +15,8 @@
<source path='/dev/parallel0'/>
<target port='0'/>
</parallel>
+ <video>
+ <model type='vmvga' vram='4096'/>
+ </video>
</devices>
</domain>
diff --git a/tests/vmx2xmldata/vmx2xml-parallel-file.xml b/tests/vmx2xmldata/vmx2xml-parallel-file.xml
index 340cf4e..ad7a65f 100644
--- a/tests/vmx2xmldata/vmx2xml-parallel-file.xml
+++ b/tests/vmx2xmldata/vmx2xml-parallel-file.xml
@@ -15,5 +15,8 @@
<source path='[datastore] directory/parallel0.file'/>
<target port='0'/>
</parallel>
+ <video>
+ <model type='vmvga' vram='4096'/>
+ </video>
</devices>
</domain>
diff --git a/tests/vmx2xmldata/vmx2xml-scsi-driver.xml b/tests/vmx2xmldata/vmx2xml-scsi-driver.xml
index 553783b..8fa907b 100644
--- a/tests/vmx2xmldata/vmx2xml-scsi-driver.xml
+++ b/tests/vmx2xmldata/vmx2xml-scsi-driver.xml
@@ -35,5 +35,8 @@
<controller type='scsi' index='1' model='lsilogic'/>
<controller type='scsi' index='2' model='lsisas1068'/>
<controller type='scsi' index='3' model='vmpvscsi'/>
+ <video>
+ <model type='vmvga' vram='4096'/>
+ </video>
</devices>
</domain>
diff --git a/tests/vmx2xmldata/vmx2xml-scsi-writethrough.xml b/tests/vmx2xmldata/vmx2xml-scsi-writethrough.xml
index 66e22ae..e5b8934 100644
--- a/tests/vmx2xmldata/vmx2xml-scsi-writethrough.xml
+++ b/tests/vmx2xmldata/vmx2xml-scsi-writethrough.xml
@@ -18,5 +18,8 @@
<address type='drive' controller='0' bus='0' unit='0'/>
</disk>
<controller type='scsi' index='0' model='buslogic'/>
+ <video>
+ <model type='vmvga' vram='4096'/>
+ </video>
</devices>
</domain>
diff --git a/tests/vmx2xmldata/vmx2xml-serial-device.xml b/tests/vmx2xmldata/vmx2xml-serial-device.xml
index c9f00eb..51fd06f 100644
--- a/tests/vmx2xmldata/vmx2xml-serial-device.xml
+++ b/tests/vmx2xmldata/vmx2xml-serial-device.xml
@@ -19,5 +19,8 @@
<source path='/dev/ttyS0'/>
<target type='serial' port='0'/>
</console>
+ <video>
+ <model type='vmvga' vram='4096'/>
+ </video>
</devices>
</domain>
diff --git a/tests/vmx2xmldata/vmx2xml-serial-file.xml b/tests/vmx2xmldata/vmx2xml-serial-file.xml
index 21b6263..25ade07 100644
--- a/tests/vmx2xmldata/vmx2xml-serial-file.xml
+++ b/tests/vmx2xmldata/vmx2xml-serial-file.xml
@@ -19,5 +19,8 @@
<source path='[datastore] directory/serial0.file'/>
<target type='serial' port='0'/>
</console>
+ <video>
+ <model type='vmvga' vram='4096'/>
+ </video>
</devices>
</domain>
diff --git a/tests/vmx2xmldata/vmx2xml-serial-network-client.xml b/tests/vmx2xmldata/vmx2xml-serial-network-client.xml
index b0c0715..7573a11 100644
--- a/tests/vmx2xmldata/vmx2xml-serial-network-client.xml
+++ b/tests/vmx2xmldata/vmx2xml-serial-network-client.xml
@@ -21,5 +21,8 @@
<protocol type='raw'/>
<target type='serial' port='0'/>
</console>
+ <video>
+ <model type='vmvga' vram='4096'/>
+ </video>
</devices>
</domain>
diff --git a/tests/vmx2xmldata/vmx2xml-serial-network-server.xml b/tests/vmx2xmldata/vmx2xml-serial-network-server.xml
index e151017..ed38495 100644
--- a/tests/vmx2xmldata/vmx2xml-serial-network-server.xml
+++ b/tests/vmx2xmldata/vmx2xml-serial-network-server.xml
@@ -21,5 +21,8 @@
<protocol type='telnets'/>
<target type='serial' port='0'/>
</console>
+ <video>
+ <model type='vmvga' vram='4096'/>
+ </video>
</devices>
</domain>
diff --git a/tests/vmx2xmldata/vmx2xml-serial-pipe.xml b/tests/vmx2xmldata/vmx2xml-serial-pipe.xml
index cf8a797..ca5196c 100644
--- a/tests/vmx2xmldata/vmx2xml-serial-pipe.xml
+++ b/tests/vmx2xmldata/vmx2xml-serial-pipe.xml
@@ -19,5 +19,8 @@
<source path='serial0.pipe'/>
<target type='serial' port='0'/>
</console>
+ <video>
+ <model type='vmvga' vram='4096'/>
+ </video>
</devices>
</domain>
diff --git a/tests/vmx2xmldata/vmx2xml-smbios.xml b/tests/vmx2xmldata/vmx2xml-smbios.xml
index db13001..d78ac6c 100644
--- a/tests/vmx2xmldata/vmx2xml-smbios.xml
+++ b/tests/vmx2xmldata/vmx2xml-smbios.xml
@@ -12,5 +12,8 @@
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
+ <video>
+ <model type='vmvga' vram='4096'/>
+ </video>
</devices>
</domain>
diff --git a/tests/vmx2xmldata/vmx2xml-svga.vmx b/tests/vmx2xmldata/vmx2xml-svga.vmx
new file mode 100644
index 0000000..081d6ce
--- /dev/null
+++ b/tests/vmx2xmldata/vmx2xml-svga.vmx
@@ -0,0 +1,3 @@
+config.version = "8"
+virtualHW.version = "4"
+svga.vramSize = "8388608"
diff --git a/tests/vmx2xmldata/vmx2xml-svga.xml b/tests/vmx2xmldata/vmx2xml-svga.xml
new file mode 100644
index 0000000..664eba4
--- /dev/null
+++ b/tests/vmx2xmldata/vmx2xml-svga.xml
@@ -0,0 +1,18 @@
+<domain type='vmware'>
+ <uuid>00000000-0000-0000-0000-000000000000</uuid>
+ <memory>32768</memory>
+ <currentMemory>32768</currentMemory>
+ <vcpu>1</vcpu>
+ <os>
+ <type arch='i686'>hvm</type>
+ </os>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>destroy</on_crash>
+ <devices>
+ <video>
+ <model type='vmvga' vram='8192'/>
+ </video>
+ </devices>
+</domain>
diff --git a/tests/vmx2xmltest.c b/tests/vmx2xmltest.c
index 9378db3..5fed1c4 100644
--- a/tests/vmx2xmltest.c
+++ b/tests/vmx2xmltest.c
@@ -285,6 +285,8 @@ mymain(int argc, char **argv)
DO_TEST("smbios", "smbios");
+ DO_TEST("svga", "svga");
+
virCapabilitiesFree(caps);
return result == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
diff --git a/tests/xml2vmxdata/xml2vmx-graphics-vnc.vmx b/tests/xml2vmxdata/xml2vmx-graphics-vnc.vmx
index caab06a..493e0cc 100644
--- a/tests/xml2vmxdata/xml2vmx-graphics-vnc.vmx
+++ b/tests/xml2vmxdata/xml2vmx-graphics-vnc.vmx
@@ -12,3 +12,4 @@ RemoteDisplay.vnc.keymap = "de"
RemoteDisplay.vnc.password = "password"
floppy0.present = "false"
floppy1.present = "false"
+svga.vramSize = "4194304"
diff --git a/tests/xml2vmxdata/xml2vmx-svga.vmx b/tests/xml2vmxdata/xml2vmx-svga.vmx
new file mode 100644
index 0000000..4bd4870
--- /dev/null
+++ b/tests/xml2vmxdata/xml2vmx-svga.vmx
@@ -0,0 +1,11 @@
+.encoding = "UTF-8"
+config.version = "8"
+virtualHW.version = "4"
+guestOS = "other"
+uuid.bios = "56 4d 9b ef ac d9 b4 e0-c8 f0 ae a8 b9 10 35 15"
+displayName = "minimal"
+memsize = "4"
+numvcpus = "1"
+floppy0.present = "false"
+floppy1.present = "false"
+svga.vramSize = "8388608"
diff --git a/tests/xml2vmxdata/xml2vmx-svga.xml b/tests/xml2vmxdata/xml2vmx-svga.xml
new file mode 100644
index 0000000..b7db4c8
--- /dev/null
+++ b/tests/xml2vmxdata/xml2vmx-svga.xml
@@ -0,0 +1,13 @@
+<domain type='vmware'>
+ <name>minimal</name>
+ <uuid>564d9bef-acd9-b4e0-c8f0-aea8b9103515</uuid>
+ <memory>4096</memory>
+ <os>
+ <type>hvm</type>
+ </os>
+ <devices>
+ <video>
+ <model type='vmvga' vram='8192'/>
+ </video>
+ </devices>
+</domain>
diff --git a/tests/xml2vmxtest.c b/tests/xml2vmxtest.c
index 6a39582..a5fb4f7 100644
--- a/tests/xml2vmxtest.c
+++ b/tests/xml2vmxtest.c
@@ -296,6 +296,8 @@ mymain(int argc, char **argv)
DO_TEST("smbios", "smbios", 4);
+ DO_TEST("svga", "svga", 4);
+
virCapabilitiesFree(caps);
return result == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
--
1.7.0.4
13 years, 10 months