]> xenbits.xensource.com Git - libvirt.git/commitdiff
vmx: Add support for video device VRAM size
authorMatthias Bolte <matthias.bolte@googlemail.com>
Thu, 30 Dec 2010 17:08:54 +0000 (18:08 +0100)
committerMatthias Bolte <matthias.bolte@googlemail.com>
Thu, 6 Jan 2011 17:18:35 +0000 (18:18 +0100)
Update test suite accordingly.

50 files changed:
src/vmx/vmx.c
src/vmx/vmx.h
tests/vmx2xmldata/vmx2xml-annotation.xml
tests/vmx2xmldata/vmx2xml-case-insensitive-1.xml
tests/vmx2xmldata/vmx2xml-case-insensitive-2.xml
tests/vmx2xmldata/vmx2xml-cdrom-ide-device.xml
tests/vmx2xmldata/vmx2xml-cdrom-ide-file.xml
tests/vmx2xmldata/vmx2xml-cdrom-scsi-device.xml
tests/vmx2xmldata/vmx2xml-cdrom-scsi-file.xml
tests/vmx2xmldata/vmx2xml-esx-in-the-wild-1.xml
tests/vmx2xmldata/vmx2xml-esx-in-the-wild-2.xml
tests/vmx2xmldata/vmx2xml-esx-in-the-wild-3.xml
tests/vmx2xmldata/vmx2xml-esx-in-the-wild-4.xml
tests/vmx2xmldata/vmx2xml-esx-in-the-wild-5.xml
tests/vmx2xmldata/vmx2xml-ethernet-bridged.xml
tests/vmx2xmldata/vmx2xml-ethernet-custom.xml
tests/vmx2xmldata/vmx2xml-ethernet-e1000.xml
tests/vmx2xmldata/vmx2xml-ethernet-generated.xml
tests/vmx2xmldata/vmx2xml-ethernet-other.xml
tests/vmx2xmldata/vmx2xml-ethernet-static.xml
tests/vmx2xmldata/vmx2xml-ethernet-vmxnet2.xml
tests/vmx2xmldata/vmx2xml-ethernet-vpx.xml
tests/vmx2xmldata/vmx2xml-floppy-device.xml
tests/vmx2xmldata/vmx2xml-floppy-file.xml
tests/vmx2xmldata/vmx2xml-graphics-vnc.xml
tests/vmx2xmldata/vmx2xml-gsx-in-the-wild-1.xml
tests/vmx2xmldata/vmx2xml-gsx-in-the-wild-2.xml
tests/vmx2xmldata/vmx2xml-gsx-in-the-wild-3.xml
tests/vmx2xmldata/vmx2xml-gsx-in-the-wild-4.xml
tests/vmx2xmldata/vmx2xml-harddisk-ide-file.xml
tests/vmx2xmldata/vmx2xml-harddisk-scsi-file.xml
tests/vmx2xmldata/vmx2xml-minimal-64bit.xml
tests/vmx2xmldata/vmx2xml-minimal.xml
tests/vmx2xmldata/vmx2xml-parallel-device.xml
tests/vmx2xmldata/vmx2xml-parallel-file.xml
tests/vmx2xmldata/vmx2xml-scsi-driver.xml
tests/vmx2xmldata/vmx2xml-scsi-writethrough.xml
tests/vmx2xmldata/vmx2xml-serial-device.xml
tests/vmx2xmldata/vmx2xml-serial-file.xml
tests/vmx2xmldata/vmx2xml-serial-network-client.xml
tests/vmx2xmldata/vmx2xml-serial-network-server.xml
tests/vmx2xmldata/vmx2xml-serial-pipe.xml
tests/vmx2xmldata/vmx2xml-smbios.xml
tests/vmx2xmldata/vmx2xml-svga.vmx [new file with mode: 0644]
tests/vmx2xmldata/vmx2xml-svga.xml [new file with mode: 0644]
tests/vmx2xmltest.c
tests/xml2vmxdata/xml2vmx-graphics-vnc.vmx
tests/xml2vmxdata/xml2vmx-svga.vmx [new file with mode: 0644]
tests/xml2vmxdata/xml2vmx-svga.xml [new file with mode: 0644]
tests/xml2vmxtest.c

