summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Baptiste Rouault <jean-baptiste.rouault@diateam.net>2012-02-23 10:34:45 +0100
committerMatthias Bolte <matthias.bolte@googlemail.com>2012-02-24 11:53:23 +0100
commitf246cdb5aca13ac9409b2ad43087e3078615ffcb (patch)
treeeafb1d9096de7cd202c0d0c2675c60cab582c3fb /tests/vmx2xmldata
parentvirterror: Misleading error message when name is missing (diff)
downloadlibvirt-f246cdb5aca13ac9409b2ad43087e3078615ffcb.tar.gz
libvirt-f246cdb5aca13ac9409b2ad43087e3078615ffcb.tar.bz2
libvirt-f246cdb5aca13ac9409b2ad43087e3078615ffcb.zip
vmx: Better Workstation vmx handling
This patch adds support for vmx files with empty networkName values (which is the case for vmx generated by Workstation). It also adds support for vmx containing NATed network interfaces. Update test suite accordingly
Diffstat (limited to 'tests/vmx2xmldata')
-rw-r--r--tests/vmx2xmldata/vmx2xml-ethernet-nat.vmx6
-rw-r--r--tests/vmx2xmldata/vmx2xml-ethernet-nat.xml21
-rw-r--r--tests/vmx2xmldata/vmx2xml-ws-in-the-wild-1.vmx52
-rw-r--r--tests/vmx2xmldata/vmx2xml-ws-in-the-wild-1.xml35
-rw-r--r--tests/vmx2xmldata/vmx2xml-ws-in-the-wild-2.vmx52
-rw-r--r--tests/vmx2xmldata/vmx2xml-ws-in-the-wild-2.xml36
6 files changed, 202 insertions, 0 deletions
diff --git a/tests/vmx2xmldata/vmx2xml-ethernet-nat.vmx b/tests/vmx2xmldata/vmx2xml-ethernet-nat.vmx
new file mode 100644
index 000000000..701c3851f
--- /dev/null
+++ b/tests/vmx2xmldata/vmx2xml-ethernet-nat.vmx
@@ -0,0 +1,6 @@
+config.version = "8"
+virtualHW.version = "4"
+ethernet0.present = "true"
+ethernet0.connectionType = "nat"
+ethernet0.addressType = "static"
+ethernet0.address = "00:50:56:11:22:33"
diff --git a/tests/vmx2xmldata/vmx2xml-ethernet-nat.xml b/tests/vmx2xmldata/vmx2xml-ethernet-nat.xml
new file mode 100644
index 000000000..8631049e8
--- /dev/null
+++ b/tests/vmx2xmldata/vmx2xml-ethernet-nat.xml
@@ -0,0 +1,21 @@
+<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>
+ <interface type='user'>
+ <mac address='00:50:56:11:22:33'/>
+ </interface>
+ <video>
+ <model type='vmvga' vram='4096'/>
+ </video>
+ </devices>
+</domain>
diff --git a/tests/vmx2xmldata/vmx2xml-ws-in-the-wild-1.vmx b/tests/vmx2xmldata/vmx2xml-ws-in-the-wild-1.vmx
new file mode 100644
index 000000000..a25f3de64
--- /dev/null
+++ b/tests/vmx2xmldata/vmx2xml-ws-in-the-wild-1.vmx
@@ -0,0 +1,52 @@
+.encoding = "UTF-8"
+config.version = "8"
+virtualHW.version = "8"
+virtualHW.productCompatibility = "hosted"
+displayName = "debian6"
+guestOS = "debian6-64"
+memsize = "512"
+numvcpus = "1"
+vcpu.hotadd = "TRUE"
+scsi0.present = "TRUE"
+scsi0.virtualDev = "lsilogic"
+scsi0:0.present = "TRUE"
+scsi0:0.fileName = "/data/vmware/disk.vmdk"
+ide1:0.present = "TRUE"
+ide1:0.fileName = "/usr/lib/vmware/isoimages/linux.iso"
+ide1:0.deviceType = "cdrom-image"
+floppy0.startConnected = "FALSE"
+floppy0.fileName = ""
+floppy0.autodetect = "TRUE"
+ethernet0.present = "TRUE"
+ethernet0.connectionType = "nat"
+ethernet0.virtualDev = "e1000"
+ethernet0.wakeOnPcktRcv = "FALSE"
+ethernet0.addressType = "static"
+ethernet0.address = "00:50:56:2F:D3:46"
+usb.present = "TRUE"
+usb.vbluetooth.startConnected = "TRUE"
+ehci.present = "TRUE"
+sound.present = "TRUE"
+sound.startConnected = "FALSE"
+sound.fileName = "-1"
+sound.autodetect = "TRUE"
+pciBridge0.present = "TRUE"
+pciBridge4.present = "TRUE"
+pciBridge4.virtualDev = "pcieRootPort"
+pciBridge4.functions = "8"
+pciBridge5.present = "TRUE"
+pciBridge5.virtualDev = "pcieRootPort"
+pciBridge5.functions = "8"
+pciBridge6.present = "TRUE"
+pciBridge6.virtualDev = "pcieRootPort"
+pciBridge6.functions = "8"
+pciBridge7.present = "TRUE"
+pciBridge7.virtualDev = "pcieRootPort"
+pciBridge7.functions = "8"
+vmci0.present = "TRUE"
+hpet0.present = "TRUE"
+powerType.powerOff = "hard"
+powerType.powerOn = "hard"
+powerType.suspend = "hard"
+powerType.reset = "hard"
+serial0.present = "FALSE"
diff --git a/tests/vmx2xmldata/vmx2xml-ws-in-the-wild-1.xml b/tests/vmx2xmldata/vmx2xml-ws-in-the-wild-1.xml
new file mode 100644
index 000000000..71bf9e88d
--- /dev/null
+++ b/tests/vmx2xmldata/vmx2xml-ws-in-the-wild-1.xml
@@ -0,0 +1,35 @@
+<domain type='vmware'>
+ <name>debian6</name>
+ <uuid>00000000-0000-0000-0000-000000000000</uuid>
+ <memory>524288</memory>
+ <currentMemory>524288</currentMemory>
+ <vcpu>1</vcpu>
+ <os>
+ <type arch='x86_64'>hvm</type>
+ </os>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>destroy</on_crash>
+ <devices>
+ <disk type='file' device='disk'>
+ <source file='/data/vmware/disk.vmdk'/>
+ <target dev='sda' bus='scsi'/>
+ <address type='drive' controller='0' bus='0' unit='0'/>
+ </disk>
+ <disk type='file' device='cdrom'>
+ <source file='/usr/lib/vmware/isoimages/linux.iso'/>
+ <target dev='hdc' bus='ide'/>
+ <address type='drive' controller='0' bus='1' unit='0'/>
+ </disk>
+ <controller type='scsi' index='0' model='lsilogic'/>
+ <controller type='ide' index='0'/>
+ <interface type='user'>
+ <mac address='00:50:56:2f:d3:46'/>
+ <model type='e1000'/>
+ </interface>
+ <video>
+ <model type='vmvga' vram='4096'/>
+ </video>
+ </devices>
+</domain>
diff --git a/tests/vmx2xmldata/vmx2xml-ws-in-the-wild-2.vmx b/tests/vmx2xmldata/vmx2xml-ws-in-the-wild-2.vmx
new file mode 100644
index 000000000..6e078d4d9
--- /dev/null
+++ b/tests/vmx2xmldata/vmx2xml-ws-in-the-wild-2.vmx
@@ -0,0 +1,52 @@
+.encoding = "UTF-8"
+config.version = "8"
+virtualHW.version = "8"
+virtualHW.productCompatibility = "hosted"
+displayName = "debian6"
+guestOS = "debian6-64"
+memsize = "512"
+numvcpus = "1"
+vcpu.hotadd = "TRUE"
+scsi0.present = "TRUE"
+scsi0.virtualDev = "lsilogic"
+scsi0:0.present = "TRUE"
+scsi0:0.fileName = "/data/vmware/disk.vmdk"
+ide1:0.present = "TRUE"
+ide1:0.fileName = "/usr/lib/vmware/isoimages/linux.iso"
+ide1:0.deviceType = "cdrom-image"
+floppy0.startConnected = "FALSE"
+floppy0.fileName = ""
+floppy0.autodetect = "TRUE"
+ethernet0.present = "TRUE"
+ethernet0.connectionType = "bridged"
+ethernet0.virtualDev = "e1000"
+ethernet0.wakeOnPcktRcv = "FALSE"
+ethernet0.addressType = "static"
+ethernet0.address = "00:50:56:2F:D3:46"
+usb.present = "TRUE"
+usb.vbluetooth.startConnected = "TRUE"
+ehci.present = "TRUE"
+sound.present = "TRUE"
+sound.startConnected = "FALSE"
+sound.fileName = "-1"
+sound.autodetect = "TRUE"
+pciBridge0.present = "TRUE"
+pciBridge4.present = "TRUE"
+pciBridge4.virtualDev = "pcieRootPort"
+pciBridge4.functions = "8"
+pciBridge5.present = "TRUE"
+pciBridge5.virtualDev = "pcieRootPort"
+pciBridge5.functions = "8"
+pciBridge6.present = "TRUE"
+pciBridge6.virtualDev = "pcieRootPort"
+pciBridge6.functions = "8"
+pciBridge7.present = "TRUE"
+pciBridge7.virtualDev = "pcieRootPort"
+pciBridge7.functions = "8"
+vmci0.present = "TRUE"
+hpet0.present = "TRUE"
+powerType.powerOff = "hard"
+powerType.powerOn = "hard"
+powerType.suspend = "hard"
+powerType.reset = "hard"
+serial0.present = "FALSE"
diff --git a/tests/vmx2xmldata/vmx2xml-ws-in-the-wild-2.xml b/tests/vmx2xmldata/vmx2xml-ws-in-the-wild-2.xml
new file mode 100644
index 000000000..d31020413
--- /dev/null
+++ b/tests/vmx2xmldata/vmx2xml-ws-in-the-wild-2.xml
@@ -0,0 +1,36 @@
+<domain type='vmware'>
+ <name>debian6</name>
+ <uuid>00000000-0000-0000-0000-000000000000</uuid>
+ <memory>524288</memory>
+ <currentMemory>524288</currentMemory>
+ <vcpu>1</vcpu>
+ <os>
+ <type arch='x86_64'>hvm</type>
+ </os>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>destroy</on_crash>
+ <devices>
+ <disk type='file' device='disk'>
+ <source file='/data/vmware/disk.vmdk'/>
+ <target dev='sda' bus='scsi'/>
+ <address type='drive' controller='0' bus='0' unit='0'/>
+ </disk>
+ <disk type='file' device='cdrom'>
+ <source file='/usr/lib/vmware/isoimages/linux.iso'/>
+ <target dev='hdc' bus='ide'/>
+ <address type='drive' controller='0' bus='1' unit='0'/>
+ </disk>
+ <controller type='scsi' index='0' model='lsilogic'/>
+ <controller type='ide' index='0'/>
+ <interface type='bridge'>
+ <mac address='00:50:56:2f:d3:46'/>
+ <source bridge=''/>
+ <model type='e1000'/>
+ </interface>
+ <video>
+ <model type='vmvga' vram='4096'/>
+ </video>
+ </devices>
+</domain>