[PATCH 18/21] tests: vmx: Make paths in test files conform with the XML schema

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

 



The vmx tests use fake paths for files which in some cases didn't start
with a /. Since libvirt's schema mandates full paths and the
representation used in the tests is only internal to the tests we'll add
a leading / to the paths to conform to the schema.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 tests/vmx2xmldata/vmx2xml-case-insensitive-1.xml   | 2 +-
 tests/vmx2xmldata/vmx2xml-case-insensitive-2.xml   | 2 +-
 tests/vmx2xmldata/vmx2xml-cdrom-ide-file.xml       | 2 +-
 tests/vmx2xmldata/vmx2xml-cdrom-scsi-file.xml      | 2 +-
 tests/vmx2xmldata/vmx2xml-esx-in-the-wild-1.xml    | 2 +-
 tests/vmx2xmldata/vmx2xml-esx-in-the-wild-2.xml    | 6 +++---
 tests/vmx2xmldata/vmx2xml-esx-in-the-wild-3.xml    | 6 +++---
 tests/vmx2xmldata/vmx2xml-esx-in-the-wild-4.xml    | 8 ++++----
 tests/vmx2xmldata/vmx2xml-esx-in-the-wild-5.xml    | 4 ++--
 tests/vmx2xmldata/vmx2xml-esx-in-the-wild-6.xml    | 2 +-
 tests/vmx2xmldata/vmx2xml-esx-in-the-wild-7.xml    | 2 +-
 tests/vmx2xmldata/vmx2xml-esx-in-the-wild-8.xml    | 6 +++---
 tests/vmx2xmldata/vmx2xml-esx-in-the-wild-9.xml    | 2 +-
 tests/vmx2xmldata/vmx2xml-floppy-file.xml          | 4 ++--
 tests/vmx2xmldata/vmx2xml-fusion-in-the-wild-1.xml | 2 +-
 tests/vmx2xmldata/vmx2xml-gsx-in-the-wild-1.xml    | 2 +-
 tests/vmx2xmldata/vmx2xml-gsx-in-the-wild-2.xml    | 2 +-
 tests/vmx2xmldata/vmx2xml-gsx-in-the-wild-3.xml    | 2 +-
 tests/vmx2xmldata/vmx2xml-gsx-in-the-wild-4.xml    | 2 +-
 tests/vmx2xmldata/vmx2xml-harddisk-ide-file.xml    | 2 +-
 tests/vmx2xmldata/vmx2xml-harddisk-scsi-file.xml   | 2 +-
 tests/vmx2xmldata/vmx2xml-harddisk-transient.xml   | 2 +-
 tests/vmx2xmldata/vmx2xml-parallel-file.xml        | 2 +-
 tests/vmx2xmldata/vmx2xml-scsi-driver.xml          | 8 ++++----
 tests/vmx2xmldata/vmx2xml-scsi-writethrough.xml    | 2 +-
 tests/vmx2xmldata/vmx2xml-serial-file.xml          | 4 ++--
 tests/vmx2xmltest.c                                | 4 ++--
 tests/xml2vmxdata/xml2vmx-cdrom-ide-file.xml       | 2 +-
 tests/xml2vmxdata/xml2vmx-cdrom-scsi-file.xml      | 2 +-
 tests/xml2vmxdata/xml2vmx-esx-in-the-wild-1.xml    | 2 +-
 tests/xml2vmxdata/xml2vmx-esx-in-the-wild-2.xml    | 6 +++---
 tests/xml2vmxdata/xml2vmx-esx-in-the-wild-3.xml    | 6 +++---
 tests/xml2vmxdata/xml2vmx-esx-in-the-wild-4.xml    | 8 ++++----
 tests/xml2vmxdata/xml2vmx-esx-in-the-wild-5.xml    | 4 ++--
 tests/xml2vmxdata/xml2vmx-esx-in-the-wild-6.xml    | 2 +-
 tests/xml2vmxdata/xml2vmx-esx-in-the-wild-7.xml    | 2 +-
 tests/xml2vmxdata/xml2vmx-esx-in-the-wild-9.xml    | 2 +-
 tests/xml2vmxdata/xml2vmx-floppy-file.xml          | 4 ++--
 tests/xml2vmxdata/xml2vmx-fusion-in-the-wild-1.xml | 2 +-
 tests/xml2vmxdata/xml2vmx-gsx-in-the-wild-1.xml    | 2 +-
 tests/xml2vmxdata/xml2vmx-gsx-in-the-wild-2.xml    | 2 +-
 tests/xml2vmxdata/xml2vmx-gsx-in-the-wild-3.xml    | 2 +-
 tests/xml2vmxdata/xml2vmx-gsx-in-the-wild-4.xml    | 2 +-
 tests/xml2vmxdata/xml2vmx-harddisk-ide-file.xml    | 2 +-
 tests/xml2vmxdata/xml2vmx-harddisk-scsi-file.xml   | 2 +-
 tests/xml2vmxdata/xml2vmx-parallel-file.xml        | 2 +-
 tests/xml2vmxdata/xml2vmx-scsi-driver.xml          | 8 ++++----
 tests/xml2vmxdata/xml2vmx-scsi-writethrough.xml    | 2 +-
 tests/xml2vmxdata/xml2vmx-serial-file.xml          | 2 +-
 tests/xml2vmxtest.c                                | 4 ++--
 50 files changed, 79 insertions(+), 79 deletions(-)

diff --git a/tests/vmx2xmldata/vmx2xml-case-insensitive-1.xml b/tests/vmx2xmldata/vmx2xml-case-insensitive-1.xml
index 7cb6413941..97fa300c18 100644
--- a/tests/vmx2xmldata/vmx2xml-case-insensitive-1.xml
+++ b/tests/vmx2xmldata/vmx2xml-case-insensitive-1.xml
@@ -16,7 +16,7 @@
   <on_crash>destroy</on_crash>
   <devices>
     <disk type='file' device='disk'>
-      <source file='[datastore] directory/FEDORA11.VMDK'/>
+      <source file='/[datastore] directory/FEDORA11.VMDK'/>
       <target dev='sda' bus='scsi'/>
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
diff --git a/tests/vmx2xmldata/vmx2xml-case-insensitive-2.xml b/tests/vmx2xmldata/vmx2xml-case-insensitive-2.xml
index 188c3f3cd5..499eb1ec38 100644
--- a/tests/vmx2xmldata/vmx2xml-case-insensitive-2.xml
+++ b/tests/vmx2xmldata/vmx2xml-case-insensitive-2.xml
@@ -16,7 +16,7 @@
   <on_crash>destroy</on_crash>
   <devices>
     <disk type='file' device='disk'>
