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 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list