index 6e3e9af4ee54a123743a4f959da34be67be1e476..c116940a8b7b773008d72fbfa55dad66e0011bca 100644 (file)
@@ -325,6 +325,16 @@ def->nets[0]...
 
 
 
+################################################################################
+## video #######################################################################
+
+def->videos[0]...
+->type = _VIDEO_TYPE_VMVGA
+->vram = <value kilobyte>         <=>   svga.vramSize = "<value byte>"
+->heads = 1
+
+
+
 ################################################################################
 ## serials #####################################################################
 
@@ -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 = \"%lld\"\n",
+                      def->vram * 1024LL); /* Scale from kilobytes to bytes */
+
+    return 0;
+}
index 1a4fd9cea28969b9bf4ff69052db5e44882413a7..c31710834995bfd0731f8ee3ef1392423913c95b 100644 (file)
@@ -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__ */
index 1af45aad67cedeb882e17fc88cdbe00b1b4bfe2c..f42f77b5c70560418c25ab4df1e9aef914b13cc9 100644 (file)
@@ -12,5 +12,8 @@
   <on_reboot>restart</on_reboot>
   <on_crash>destroy</on_crash>
   <devices>
+    <video>
+      <model type='vmvga' vram='4096'/>
+    </video>
   </devices>
 </domain>
index b47e1286053b8c628b5b0ed99b551c0a16984bb9..7a5ff5bc31748aec9fa93ef63539e7fc378bc3e2 100644 (file)
@@ -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>
index 4974f4e75f19acbacbc9e7c783a9fa3c332ad6ca..18d64611fc1e994f6c9f6c0161b27c7c7e264920 100644 (file)
@@ -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>
index 1905f9be922be87c7594ae0ab85e1b64d5833167..e11d2f995a494fe1743ba55bf5e72299abd5877a 100644 (file)
@@ -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>
index b9cf1f9c4e95cfe5662409b1ab70b01ae24e3dbf..d1fb6902b221774954c1ab37327372cc68e05b02 100644 (file)
@@ -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>
index 1bb42be1be24fe8d9bd1351b926682c312aafa5b..7eb36766f2489798e838adebcb722f660a2a0762 100644 (file)
@@ -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>
index bdcb0b06e32b1ba94b9d8dab10577331350453ed..df1e7c4614a3380d973e353961ab63cea3872401 100644 (file)
@@ -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>
index fd50008fc208fa8c339405204f14a68bbe66ba8f..5e67e746fd89d5a40245f95526de55626c5bc213 100644 (file)
@@ -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>
index e98b67972fe169f6e1a79d801d9adc21b00c3f83..23fc1f62c8a1d2cd19cf3ffa22d8b407db5785e5 100644 (file)
@@ -52,5 +52,8 @@
       <source bridge='VM Network'/>
       <model type='vlance'/>
     </interface>
+    <video>
+      <model type='vmvga' vram='4096'/>
+    </video>
   </devices>
 </domain>
index 6d182092705b06871d04df966aa21230d5fa763b..e193fdb2c74d8389109597d759f4f73d8f5ad9cd 100644 (file)
@@ -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>
index 42388825da29aa61a70106e6dd1ca78bd7b8a973..419df518de2c607642c1a1a1e7eedf0008d0eb4f 100644 (file)
@@ -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>
index d55bf6be7e23bc43d1ccd439e364ea478252037e..004016324ba5cf7695cb1755dc3ef85bfa56c203 100644 (file)
@@ -33,5 +33,8 @@
       <source bridge='VM-LAN'/>
       <model type='e1000'/>
     </interface>
+    <video>
+      <model type='vmvga' vram='4096'/>
+    </video>
   </devices>
 </domain>
index 7ef2d3ded2fa11a44fdb5c029251c80729dfa3fe..cec329d1f1b69243b73f766339312631c8c34f90 100644 (file)
@@ -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>
index e08a450c33eb6841a166338a96c8db3f9b00d02b..8c7b83352f3dcce46c7c610d93d08b08a33e09c0 100644 (file)
@@ -16,5 +16,8 @@
       <source bridge='VM Network'/>
       <target dev='vmnet7'/>
     </interface>
+    <video>
+      <model type='vmvga' vram='4096'/>
+    </video>
   </devices>
 </domain>