-      <source file='[datastore] directory/fedora11.vmdk'/>
+      <source file='/[datastore] directory/fedora11.vmdk'/>
       <target dev='sda' bus='scsi'/>
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
diff --git a/tests/vmx2xmldata/vmx2xml-cdrom-ide-file.xml b/tests/vmx2xmldata/vmx2xml-cdrom-ide-file.xml
index 7ca8ff729a..a85cb42dce 100644
--- a/tests/vmx2xmldata/vmx2xml-cdrom-ide-file.xml
+++ b/tests/vmx2xmldata/vmx2xml-cdrom-ide-file.xml
@@ -12,7 +12,7 @@
   <on_crash>destroy</on_crash>
   <devices>
     <disk type='file' device='cdrom'>
-      <source file='[datastore] directory/cdrom.iso'/>
+      <source file='/[datastore] directory/cdrom.iso'/>
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
diff --git a/tests/vmx2xmldata/vmx2xml-cdrom-scsi-file.xml b/tests/vmx2xmldata/vmx2xml-cdrom-scsi-file.xml
index 5765232bc1..29111fb7b6 100644
--- a/tests/vmx2xmldata/vmx2xml-cdrom-scsi-file.xml
+++ b/tests/vmx2xmldata/vmx2xml-cdrom-scsi-file.xml
@@ -12,7 +12,7 @@
   <on_crash>destroy</on_crash>
   <devices>
     <disk type='file' device='cdrom'>
-      <source file='[datastore] directory/cdrom.iso'/>
+      <source file='/[datastore] directory/cdrom.iso'/>
       <target dev='sda' bus='scsi'/>
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
diff --git a/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-1.xml b/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-1.xml
index c15275ccb9..9970cb6e8a 100644
--- a/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-1.xml
+++ b/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-1.xml
@@ -16,7 +16,7 @@
   <on_crash>destroy</on_crash>
   <devices>
     <disk type='file' device='disk'>
-      <source file='[datastore] directory/Fedora11.vmdk'/>
+      <source file='/[datastore] directory/Fedora11.vmdk'/>
       <target dev='sda' bus='scsi'/>
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
diff --git a/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-2.xml b/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-2.xml
index b079808363..0422c401f8 100644
--- a/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-2.xml
+++ b/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-2.xml
@@ -14,12 +14,12 @@
   <devices>
     <disk type='file' device='disk'>
       <driver cache='writethrough'/>
-      <source file='[datastore] directory/Debian1.vmdk'/>
+      <source file='/[datastore] directory/Debian1.vmdk'/>
       <target dev='sda' bus='scsi'/>
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
     <disk type='file' device='cdrom'>
-      <source file='[datastore] directory/Debian1-cdrom.iso'/>
+      <source file='/[datastore] directory/Debian1-cdrom.iso'/>
       <target dev='sdp' bus='scsi'/>
       <address type='drive' controller='1' bus='0' target='0' unit='0'/>
     </disk>
@@ -34,7 +34,7 @@
       <address type='drive' controller='0' bus='0' target='0' unit='1'/>
     </disk>
     <disk type='file' device='disk'>
-      <source file='[datastore] directory/Debian1-IDE.vmdk'/>
+      <source file='/[datastore] directory/Debian1-IDE.vmdk'/>
       <target dev='hdd' bus='ide'/>
       <address type='drive' controller='0' bus='1' target='0' unit='1'/>
     </disk>
diff --git a/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-3.xml b/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-3.xml
index d05318c7d8..881d0c2970 100644
--- a/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-3.xml
+++ b/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-3.xml
@@ -13,17 +13,17 @@
   <on_crash>destroy</on_crash>
   <devices>
     <disk type='file' device='disk'>
-      <source file='[datastore] directory/Debian2.vmdk'/>
+      <source file='/[datastore] directory/Debian2.vmdk'/>
       <target dev='sda' bus='scsi'/>
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
     <disk type='file' device='cdrom'>
-      <source file='[498076b2-02796c1a-ef5b-000ae484a6a3] Isos/debian-testing-amd64-netinst.iso'/>
+      <source file='/[498076b2-02796c1a-ef5b-000ae484a6a3] Isos/debian-testing-amd64-netinst.iso'/>
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
     <disk type='file' device='floppy'>
-      <source file='[498076b2-02796c1a-ef5b-000ae484a6a3] Debian2/dummy.flp'/>
+      <source file='/[498076b2-02796c1a-ef5b-000ae484a6a3] Debian2/dummy.flp'/>
       <target dev='fdb' bus='fdc'/>
       <address type='drive' controller='0' bus='0' target='0' unit='1'/>
     </disk>
diff --git a/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-4.xml b/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-4.xml
index a8a2ac6f97..0a67ba9ed1 100644
--- a/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-4.xml
+++ b/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-4.xml
@@ -16,7 +16,7 @@
   <on_crash>destroy</on_crash>
   <devices>
     <disk type='file' device='disk'>
-      <source file='[datastore] directory/virtMonServ1.vmdk'/>
+      <source file='/[datastore] directory/virtMonServ1.vmdk'/>
       <target dev='sda' bus='scsi'/>
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
@@ -30,15 +30,15 @@
       <source bridge='VM Switch 2'/>
     </interface>
     <serial type='file'>
-      <source path='[498076b2-02796c1a-ef5b-000ae484a6a3] virtMonServ1/serial1.file'/>
+      <source path='/[498076b2-02796c1a-ef5b-000ae484a6a3] virtMonServ1/serial1.file'/>
       <target port='0'/>
     </serial>
     <parallel type='file'>
-      <source path='[498076b2-02796c1a-ef5b-000ae484a6a3] virtMonServ1/parallel1.file'/>
+      <source path='/[498076b2-02796c1a-ef5b-000ae484a6a3] virtMonServ1/parallel1.file'/>
       <target port='0'/>
     </parallel>
     <console type='file'>
-      <source path='[498076b2-02796c1a-ef5b-000ae484a6a3] virtMonServ1/serial1.file'/>
+      <source path='/[498076b2-02796c1a-ef5b-000ae484a6a3] virtMonServ1/serial1.file'/>
       <target type='serial' port='0'/>
     </console>
     <video>
