[PATCH] Add test for transient disk support in VMX files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Wout Mertens <Wout.Mertens@xxxxxxxxx>

Adds test for transient disk translation in vmx files

---
 tests/vmx2xmldata/vmx2xml-harddisk-transient.vmx |    6 +++++
 tests/vmx2xmldata/vmx2xml-harddisk-transient.xml |   25 ++++++++++++++++++++++
 tests/vmx2xmltest.c                              |    1 +
 3 files changed, 32 insertions(+), 0 deletions(-)
 create mode 100644 tests/vmx2xmldata/vmx2xml-harddisk-transient.vmx
 create mode 100644 tests/vmx2xmldata/vmx2xml-harddisk-transient.xml

diff --git a/tests/vmx2xmldata/vmx2xml-harddisk-transient.vmx b/tests/vmx2xmldata/vmx2xml-harddisk-transient.vmx
new file mode 100644
index 0000000..68ef382
--- /dev/null
+++ b/tests/vmx2xmldata/vmx2xml-harddisk-transient.vmx
@@ -0,0 +1,6 @@
+config.version = "8"
+virtualHW.version = "4"
+ide0:0.present = "true"
+ide0:0.deviceType = "ata-hardDisk"
+ide0:0.fileName = "harddisk.vmdk"
+ide0:0.mode = "independent-nonpersistent"
diff --git a/tests/vmx2xmldata/vmx2xml-harddisk-transient.xml b/tests/vmx2xmldata/vmx2xml-harddisk-transient.xml
new file mode 100644
index 0000000..3786e2f
--- /dev/null
+++ b/tests/vmx2xmldata/vmx2xml-harddisk-transient.xml
@@ -0,0 +1,25 @@
+<domain type='vmware'>
+  <uuid>00000000-0000-0000-0000-000000000000</uuid>
+  <memory unit='KiB'>32768</memory>
+  <currentMemory unit='KiB'>32768</currentMemory>
+  <vcpu placement='static'>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>
+    <disk type='file' device='disk'>
+      <source file='[datastore] directory/harddisk.vmdk'/>
+      <target dev='hda' bus='ide'/>
+      <transient/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <controller type='ide' index='0'/>
+    <video>
+      <model type='vmvga' vram='4096'/>
+    </video>
+  </devices>
+</domain>
diff --git a/tests/vmx2xmltest.c b/tests/vmx2xmltest.c
index 13515f0..70178f7 100644
--- a/tests/vmx2xmltest.c
+++ b/tests/vmx2xmltest.c
@@ -221,6 +221,7 @@ mymain(void)
 
     DO_TEST("harddisk-scsi-file", "harddisk-scsi-file");
     DO_TEST("harddisk-ide-file", "harddisk-ide-file");
+    DO_TEST("harddisk-transient", "harddisk-transient");
 
     DO_TEST("cdrom-scsi-file", "cdrom-scsi-file");
     DO_TEST("cdrom-scsi-device", "cdrom-scsi-device");
-- 
1.7.1


--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]