index 1e64c52c5c9526c99dedd3e89eb52088af83c22f..9b356ea797569b042427682b206e364ad7fda5d4 100644 (file)
@@ -16,5 +16,8 @@
       <source bridge='VM Network'/>
       <model type='e1000'/>
     </interface>
+    <video>
+      <model type='vmvga' vram='4096'/>
+    </video>
   </devices>
 </domain>
index ffb203b74f845eb4321ab94ccef37ecf4b079428..aead831afbc4df3143b1703c504e422737c42c2d 100644 (file)
@@ -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>
index 4c44fbc6b9223d213661d70c668955ec5c49e9dd..a74611565e37a6fde069ed6ad1b7de3d2a32fc3b 100644 (file)
@@ -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>
index 7ef2d3ded2fa11a44fdb5c029251c80729dfa3fe..cec329d1f1b69243b73f766339312631c8c34f90 100644 (file)
@@ -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>
index 090f7ceca9fc14ed3893d354177f45f23038c868..b7773ad2a7d8208085870b2a290fb3e3166d54c1 100644 (file)
@@ -16,5 +16,8 @@
       <source bridge='VM Network'/>
       <model type='vmxnet2'/>
     </interface>
+    <video>
+      <model type='vmvga' vram='4096'/>
+    </video>
   </devices>
 </domain>
index 1d90f3182b4c9059fc20ed9dd71e0f6c50a94a50..bdc8d8c128c168e8eea505aed3bb86a6e7f041f9 100644 (file)
@@ -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>
index 4ae16d562b75860e60c1f2d45c76c15b23b4146e..824849a4c2b841c832724b196d6eed0578cf9a33 100644 (file)
@@ -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>
index 5ab538ed1cc5049679803bc0a57e648dd24c7167..75d0d625ae2a12648638653bf0c5b7f263d8378d 100644 (file)
@@ -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>
index 159324d07ebd59521583232523b06fd14c66f02f..047e0349d45b3654fe3a830ba9391298bc40a119 100644 (file)
@@ -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>
index 0c308bc53095694dc356201a72711246070fafaa..b572ad1ffe8c20d845c40320ab0e977b3c264545 100644 (file)
@@ -23,5 +23,8 @@
       <source bridge='net1'/>
       <target dev='/dev/vmnet1'/>
     </interface>
+    <video>
+      <model type='vmvga' vram='4096'/>
+    </video>
   </devices>
 </domain>
index 7b6158f31637cfef57fb00a38a5012128573aaf5..180cf6814f405d91f93881d69fb611eafed7a38e 100644 (file)
@@ -23,5 +23,8 @@
       <source bridge='net1'/>
       <target dev='/dev/vmnet1'/>
     </interface>
+    <video>
+      <model type='vmvga' vram='4096'/>
+    </video>
   </devices>
 </domain>
index b926db57c248f05826e9965aafabc52f28416423..571c83a559453407450d286cdbcdb2519fb8174e 100644 (file)
@@ -28,5 +28,8 @@
       <source bridge='net2'/>
       <target dev='/dev/vmnet2'/>
     </interface>
+    <video>
+      <model type='vmvga' vram='4096'/>
+    </video>
   </devices>
 </domain>
index 5803f4bded3a860adac4783c6aebed6d74085607..fc3b9665adcbf73fb5334bcf9c53c11d86473cab 100644 (file)
@@ -23,5 +23,8 @@
       <source bridge='net2'/>
       <target dev='/dev/vmnet2'/>
     </interface>
+    <video>
+      <model type='vmvga' vram='4096'/>
+    </video>
   </devices>
 </domain>
index 7699fbb83bdf276c1c64aa44219a6e371f0e1f18..72a5c1ff716d461ee24e2b78137ba864471879ef 100644 (file)
@@ -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>
index b04597be38ee86e9fdb31b8a6f997877cffbe503..189e72d9180f5592ca980d874b35a02ff448e35f 100644 (file)
@@ -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>
index cec8ba09b1c804dc1a85765206bc83b1c5eb4850..188d31a5b946081977749b717e16ea5860722497 100644 (file)
@@ -11,5 +11,8 @@
   <on_reboot>restart</on_reboot>
   <on_crash>destroy</on_crash>
   <devices>
+    <video>
+      <model type='vmvga' vram='4096'/>
+    </video>
   </devices>
 </domain>