diff --git a/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-5.xml b/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-5.xml
index 82643e9ffe..a79d6a33bf 100644
--- a/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-5.xml
+++ b/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-5.xml
@@ -20,12 +20,12 @@
   <on_crash>destroy</on_crash>
   <devices>
     <disk type='file' device='disk'>
-      <source file='[datastore] directory/vmtest-000001.vmdk'/>
+      <source file='/[datastore] directory/vmtest-000001.vmdk'/>
       <target dev='sda' bus='scsi'/>
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
     <disk type='file' device='cdrom'>
-      <source file='[4af0231d-1eff559a-6369-0024e84773b6] isos/CentOS-5.5-x86_64-bin-DVD-1of2.iso'/>
+      <source file='/[4af0231d-1eff559a-6369-0024e84773b6] isos/CentOS-5.5-x86_64-bin-DVD-1of2.iso'/>
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
diff --git a/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-6.xml b/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-6.xml
index 913bfedf30..8c10c80931 100644
--- a/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-6.xml
+++ b/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-6.xml
@@ -13,7 +13,7 @@
   <on_crash>destroy</on_crash>
   <devices>
     <disk type='file' device='disk'>
-      <source file='[datastore] directory/el6-test-000001.vmdk'/>
+      <source file='/[datastore] directory/el6-test-000001.vmdk'/>
       <target dev='sda' bus='scsi'/>
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
diff --git a/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-7.xml b/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-7.xml
index 91913a2918..1e01608b54 100644
--- a/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-7.xml
+++ b/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-7.xml
@@ -13,7 +13,7 @@
   <on_crash>destroy</on_crash>
   <devices>
     <disk type='file' device='disk'>
-      <source file='[datastore] directory/esx-rhel6-mini.vmdk'/>
+      <source file='/[datastore] directory/esx-rhel6-mini.vmdk'/>
       <target dev='sda' bus='scsi'/>
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
diff --git a/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-8.xml b/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-8.xml
index 8276457bb3..70e94b4da8 100644
--- a/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-8.xml
+++ b/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-8.xml
@@ -19,18 +19,18 @@
   <on_crash>destroy</on_crash>
   <devices>
     <disk type='file' device='disk'>
-      <source file='[datastore] directory/RHEL7_6.vmdk'/>
+      <source file='/[datastore] directory/RHEL7_6.vmdk'/>
       <target dev='sda' bus='scsi'/>
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
     <disk type='file' device='disk'>
-      <source file='[datastore] directory/RHEL7_6_1.vmdk'/>
+      <source file='/[datastore] directory/RHEL7_6_1.vmdk'/>
       <target dev='sdb' bus='scsi'/>
       <transient/>
       <address type='drive' controller='0' bus='0' target='0' unit='1'/>
     </disk>
     <disk type='file' device='disk'>
-      <source file='[5669422e-699d77db-c144-00e0815e303e] block4/block4.vmdk'/>
+      <source file='/[5669422e-699d77db-c144-00e0815e303e] block4/block4.vmdk'/>
       <target dev='sdc' bus='scsi'/>
       <address type='drive' controller='0' bus='0' target='0' unit='2'/>
     </disk>
diff --git a/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-9.xml b/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-9.xml
index 66eca400dd..56f079d275 100644
--- a/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-9.xml
+++ b/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-9.xml
@@ -20,7 +20,7 @@
   <on_crash>destroy</on_crash>
   <devices>
     <disk type='file' device='disk'>
-      <source file='[datastore] directory/v2v-windows-kkulkarn.vmdk'/>
+      <source file='/[datastore] directory/v2v-windows-kkulkarn.vmdk'/>
       <target dev='sda' bus='scsi'/>
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
diff --git a/tests/vmx2xmldata/vmx2xml-floppy-file.xml b/tests/vmx2xmldata/vmx2xml-floppy-file.xml
index 6699f15602..aaf1f85881 100644
--- a/tests/vmx2xmldata/vmx2xml-floppy-file.xml
+++ b/tests/vmx2xmldata/vmx2xml-floppy-file.xml
@@ -12,12 +12,12 @@
   <on_crash>destroy</on_crash>
   <devices>
     <disk type='file' device='floppy'>
-      <source file='[datastore] directory/floppy.flp'/>
+      <source file='/[datastore] directory/floppy.flp'/>
       <target dev='fda' bus='fdc'/>
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
     <disk type='file' device='floppy'>
-      <source file='[datastore] directory/floppy'/>
+      <source file='/[datastore] directory/floppy'/>
       <target dev='fdb' bus='fdc'/>
       <address type='drive' controller='0' bus='0' target='0' unit='1'/>
     </disk>
diff --git a/tests/vmx2xmldata/vmx2xml-fusion-in-the-wild-1.xml b/tests/vmx2xmldata/vmx2xml-fusion-in-the-wild-1.xml
index 2dd46eb2b1..8a36b9a317 100644
--- a/tests/vmx2xmldata/vmx2xml-fusion-in-the-wild-1.xml
+++ b/tests/vmx2xmldata/vmx2xml-fusion-in-the-wild-1.xml
@@ -13,7 +13,7 @@
   <on_crash>destroy</on_crash>
   <devices>
     <disk type='file' device='disk'>
-      <source file='[datastore] directory/ATTM_VM.vmdk'/>
+      <source file='/[datastore] directory/ATTM_VM.vmdk'/>
       <target dev='sda' bus='scsi'/>
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
diff --git a/tests/vmx2xmldata/vmx2xml-gsx-in-the-wild-1.xml b/tests/vmx2xmldata/vmx2xml-gsx-in-the-wild-1.xml
index 62ec191c82..3a4ccd4e55 100644
--- a/tests/vmx2xmldata/vmx2xml-gsx-in-the-wild-1.xml
+++ b/tests/vmx2xmldata/vmx2xml-gsx-in-the-wild-1.xml
@@ -13,7 +13,7 @@
   <on_crash>destroy</on_crash>
   <devices>
     <disk type='file' device='disk'>
-      <source file='[datastore] directory/Debian-System1-0-cl2.vmdk'/>
+      <source file='/[datastore] directory/Debian-System1-0-cl2.vmdk'/>
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
diff --git a/tests/vmx2xmldata/vmx2xml-gsx-in-the-wild-2.xml b/tests/vmx2xmldata/vmx2xml-gsx-in-the-wild-2.xml
index 906e4657ca..9b504c9dee 100644
--- a/tests/vmx2xmldata/vmx2xml-gsx-in-the-wild-2.xml
+++ b/tests/vmx2xmldata/vmx2xml-gsx-in-the-wild-2.xml
@@ -13,7 +13,7 @@
   <on_crash>destroy</on_crash>
   <devices>
     <disk type='file' device='disk'>
-      <source file='[datastore] directory/Debian-System1-0-cl3.vmdk'/>
+      <source file='/[datastore] directory/Debian-System1-0-cl3.vmdk'/>
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
diff --git a/tests/vmx2xmldata/vmx2xml-gsx-in-the-wild-3.xml b/tests/vmx2xmldata/vmx2xml-gsx-in-the-wild-3.xml
index 61812851e1..f6a0690449 100644
--- a/tests/vmx2xmldata/vmx2xml-gsx-in-the-wild-3.xml
+++ b/tests/vmx2xmldata/vmx2xml-gsx-in-the-wild-3.xml
@@ -13,7 +13,7 @@
   <on_crash>destroy</on_crash>
   <devices>
     <disk type='file' device='disk'>
-      <source file='[datastore] directory/Debian-System1-0-cl1.vmdk'/>
+      <source file='/[datastore] directory/Debian-System1-0-cl1.vmdk'/>
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
diff --git a/tests/vmx2xmldata/vmx2xml-gsx-in-the-wild-4.xml b/tests/vmx2xmldata/vmx2xml-gsx-in-the-wild-4.xml
index a65a7d137f..7aec2a1011 100644
--- a/tests/vmx2xmldata/vmx2xml-gsx-in-the-wild-4.xml
+++ b/tests/vmx2xmldata/vmx2xml-gsx-in-the-wild-4.xml
@@ -13,7 +13,7 @@
   <on_crash>destroy</on_crash>
   <devices>
     <disk type='file' device='disk'>
-      <source file='[datastore] directory/Debian-System1-0-cl2.vmdk'/>
+      <source file='/[datastore] directory/Debian-System1-0-cl2.vmdk'/>
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
diff --git a/tests/vmx2xmldata/vmx2xml-harddisk-ide-file.xml b/tests/vmx2xmldata/vmx2xml-harddisk-ide-file.xml
index d452e6ed99..56bcaca512 100644
--- a/tests/vmx2xmldata/vmx2xml-harddisk-ide-file.xml
+++ b/tests/vmx2xmldata/vmx2xml-harddisk-ide-file.xml
@@ -12,7 +12,7 @@
   <on_crash>destroy</on_crash>
   <devices>
     <disk type='file' device='disk'>
-      <source file='[datastore] directory/harddisk.vmdk'/>
+      <source file='/[datastore] directory/harddisk.vmdk'/>
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
diff --git a/tests/vmx2xmldata/vmx2xml-harddisk-scsi-file.xml b/tests/vmx2xmldata/vmx2xml-harddisk-scsi-file.xml
index 64b89c6530..d08e233757 100644
--- a/tests/vmx2xmldata/vmx2xml-harddisk-scsi-file.xml
+++ b/tests/vmx2xmldata/vmx2xml-harddisk-scsi-file.xml
@@ -12,7 +12,7 @@
   <on_crash>destroy</on_crash>
   <devices>
     <disk type='file' device='disk'>
-      <source file='[datastore] directory/harddisk.vmdk'/>
+      <source file='/[datastore] directory/harddisk.vmdk'/>
       <target dev='sda' bus='scsi'/>
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
diff --git a/tests/vmx2xmldata/vmx2xml-harddisk-transient.xml b/tests/vmx2xmldata/vmx2xml-harddisk-transient.xml
index f61fb21773..7066b2309a 100644
--- a/tests/vmx2xmldata/vmx2xml-harddisk-transient.xml
+++ b/tests/vmx2xmldata/vmx2xml-harddisk-transient.xml
@@ -12,7 +12,7 @@
   <on_crash>destroy</on_crash>
   <devices>
     <disk type='file' device='disk'>
-      <source file='[datastore] directory/harddisk.vmdk'/>
+      <source file='/[datastore] directory/harddisk.vmdk'/>
       <target dev='hda' bus='ide'/>
       <transient/>
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
diff --git a/tests/vmx2xmldata/vmx2xml-parallel-file.xml b/tests/vmx2xmldata/vmx2xml-parallel-file.xml
index d7ec0cf1a2..037e6aebf1 100644
--- a/tests/vmx2xmldata/vmx2xml-parallel-file.xml
+++ b/tests/vmx2xmldata/vmx2xml-parallel-file.xml
@@ -12,7 +12,7 @@
   <on_crash>destroy</on_crash>
   <devices>
     <parallel type='file'>
-      <source path='[datastore] directory/parallel0.file'/>
+      <source path='/[datastore] directory/parallel0.file'/>
       <target port='0'/>
     </parallel>
     <video>
diff --git a/tests/vmx2xmldata/vmx2xml-scsi-driver.xml b/tests/vmx2xmldata/vmx2xml-scsi-driver.xml
index 1a057df428..fa1cd5d84d 100644
--- a/tests/vmx2xmldata/vmx2xml-scsi-driver.xml
+++ b/tests/vmx2xmldata/vmx2xml-scsi-driver.xml
@@ -12,22 +12,22 @@
   <on_crash>destroy</on_crash>
   <devices>
     <disk type='file' device='disk'>
-      <source file='[datastore] directory/harddisk1.vmdk'/>
+      <source file='/[datastore] directory/harddisk1.vmdk'/>
       <target dev='sda' bus='scsi'/>
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
     <disk type='file' device='disk'>
-      <source file='[datastore] directory/harddisk2.vmdk'/>
+      <source file='/[datastore] directory/harddisk2.vmdk'/>
       <target dev='sdp' bus='scsi'/>
       <address type='drive' controller='1' bus='0' target='0' unit='0'/>
     </disk>
     <disk type='file' device='disk'>
-      <source file='[datastore] directory/harddisk3.vmdk'/>
+      <source file='/[datastore] directory/harddisk3.vmdk'/>
       <target dev='sdae' bus='scsi'/>
       <address type='drive' controller='2' bus='0' target='0' unit='0'/>
     </disk>
     <disk type='file' device='disk'>