index acfd9bd7d5ddbd9ee63548455c6eeeba89661fda..ce2cfd6583771691c2b60e7aacc32540bcf104ac 100644 (file)
@@ -11,5 +11,8 @@
   <on_reboot>restart</on_reboot>
   <on_crash>destroy</on_crash>
   <devices>
+    <video>
+      <model type='vmvga' vram='4096'/>
+    </video>
   </devices>
 </domain>
index 28c23028d54248eeaf4b920d7217a17fb23b061f..bc288a684c10e61183965f2ad8a4f03b815a6c02 100644 (file)
@@ -15,5 +15,8 @@
       <source path='/dev/parallel0'/>
       <target port='0'/>
     </parallel>
+    <video>
+      <model type='vmvga' vram='4096'/>
+    </video>
   </devices>
 </domain>
index 340cf4e30a3c708144db58b51f0752cdd1acdd6b..ad7a65fc25264ab747726b1efaaba4baea12e5db 100644 (file)
@@ -15,5 +15,8 @@
       <source path='[datastore] directory/parallel0.file'/>
       <target port='0'/>
     </parallel>
+    <video>
+      <model type='vmvga' vram='4096'/>
+    </video>
   </devices>
 </domain>
index 553783b62ee52a510211b428cfbc53ac2d78b4e2..8fa907b738bb2e71a70b3076b53987fa25145324 100644 (file)
@@ -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>
index 66e22ae04d2c3449fc8e66f26938ec4561d2495b..e5b89344e51aafe05b75838c7cb0c18e0c96fb1b 100644 (file)
@@ -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>
index c9f00ebfd329149f3e5612abf4b5e95e4de9f93a..51fd06f21bc06341ada82dbf9e5eca97c23f511c 100644 (file)
@@ -19,5 +19,8 @@
       <source path='/dev/ttyS0'/>
       <target type='serial' port='0'/>
     </console>
+    <video>
+      <model type='vmvga' vram='4096'/>
+    </video>
   </devices>
 </domain>
index 21b62639843a483f25f942b13292a1f45da4b9ee..25ade07264db327cffb567374797c999af6a07ab 100644 (file)
@@ -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>
index b0c071549c335ab26b620b14e7c00ecdb1a39fa0..7573a11dc7fa710f8169f651168ad25d6b35f338 100644 (file)
@@ -21,5 +21,8 @@
       <protocol type='raw'/>
       <target type='serial' port='0'/>
     </console>
+    <video>
+      <model type='vmvga' vram='4096'/>
+    </video>
   </devices>
 </domain>
index e15101714afb3292ffaf9fae35c341048a6c79b1..ed3849598ee43cdd7e810133eb0130e4e9dbcf87 100644 (file)
@@ -21,5 +21,8 @@
       <protocol type='telnets'/>
       <target type='serial' port='0'/>
     </console>
+    <video>
+      <model type='vmvga' vram='4096'/>
+    </video>
   </devices>
 </domain>
index cf8a797a7e0a1744eaac25fe9787f05b3757f9cb..ca5196c9a1a5e106d27366d8084a9a89d3b033e7 100644 (file)
@@ -19,5 +19,8 @@
       <source path='serial0.pipe'/>
       <target type='serial' port='0'/>
     </console>
+    <video>
+      <model type='vmvga' vram='4096'/>
+    </video>
   </devices>
 </domain>
index db130016ee85b6a7238d874ce64344221b1d63d9..d78ac6cc0aa6676adaa903a08a2cd297ce9d3d40 100644 (file)
@@ -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 (file)
index 0000000..081d6ce
--- /dev/null
@@ -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 (file)
index 0000000..664eba4
--- /dev/null
@@ -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>
index 9378db300feea2cf994ff14000213aba1e10ab89..5fed1c4b58956e57f143c2e5bcb862e73cf8fff9 100644 (file)
@@ -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;
index caab06a28cf8b7fcdb3000160405c7d21cd10e6e..493e0cc16fce2c702c00ac03ad80545756f9f91a 100644 (file)
@@ -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 (file)
index 0000000..4bd4870
--- /dev/null
@@ -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 (file)
index 0000000..b7db4c8
--- /dev/null
@@ -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>
index 6a39582d30a78fc5a18bc93f5c92d2bccdf3b0b9..a5fb4f7e6287184648707cc74bcacbae4915b03f 100644 (file)
@@ -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;