-      <source file='[datastore] directory/harddisk4.vmdk'/>
+      <source file='/[datastore] directory/harddisk4.vmdk'/>
       <target dev='sdat' bus='scsi'/>
       <address type='drive' controller='3' bus='0' target='0' unit='0'/>
     </disk>
diff --git a/tests/vmx2xmldata/vmx2xml-scsi-writethrough.xml b/tests/vmx2xmldata/vmx2xml-scsi-writethrough.xml
index 95accb104e..188748e8e2 100644
--- a/tests/vmx2xmldata/vmx2xml-scsi-writethrough.xml
+++ b/tests/vmx2xmldata/vmx2xml-scsi-writethrough.xml
@@ -13,7 +13,7 @@
   <devices>
     <disk type='file' device='disk'>
       <driver cache='writethrough'/>
-      <source file='[datastore] directory/harddisk.vmdk'/>
+      <source file='/[datastore] directory/harddisk.vmdk'/>
       <target dev='sda' bus='scsi'/>
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
diff --git a/tests/vmx2xmldata/vmx2xml-serial-file.xml b/tests/vmx2xmldata/vmx2xml-serial-file.xml
index 84618c321c..5e08e7ffe6 100644
--- a/tests/vmx2xmldata/vmx2xml-serial-file.xml
+++ b/tests/vmx2xmldata/vmx2xml-serial-file.xml
@@ -12,11 +12,11 @@
   <on_crash>destroy</on_crash>
   <devices>
     <serial type='file'>
-      <source path='[datastore] directory/serial0.file'/>
+      <source path='/[datastore] directory/serial0.file'/>
       <target port='0'/>
     </serial>
     <console type='file'>
-      <source path='[datastore] directory/serial0.file'/>
+      <source path='/[datastore] directory/serial0.file'/>
       <target type='serial' port='0'/>
     </console>
     <video>
diff --git a/tests/vmx2xmltest.c b/tests/vmx2xmltest.c
index 1966aed6fe..f06e74ebcc 100644
--- a/tests/vmx2xmltest.c
+++ b/tests/vmx2xmltest.c
@@ -148,7 +148,7 @@ testParseVMXFileName(const char *fileName, void *opaque G_GNUC_UNUSED)
             goto cleanup;
         }

-        src = g_strdup_printf("[%s] %s", datastoreName, directoryAndFileName);
+        src = g_strdup_printf("/[%s] %s", datastoreName, directoryAndFileName);
     } else if (STRPREFIX(fileName, "/")) {
         /* Found absolute path referencing a file outside a datastore */
         src = g_strdup(fileName);
@@ -157,7 +157,7 @@ testParseVMXFileName(const char *fileName, void *opaque G_GNUC_UNUSED)
         src = NULL;
     } else {
         /* Found single file name referencing a file inside a datastore */
-        src = g_strdup_printf("[datastore] directory/%s", fileName);
+        src = g_strdup_printf("/[datastore] directory/%s", fileName);
     }

  cleanup:
diff --git a/tests/xml2vmxdata/xml2vmx-cdrom-ide-file.xml b/tests/xml2vmxdata/xml2vmx-cdrom-ide-file.xml
index 0ea16501ae..331ee64dc4 100644
--- a/tests/xml2vmxdata/xml2vmx-cdrom-ide-file.xml
+++ b/tests/xml2vmxdata/xml2vmx-cdrom-ide-file.xml
@@ -7,7 +7,7 @@
   </os>
   <devices>
     <disk type='file' device='cdrom'>
-      <source file='[testing] isos/cdrom.iso'/>
+      <source file='/[testing] isos/cdrom.iso'/>
       <target dev='hda' bus='ide'/>
     </disk>
   </devices>
diff --git a/tests/xml2vmxdata/xml2vmx-cdrom-scsi-file.xml b/tests/xml2vmxdata/xml2vmx-cdrom-scsi-file.xml
index 82d2d7ae92..480326eefa 100644
--- a/tests/xml2vmxdata/xml2vmx-cdrom-scsi-file.xml
+++ b/tests/xml2vmxdata/xml2vmx-cdrom-scsi-file.xml
@@ -7,7 +7,7 @@
   </os>
   <devices>
     <disk type='file' device='cdrom'>
-      <source file='[testing] isos/cdrom.iso'/>
+      <source file='/[testing] isos/cdrom.iso'/>
       <target dev='sda' bus='scsi'/>
     </disk>
   </devices>
diff --git a/tests/xml2vmxdata/xml2vmx-esx-in-the-wild-1.xml b/tests/xml2vmxdata/xml2vmx-esx-in-the-wild-1.xml
index 0c7dfccb0d..2229ac8c3d 100644
--- a/tests/xml2vmxdata/xml2vmx-esx-in-the-wild-1.xml
+++ b/tests/xml2vmxdata/xml2vmx-esx-in-the-wild-1.xml
@@ -17,7 +17,7 @@
   <devices>
     <disk type='file' device='disk'>
       <driver name='lsilogic'/>
-      <source file='[498076b2-02796c1a-ef5b-000ae484a6a3] Fedora11/Fedora11.vmdk'/>
+      <source file='/[498076b2-02796c1a-ef5b-000ae484a6a3] Fedora11/Fedora11.vmdk'/>
       <target dev='sda' bus='scsi'/>
     </disk>
     <interface type='bridge'>
diff --git a/tests/xml2vmxdata/xml2vmx-esx-in-the-wild-2.xml b/tests/xml2vmxdata/xml2vmx-esx-in-the-wild-2.xml
index affb5cf046..62f0480203 100644
--- a/tests/xml2vmxdata/xml2vmx-esx-in-the-wild-2.xml
+++ b/tests/xml2vmxdata/xml2vmx-esx-in-the-wild-2.xml
@@ -14,12 +14,12 @@
   <devices>
     <disk type='file' device='disk'>
       <driver name='lsilogic' cache='writethrough'/>
-      <source file='[498076b2-02796c1a-ef5b-000ae484a6a3] virtDebian1/Debian1.vmdk'/>
+      <source file='/[498076b2-02796c1a-ef5b-000ae484a6a3] virtDebian1/Debian1.vmdk'/>
       <target dev='sda' bus='scsi'/>
     </disk>
     <disk type='file' device='cdrom'>
       <driver name='buslogic'/>
-      <source file='[498076b2-02796c1a-ef5b-000ae484a6a3] virtDebian1/Debian1-cdrom.iso'/>
+      <source file='/[498076b2-02796c1a-ef5b-000ae484a6a3] virtDebian1/Debian1-cdrom.iso'/>
       <target dev='sdp' bus='scsi'/>
     </disk>
     <disk type='file' device='cdrom'>
@@ -31,7 +31,7 @@
       <target dev='hdb' bus='ide'/>
     </disk>
     <disk type='file' device='disk'>
-      <source file='[498076b2-02796c1a-ef5b-000ae484a6a3] virtDebian1/Debian1-IDE.vmdk'/>
+      <source file='/[498076b2-02796c1a-ef5b-000ae484a6a3] virtDebian1/Debian1-IDE.vmdk'/>
       <target dev='hdd' bus='ide'/>
     </disk>
     <disk type='block' device='floppy'>
diff --git a/tests/xml2vmxdata/xml2vmx-esx-in-the-wild-3.xml b/tests/xml2vmxdata/xml2vmx-esx-in-the-wild-3.xml
index 4d24e0da92..6583bc6fb7 100644
--- a/tests/xml2vmxdata/xml2vmx-esx-in-the-wild-3.xml
+++ b/tests/xml2vmxdata/xml2vmx-esx-in-the-wild-3.xml
@@ -14,15 +14,15 @@
   <devices>
     <disk type='file' device='disk'>
       <driver name='lsilogic'/>
-      <source file='[498076b2-02796c1a-ef5b-000ae484a6a3] Debian2/Debian2.vmdk'/>
+      <source file='/[498076b2-02796c1a-ef5b-000ae484a6a3] Debian2/Debian2.vmdk'/>
       <target dev='sda' bus='scsi'/>
     </disk>
     <disk type='file' device='cdrom'>
-      <source file='[498076b2-02796c1a-ef5b-000ae484a6a3] Isos/debian-testing-amd64-netinst.iso'/>
+      <source file='/[498076b2-02796c1a-ef5b-000ae484a6a3] Isos/debian-testing-amd64-netinst.iso'/>
       <target dev='hda' bus='ide'/>
     </disk>
     <disk type='file' device='floppy'>
-      <source file='[498076b2-02796c1a-ef5b-000ae484a6a3] Debian2/dummy.flp'/>
+      <source file='/[498076b2-02796c1a-ef5b-000ae484a6a3] Debian2/dummy.flp'/>
       <target dev='fdb' bus='fdc'/>
     </disk>
     <interface type='bridge'>
diff --git a/tests/xml2vmxdata/xml2vmx-esx-in-the-wild-4.xml b/tests/xml2vmxdata/xml2vmx-esx-in-the-wild-4.xml
index 277bac479c..34e994a451 100644
--- a/tests/xml2vmxdata/xml2vmx-esx-in-the-wild-4.xml
+++ b/tests/xml2vmxdata/xml2vmx-esx-in-the-wild-4.xml
@@ -17,7 +17,7 @@
   <devices>
     <disk type='file' device='disk'>
       <driver name='lsilogic'/>
-      <source file='[498076b2-02796c1a-ef5b-000ae484a6a3] virtMonServ1/virtMonServ1.vmdk'/>
+      <source file='/[498076b2-02796c1a-ef5b-000ae484a6a3] virtMonServ1/virtMonServ1.vmdk'/>
       <target dev='sda' bus='scsi'/>
     </disk>
     <interface type='bridge'>
@@ -29,15 +29,15 @@
       <source bridge='VM Switch 2'/>
     </interface>
     <serial type='file'>
-      <source path='[498076b2-02796c1a-ef5b-000ae484a6a3] virtMonServ1/serial1.file'/>
+      <source path='/[498076b2-02796c1a-ef5b-000ae484a6a3] virtMonServ1/serial1.file'/>
       <target port='0'/>
     </serial>
     <parallel type='file'>
-      <source path='[498076b2-02796c1a-ef5b-000ae484a6a3] virtMonServ1/parallel1.file'/>
+      <source path='/[498076b2-02796c1a-ef5b-000ae484a6a3] virtMonServ1/parallel1.file'/>
       <target port='0'/>
     </parallel>
     <console type='file'>
-      <source path='[498076b2-02796c1a-ef5b-000ae484a6a3] virtMonServ1/serial1.file'/>
+      <source path='/[498076b2-02796c1a-ef5b-000ae484a6a3] virtMonServ1/serial1.file'/>
       <target port='0'/>
     </console>
   </devices>
diff --git a/tests/xml2vmxdata/xml2vmx-esx-in-the-wild-5.xml b/tests/xml2vmxdata/xml2vmx-esx-in-the-wild-5.xml
index 4d1e5b8e54..11bdff5d70 100644
--- a/tests/xml2vmxdata/xml2vmx-esx-in-the-wild-5.xml
+++ b/tests/xml2vmxdata/xml2vmx-esx-in-the-wild-5.xml
@@ -20,12 +20,12 @@
   <on_crash>destroy</on_crash>
   <devices>
     <disk type='file' device='disk'>
-      <source file='[datastore] directory/vmtest-000001.vmdk'/>
+      <source file='/[datastore] directory/vmtest-000001.vmdk'/>
       <target dev='sda' bus='scsi'/>
       <address type='drive' controller='0' bus='0' unit='0'/>
     </disk>
     <disk type='file' device='cdrom'>
-      <source file='[4af0231d-1eff559a-6369-0024e84773b6] isos/CentOS-5.5-x86_64-bin-DVD-1of2.iso'/>
+      <source file='/[4af0231d-1eff559a-6369-0024e84773b6] isos/CentOS-5.5-x86_64-bin-DVD-1of2.iso'/>
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' unit='0'/>
     </disk>
diff --git a/tests/xml2vmxdata/xml2vmx-esx-in-the-wild-6.xml b/tests/xml2vmxdata/xml2vmx-esx-in-the-wild-6.xml
index fa416a9dea..4b66f8be75 100644
--- a/tests/xml2vmxdata/xml2vmx-esx-in-the-wild-6.xml
+++ b/tests/xml2vmxdata/xml2vmx-esx-in-the-wild-6.xml
@@ -13,7 +13,7 @@
   <on_crash>destroy</on_crash>
   <devices>
     <disk type='file' device='disk'>
-      <source file='[datastore] directory/el6-test-000001.vmdk'/>
+      <source file='/[datastore] directory/el6-test-000001.vmdk'/>
       <target dev='sda' bus='scsi'/>
       <address type='drive' controller='0' bus='0' unit='0'/>
     </disk>
diff --git a/tests/xml2vmxdata/xml2vmx-esx-in-the-wild-7.xml b/tests/xml2vmxdata/xml2vmx-esx-in-the-wild-7.xml
index 5180a99f83..6917fa2cdc 100644
--- a/tests/xml2vmxdata/xml2vmx-esx-in-the-wild-7.xml
+++ b/tests/xml2vmxdata/xml2vmx-esx-in-the-wild-7.xml
@@ -13,7 +13,7 @@
   <on_crash>destroy</on_crash>
   <devices>
     <disk type='file' device='disk'>
-      <source file='[datastore] directory/esx-rhel6-mini.vmdk'/>
+      <source file='/[datastore] directory/esx-rhel6-mini.vmdk'/>
       <target dev='sda' bus='scsi'/>
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
diff --git a/tests/xml2vmxdata/xml2vmx-esx-in-the-wild-9.xml b/tests/xml2vmxdata/xml2vmx-esx-in-the-wild-9.xml
index f1fe6dd4c9..d9d6618b5a 100644
--- a/tests/xml2vmxdata/xml2vmx-esx-in-the-wild-9.xml
+++ b/tests/xml2vmxdata/xml2vmx-esx-in-the-wild-9.xml
@@ -20,7 +20,7 @@
   <on_crash>destroy</on_crash>
   <devices>
     <disk type='file' device='disk'>
-      <source file='[datastore] directory/v2v-windows-kkulkarn.vmdk'/>
+      <source file='/[datastore] directory/v2v-windows-kkulkarn.vmdk'/>
       <target dev='sda' bus='scsi'/>
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
diff --git a/tests/xml2vmxdata/xml2vmx-floppy-file.xml b/tests/xml2vmxdata/xml2vmx-floppy-file.xml
index 119113abdd..86d76e02ae 100644
--- a/tests/xml2vmxdata/xml2vmx-floppy-file.xml
+++ b/tests/xml2vmxdata/xml2vmx-floppy-file.xml
@@ -7,11 +7,11 @@
   </os>
   <devices>
     <disk type='file' device='floppy'>
-      <source file='[testing] floppy.flp'/>
+      <source file='/[testing] floppy.flp'/>
       <target dev='fda' bus='fdc'/>
     </disk>
     <disk type='file' device='floppy'>
-      <source file='[testing] floppy1'/>
+      <source file='/[testing] floppy1'/>
       <target dev='fdb' bus='fdc'/>
     </disk>
   </devices>
diff --git a/tests/xml2vmxdata/xml2vmx-fusion-in-the-wild-1.xml b/tests/xml2vmxdata/xml2vmx-fusion-in-the-wild-1.xml
index 0bfc7e88af..ce24f10448 100644
--- a/tests/xml2vmxdata/xml2vmx-fusion-in-the-wild-1.xml
+++ b/tests/xml2vmxdata/xml2vmx-fusion-in-the-wild-1.xml
@@ -13,7 +13,7 @@
   <on_crash>destroy</on_crash>
   <devices>
     <disk type='file' device='disk'>
-      <source file='[datastore] directory/ATTM_VM.vmdk'/>
+      <source file='/[datastore] directory/ATTM_VM.vmdk'/>
       <target dev='sda' bus='scsi'/>
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
diff --git a/tests/xml2vmxdata/xml2vmx-gsx-in-the-wild-1.xml b/tests/xml2vmxdata/xml2vmx-gsx-in-the-wild-1.xml
index 56b98f7cb9..bafa776bb2 100644
--- a/tests/xml2vmxdata/xml2vmx-gsx-in-the-wild-1.xml
+++ b/tests/xml2vmxdata/xml2vmx-gsx-in-the-wild-1.xml
@@ -13,7 +13,7 @@
   <on_crash>destroy</on_crash>
   <devices>
     <disk type='file' device='disk'>
-      <source file='[storage] Server1/Debian-System1-0-cl2.vmdk'/>
+      <source file='/[storage] Server1/Debian-System1-0-cl2.vmdk'/>
       <target dev='hda' bus='ide'/>
     </disk>
     <interface type='bridge'>
diff --git a/tests/xml2vmxdata/xml2vmx-gsx-in-the-wild-2.xml b/tests/xml2vmxdata/xml2vmx-gsx-in-the-wild-2.xml
index a7732b74db..fdc8c67351 100644
--- a/tests/xml2vmxdata/xml2vmx-gsx-in-the-wild-2.xml
+++ b/tests/xml2vmxdata/xml2vmx-gsx-in-the-wild-2.xml
@@ -13,7 +13,7 @@
   <on_crash>destroy</on_crash>
   <devices>
     <disk type='file' device='disk'>
-      <source file='[storage] Server2/Debian-System1-0-cl3.vmdk'/>
+      <source file='/[storage] Server2/Debian-System1-0-cl3.vmdk'/>
       <target dev='hda' bus='ide'/>
     </disk>
     <interface type='bridge'>
diff --git a/tests/xml2vmxdata/xml2vmx-gsx-in-the-wild-3.xml b/tests/xml2vmxdata/xml2vmx-gsx-in-the-wild-3.xml
index e4fc5b61a6..4de9883a2a 100644
--- a/tests/xml2vmxdata/xml2vmx-gsx-in-the-wild-3.xml
+++ b/tests/xml2vmxdata/xml2vmx-gsx-in-the-wild-3.xml
@@ -13,7 +13,7 @@
   <on_crash>destroy</on_crash>
   <devices>
     <disk type='file' device='disk'>
-      <source file='[storage] Router/Debian-System1-0-cl1.vmdk'/>
+      <source file='/[storage] Router/Debian-System1-0-cl1.vmdk'/>
       <target dev='hda' bus='ide'/>
     </disk>
     <interface type='bridge'>
diff --git a/tests/xml2vmxdata/xml2vmx-gsx-in-the-wild-4.xml b/tests/xml2vmxdata/xml2vmx-gsx-in-the-wild-4.xml
index 7442025b61..a68ff3d14f 100644
--- a/tests/xml2vmxdata/xml2vmx-gsx-in-the-wild-4.xml
+++ b/tests/xml2vmxdata/xml2vmx-gsx-in-the-wild-4.xml
@@ -13,7 +13,7 @@
   <on_crash>destroy</on_crash>
   <devices>
     <disk type='file' device='disk'>
-      <source file='[storage] Client/Debian-System1-0-cl2.vmdk'/>
+      <source file='/[storage] Client/Debian-System1-0-cl2.vmdk'/>
       <target dev='hda' bus='ide'/>
     </disk>
     <interface type='bridge'>
diff --git a/tests/xml2vmxdata/xml2vmx-harddisk-ide-file.xml b/tests/xml2vmxdata/xml2vmx-harddisk-ide-file.xml
index e57e249dc1..313dffb603 100644
--- a/tests/xml2vmxdata/xml2vmx-harddisk-ide-file.xml
+++ b/tests/xml2vmxdata/xml2vmx-harddisk-ide-file.xml
@@ -7,7 +7,7 @@
   </os>
   <devices>
     <disk type='file' device='disk'>
-      <source file='[datastore] directory/harddisk.vmdk'/>
+      <source file='/[datastore] directory/harddisk.vmdk'/>
       <target dev='hda' bus='ide'/>
     </disk>
   </devices>
diff --git a/tests/xml2vmxdata/xml2vmx-harddisk-scsi-file.xml b/tests/xml2vmxdata/xml2vmx-harddisk-scsi-file.xml
index 70a9b57495..9d3de8164c 100644
--- a/tests/xml2vmxdata/xml2vmx-harddisk-scsi-file.xml
+++ b/tests/xml2vmxdata/xml2vmx-harddisk-scsi-file.xml
@@ -7,7 +7,7 @@
   </os>
   <devices>
     <disk type='file' device='disk'>
-      <source file='[datastore] directory/harddisk.vmdk'/>
+      <source file='/[datastore] directory/harddisk.vmdk'/>
       <target dev='sda' bus='scsi'/>
     </disk>
   </devices>
diff --git a/tests/xml2vmxdata/xml2vmx-parallel-file.xml b/tests/xml2vmxdata/xml2vmx-parallel-file.xml
index 8f686ddde5..0308c7856d 100644
--- a/tests/xml2vmxdata/xml2vmx-parallel-file.xml
+++ b/tests/xml2vmxdata/xml2vmx-parallel-file.xml
@@ -7,7 +7,7 @@
   </os>
   <devices>
     <parallel type='file'>
-      <source path='[datastore] directory/parallel0.file'/>
+      <source path='/[datastore] directory/parallel0.file'/>
       <target port='0'/>
     </parallel>
   </devices>
diff --git a/tests/xml2vmxdata/xml2vmx-scsi-driver.xml b/tests/xml2vmxdata/xml2vmx-scsi-driver.xml
index 360d7d23cc..d6f3c60f8d 100644
--- a/tests/xml2vmxdata/xml2vmx-scsi-driver.xml
+++ b/tests/xml2vmxdata/xml2vmx-scsi-driver.xml
@@ -8,22 +8,22 @@
   <devices>
     <disk type='file' device='disk'>
       <driver name='buslogic'/>
-      <source file='[datastore] directory/harddisk1.vmdk'/>
+      <source file='/[datastore] directory/harddisk1.vmdk'/>
       <target dev='sda' bus='scsi'/>
     </disk>
     <disk type='file' device='disk'>
       <driver name='lsilogic'/>
-      <source file='[datastore] directory/harddisk2.vmdk'/>
+      <source file='/[datastore] directory/harddisk2.vmdk'/>
       <target dev='sdp' bus='scsi'/>
     </disk>
     <disk type='file' device='disk'>
       <driver name='lsisas1068'/>
-      <source file='[datastore] directory/harddisk3.vmdk'/>
+      <source file='/[datastore] directory/harddisk3.vmdk'/>
       <target dev='sdae' bus='scsi'/>
     </disk>
     <disk type='file' device='disk'>
       <driver name='vmpvscsi'/>
-      <source file='[datastore] directory/harddisk4.vmdk'/>
+      <source file='/[datastore] directory/harddisk4.vmdk'/>
       <target dev='sdat' bus='scsi'/>
     </disk>
   </devices>
diff --git a/tests/xml2vmxdata/xml2vmx-scsi-writethrough.xml b/tests/xml2vmxdata/xml2vmx-scsi-writethrough.xml
index d0b17029fa..b1f48f206f 100644
--- a/tests/xml2vmxdata/xml2vmx-scsi-writethrough.xml
+++ b/tests/xml2vmxdata/xml2vmx-scsi-writethrough.xml
@@ -8,7 +8,7 @@
   <devices>
     <disk type='file' device='disk'>
       <driver name='buslogic' cache='writethrough'/>
-      <source file='[datastore] directory/harddisk.vmdk'/>
+      <source file='/[datastore] directory/harddisk.vmdk'/>
       <target dev='sda' bus='scsi'/>
     </disk>
   </devices>
diff --git a/tests/xml2vmxdata/xml2vmx-serial-file.xml b/tests/xml2vmxdata/xml2vmx-serial-file.xml
index 647a3ca550..4c8157e3b5 100644
--- a/tests/xml2vmxdata/xml2vmx-serial-file.xml
+++ b/tests/xml2vmxdata/xml2vmx-serial-file.xml
@@ -7,7 +7,7 @@
   </os>
   <devices>
     <serial type='file'>
-      <source path='[datastore] directory/serial0.file'/>
+      <source path='/[datastore] directory/serial0.file'/>
       <target port='0'/>
     </serial>
   </devices>
diff --git a/tests/xml2vmxtest.c b/tests/xml2vmxtest.c
index b74fda29ef..85cf88cec4 100644
--- a/tests/xml2vmxtest.c
+++ b/tests/xml2vmxtest.c
@@ -148,12 +148,12 @@ testFormatVMXFileName(const char *src, void *opaque G_GNUC_UNUSED)
     char *directoryAndFileName = NULL;
     char *absolutePath = NULL;

-    if (STRPREFIX(src, "[")) {
+    if (STRPREFIX(src, "/[")) {
         /* Found potential datastore path */
         copyOfDatastorePath = g_strdup(src);

         /* Expected format: '[<datastore>] <path>' where <path> is optional */
-        if ((tmp = STRSKIP(copyOfDatastorePath, "[")) == NULL || *tmp == ']' ||
+        if ((tmp = STRSKIP(copyOfDatastorePath, "/[")) == NULL || *tmp == ']' ||
             (datastoreName = strtok_r(tmp, "]", &saveptr)) == NULL) {
             goto cleanup;
         }
-- 
2.26.2




[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]

  Powered by Linux