Blob Blame History Raw
From f8e1030e4077db9785475bc75a660afa14651ba2 Mon Sep 17 00:00:00 2001
From: Cole Robinson <crobinso@redhat.com>
Date: Mon, 30 Sep 2013 14:11:50 +0200
Subject: [RHEL-7.0 virt-manager PATCH] Fix tests on f20, /dev/loop0 isn't
 available

(gscrivan: fix other failures)

(cherry picked from commit 382a24d08db1611787b104d675076ffe7715e4a7)
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Conflicts:
        tests/image-xml/image2guest/image-format-out.xml
        tests/image-xml/image2guest/image-xenfv32.xml
        tests/image-xml/image2guest/image-xenpv32-kernel.xml
        tests/image-xml/image2guest/image-xenpv32.xml
        tests/utils.py
        tests/xmlconfig-xml/boot-fullyvirt-disk-block.xml
        tests/xmlconfig-xml/boot-many-devices.xml
        tests/xmlconfig-xml/boot-many-disks2.xml
        tests/xmlconfig-xml/boot-paravirt-disk-block.xml
        tests/xmlconfig-xml/boot-paravirt-disk-drv-phy.xml
        tests/xmlconfig-xml/boot-paravirt-many-disks.xml
        tests/xmlconfig-xml/install-f10.xml
        tests/xmlconfig-xml/install-f11-ac97.xml
        tests/xmlconfig-xml/install-f11-noac97.xml
        tests/xmlconfig-xml/install-f11-norheldefaults.xml
        tests/xmlconfig-xml/install-f11-qemu.xml
        tests/xmlconfig-xml/install-f11-rheldefaults.xml
        tests/xmlconfig-xml/install-f11-xen.xml
        tests/xmlconfig-xml/install-f11.xml
        tests/xmlconfig-xml/install-fullyvirt-disk-block.xml
        tests/xmlconfig-xml/install-fullyvirt-disk-file.xml
        tests/xmlconfig-xml/install-fullyvirt-livecd.xml
        tests/xmlconfig-xml/install-paravirt-disk-block.xml
        tests/xmlconfig-xml/install-paravirt-disk-drv-phy.xml
        tests/xmlconfig-xml/install-paravirt-many-disks.xml
        tests/xmlconfig-xml/install-windowsxp-xennew.xml
        tests/xmlconfig-xml/install-windowsxp-xenold.xml
        tests/xmlconfig-xml/misc-qemu-driver-name.xml
        tests/xmlconfig-xml/misc-qemu-driver-overwrite.xml
        tests/xmlconfig-xml/misc-qemu-driver-type.xml
        tests/xmlconfig-xml/misc-qemu-iso-disk.xml
        tests/xmlconfig-xml/misc-xml-escaping.xml
        tests/xmlconfig-xml/rhel6-kvm-stage1.xml
        tests/xmlconfig-xml/rhel6-kvm-stage2.xml
        tests/xmlconfig-xml/winxp-kvm-stage1.xml
        tests/xmlconfig-xml/winxp-kvm-stage2.xml
        tests/xmlconfig-xml/winxp-kvm-stage3.xml
        tests/xmlconfig.py
---
 tests/clone-xml/empty-disks-out.xml                  |  4 ++--
 tests/clone-xml/force-out.xml                        |  4 ++--
 tests/clone-xml/general-cfg-in.xml                   |  2 +-
 tests/clone-xml/general-cfg-out.xml                  |  6 +++---
 tests/clone-xml/readonly-disks-out.xml               |  4 ++--
 tests/clone-xml/skip-out.xml                         |  4 ++--
 tests/clonetest.py                                   |  6 +++---
 tests/testdriver.xml                                 |  4 ++--
 tests/utils.py                                       |  6 +++---
 tests/validation.py                                  |  6 +++---
 tests/xmlconfig-xml/boot-fullyvirt-disk-block.xml    |  4 ++--
 tests/xmlconfig-xml/boot-many-devices.xml            |  8 ++++----
 tests/xmlconfig-xml/boot-many-disks2.xml             | 20 ++++++++++----------
 tests/xmlconfig-xml/boot-paravirt-disk-block.xml     |  4 ++--
 tests/xmlconfig-xml/boot-paravirt-disk-drv-phy.xml   |  4 ++--
 tests/xmlconfig-xml/boot-paravirt-many-disks.xml     |  4 ++--
 tests/xmlconfig-xml/boot-windowsxp-kvm.xml           |  4 ++--
 tests/xmlconfig-xml/install-f10.xml                  |  4 ++--
 tests/xmlconfig-xml/install-f11-ac97.xml             |  4 ++--
 tests/xmlconfig-xml/install-f11-noac97.xml           |  4 ++--
 tests/xmlconfig-xml/install-f11-qemu.xml             |  4 ++--
 tests/xmlconfig-xml/install-f11-xen.xml              |  4 ++--
 tests/xmlconfig-xml/install-f11.xml                  |  4 ++--
 tests/xmlconfig-xml/install-fullyvirt-disk-block.xml |  8 ++++----
 tests/xmlconfig-xml/install-fullyvirt-disk-file.xml  |  4 ++--
 tests/xmlconfig-xml/install-fullyvirt-livecd.xml     |  4 ++--
 tests/xmlconfig-xml/install-paravirt-disk-block.xml  |  4 ++--
 .../xmlconfig-xml/install-paravirt-disk-drv-phy.xml  |  4 ++--
 tests/xmlconfig-xml/install-paravirt-many-disks.xml  |  4 ++--
 tests/xmlconfig-xml/install-windowsxp-kvm.xml        |  4 ++--
 tests/xmlconfig-xml/install-windowsxp-xennew.xml     |  8 ++++----
 tests/xmlconfig-xml/install-windowsxp-xenold.xml     |  8 ++++----
 tests/xmlconfig-xml/misc-qemu-driver-name.xml        |  8 ++++----
 tests/xmlconfig-xml/misc-qemu-driver-overwrite.xml   |  4 ++--
 tests/xmlconfig-xml/misc-qemu-driver-type.xml        |  4 ++--
 tests/xmlconfig-xml/misc-qemu-iso-disk.xml           |  4 ++--
 tests/xmlconfig-xml/misc-xml-escaping.xml            |  4 ++--
 tests/xmlconfig-xml/rhel6-kvm-stage1.xml             |  4 ++--
 tests/xmlconfig-xml/rhel6-kvm-stage2.xml             |  4 ++--
 tests/xmlconfig-xml/winxp-kvm-stage1.xml             |  8 ++++----
 tests/xmlconfig-xml/winxp-kvm-stage2.xml             |  8 ++++----
 tests/xmlconfig-xml/winxp-kvm-stage3.xml             |  8 ++++----
 tests/xmlconfig.py                                   | 12 ++++++------
 tests/xmlparse-xml/add-devices-in.xml                |  2 +-
 tests/xmlparse-xml/change-boot-kernel-in.xml         |  2 +-
 tests/xmlparse-xml/change-boot-kernel-out.xml        |  2 +-
 tests/xmlparse-xml/change-disk-in.xml                |  2 +-
 tests/xmlparse-xml/change-disk-out.xml               |  2 +-
 tests/xmlparse-xml/change-filesystems-in.xml         |  2 +-
 tests/xmlparse-xml/change-filesystems-out.xml        |  2 +-
 tests/xmlparse-xml/change-graphics-in.xml            |  2 +-
 tests/xmlparse-xml/change-graphics-out.xml           |  2 +-
 tests/xmlparse-xml/change-guest-in.xml               |  2 +-
 tests/xmlparse-xml/change-guest-out.xml              |  2 +-
 tests/xmlparse-xml/change-smartcard-in.xml           |  2 +-
 tests/xmlparse-xml/change-smartcard-out.xml          |  2 +-
 tests/xmlparse-xml/change-sounds-in.xml              |  2 +-
 tests/xmlparse-xml/change-sounds-out.xml             |  2 +-
 tests/xmlparse-xml/change-videos-in.xml              |  2 +-
 tests/xmlparse-xml/change-videos-out.xml             |  2 +-
 tests/xmlparse-xml/change-watchdogs-in.xml           |  2 +-
 tests/xmlparse-xml/change-watchdogs-out.xml          |  2 +-
 tests/xmlparse.py                                    |  2 +-
 63 files changed, 137 insertions(+), 137 deletions(-)

diff --git a/tests/clone-xml/empty-disks-out.xml b/tests/clone-xml/empty-disks-out.xml
index 2b768a6..8e5c88e 100644
--- a/tests/clone-xml/empty-disks-out.xml
+++ b/tests/clone-xml/empty-disks-out.xml
@@ -17,9 +17,9 @@
   <on_crash>destroy</on_crash>
   <devices>
     <emulator>/usr/bin/qemu-kvm</emulator>
-    <disk type="block" device="disk">
+    <disk type="file" device="disk">
       <target dev="hda" bus="ide"/>
-      <source dev="/dev/loop0"/>
+      <source file="/dev/null"/>
     </disk>
     <disk type="file" device="floppy">
       <target dev="fdb" bus="fdc"/>
diff --git a/tests/clone-xml/force-out.xml b/tests/clone-xml/force-out.xml
index 656ae1c..58eaa9b 100644
--- a/tests/clone-xml/force-out.xml
+++ b/tests/clone-xml/force-out.xml
@@ -17,9 +17,9 @@
   <on_crash>destroy</on_crash>
   <devices>
     <emulator>/usr/bin/qemu-kvm</emulator>
-    <disk type="block" device="disk">
+    <disk type="file" device="disk">
       <target dev="hda" bus="ide"/>
-      <source dev="/dev/loop0"/>
+      <source file="/dev/null"/>
     </disk>
     <disk type="block" device="floppy">
       <target dev="fdb" bus="fdc"/>
diff --git a/tests/clone-xml/general-cfg-in.xml b/tests/clone-xml/general-cfg-in.xml
index b3ab912..c0a554c 100644
--- a/tests/clone-xml/general-cfg-in.xml
+++ b/tests/clone-xml/general-cfg-in.xml
@@ -22,7 +22,7 @@
       <target dev='hda' bus='ide'/>
     </disk>
     <disk type='block' device='disk'>
-      <source dev='/dev/loop0'/>
+      <source dev='/dev/null'/>
       <target dev='hdb' bus='ide'/>
     </disk>
     <interface type='network'>
diff --git a/tests/clone-xml/general-cfg-out.xml b/tests/clone-xml/general-cfg-out.xml
index 20508dc..cce9a83 100644
--- a/tests/clone-xml/general-cfg-out.xml
+++ b/tests/clone-xml/general-cfg-out.xml
@@ -17,13 +17,13 @@
   <on_crash>destroy</on_crash>
   <devices>
     <emulator>/usr/bin/qemu-kvm</emulator>
-    <disk type="block" device="disk">
+    <disk type="file" device="disk">
       <target dev="hda" bus="ide"/>
-      <source dev="/dev/loop0"/>
+      <source file="/dev/null"/>
     </disk>
     <disk type="file" device="disk">
+      <source dev="/dev/null" file="/tmp/clone2.img"/>
       <target dev="hdb" bus="ide"/>
-      <source file="/tmp/clone2.img"/>
     </disk>
     <interface type="network">
       <mac address="22:23:45:67:89:00"/>
diff --git a/tests/clone-xml/readonly-disks-out.xml b/tests/clone-xml/readonly-disks-out.xml
index f8d3ac4..4cc3fd8 100644
--- a/tests/clone-xml/readonly-disks-out.xml
+++ b/tests/clone-xml/readonly-disks-out.xml
@@ -17,9 +17,9 @@
   <on_crash>destroy</on_crash>
   <devices>
     <emulator>/usr/bin/qemu-kvm</emulator>
-    <disk type="block" device="disk">
+    <disk type="file" device="disk">
       <target dev="hda" bus="ide"/>
-      <source dev="/dev/loop0"/>
+      <source file="/dev/null"/>
     </disk>
     <disk type="file" device="disk">
       <source file="/tmp/virtinst-test1.img"/>
diff --git a/tests/clone-xml/skip-out.xml b/tests/clone-xml/skip-out.xml
index ac68746..c3064d1 100644
--- a/tests/clone-xml/skip-out.xml
+++ b/tests/clone-xml/skip-out.xml
@@ -28,9 +28,9 @@
       <target dev="sda" bus="scsi"/>
       <readonly/>
     </disk>
-    <disk type="block" device="disk">
+    <disk type="file" device="disk">
       <target dev="sdb" bus="scsi"/>
-      <source dev="/dev/loop0"/>
+      <source file="/dev/null"/>
     </disk>
     <interface type="network">
       <mac address="22:23:45:67:89:00"/>
diff --git a/tests/clonetest.py b/tests/clonetest.py
index e58d3c1..ffab910 100644
--- a/tests/clonetest.py
+++ b/tests/clonetest.py
@@ -97,7 +97,7 @@ class TestClone(unittest.TestCase):
             for disk in disks:
                 cloneobj.clone_devices = disk
         else:
-            cloneobj.clone_devices = "/dev/loop0"
+            cloneobj.clone_devices = "/dev/null"
             cloneobj.clone_devices = "/tmp/clone2.img"
             cloneobj.clone_devices = "/tmp/clone3.img"
             cloneobj.clone_devices = "/tmp/clone4.img"
@@ -186,13 +186,13 @@ class TestClone(unittest.TestCase):
     def testCloneStorageForce(self):
         base = "force"
         self._clone_helper(base,
-                           disks=["/dev/loop0", None, "/tmp/clone2.img"],
+                           disks=["/dev/null", None, "/tmp/clone2.img"],
                            force_list=["hda", "fdb", "sdb"])

     def testCloneStorageSkip(self):
         base = "skip"
         self._clone_helper(base,
-                           disks=["/dev/loop0", None, "/tmp/clone2.img"],
+                           disks=["/dev/null", None, "/tmp/clone2.img"],
                            skip_list=["hda", "fdb"])

     def testCloneFullPool(self):
diff --git a/tests/testdriver.xml b/tests/testdriver.xml
index d085af2..114a756 100644
--- a/tests/testdriver.xml
+++ b/tests/testdriver.xml
@@ -87,7 +87,7 @@

     <!-- disk devices -->
     <disk type='block' device='floppy'>
-      <source dev='/dev/loop0'/>
+      <source dev='/dev/null'/>
       <target dev='fda' bus='fdc'/>
     </disk>
     <disk type='dir' device='floppy'>
@@ -104,7 +104,7 @@
     </disk>
     <disk type='block' device='disk'>
       <driver cache='none' type="raw"/>
-      <source dev='/dev/loop0'/>
+      <source dev='/dev/null'/>
       <target dev='hdc' bus='ide'/>
     </disk>
     <disk type='block' device='cdrom'>
diff --git a/tests/utils.py b/tests/utils.py
index 438f291..24a12fd 100644
--- a/tests/utils.py
+++ b/tests/utils.py
@@ -192,7 +192,7 @@ def get_basic_fullyvirt_guest(typ="xen", installer=None):
     g.memory = int(200)
     g.maxmemory = int(400)
     g.uuid = "12345678-1234-1234-1234-123456789012"
-    g.cdrom = "/dev/loop0"
+    g.cdrom = "/dev/null"
     g.add_device(VirtualGraphics("sdl"))
     g.features['pae'] = 0
     g.vcpus = 5
@@ -217,7 +217,7 @@ def make_distro_installer(location="/dev/default-pool/default-vol", gtype="xen")
     return inst


-def make_live_installer(location="/dev/loop0", gtype="xen"):
+def make_live_installer(location="/dev/null", gtype="xen"):
     inst = virtinst.LiveCDInstaller(type=gtype, os_type="hvm",
                                     conn=_conn, location=location)
     return inst
@@ -253,7 +253,7 @@ def get_filedisk(path=None):
     return VirtualDisk(path, size=.0001, conn=_conn)


-def get_blkdisk(path="/dev/loop0"):
+def get_blkdisk(path="/dev/null"):
     return VirtualDisk(path, conn=_conn)


diff --git a/tests/validation.py b/tests/validation.py
index a384afb..d942be7 100644
--- a/tests/validation.py
+++ b/tests/validation.py
@@ -87,7 +87,7 @@ args = {
         'valid'   : ['sometype']},
     'cdrom'     : {
         'invalid' : ['', 0, '/somepath'],
-        'valid'   : ['/dev/loop0']
+        'valid'   : ['/dev/null']
   },
     'arch'      : {
         'invalid' : [],
@@ -127,7 +127,7 @@ args = {
  ],

    'valid' : [
-    {'path' : '/dev/loop0'},
+    {'path' : '/dev/null'},
     {'path' : 'nonexist', 'size' : 1},
     {'path' : '/dev/null'},
     {'path' : None, 'device' : VirtualDisk.DEVICE_CDROM},
@@ -430,7 +430,7 @@ class TestValidation(unittest.TestCase):
         self._testArgs(g, virtinst.Guest, 'guest')

     def testDiskValidation(self):
-        disk = VirtualDisk("/dev/loop0")
+        disk = VirtualDisk("/dev/null")
         self._testArgs(disk, VirtualDisk, 'disk')

     def testNetworkValidation(self):
diff --git a/tests/xmlconfig-xml/boot-fullyvirt-disk-block.xml b/tests/xmlconfig-xml/boot-fullyvirt-disk-block.xml
index a9866ae..edb2ce4 100644
--- a/tests/xmlconfig-xml/boot-fullyvirt-disk-block.xml
+++ b/tests/xmlconfig-xml/boot-fullyvirt-disk-block.xml
@@ -18,8 +18,8 @@
   <on_crash>restart</on_crash>
   <devices>
     <emulator>/usr/lib/xen/bin/qemu-dm</emulator>
-    <disk type='block' device='disk'>
-      <source dev='/dev/loop0'/>
+    <disk type='file' device='disk'>
+      <source file='/dev/null'/>
       <target dev='hda' bus='ide'/>
     </disk>
     <disk type='block' device='cdrom'>
diff --git a/tests/xmlconfig-xml/boot-many-devices.xml b/tests/xmlconfig-xml/boot-many-devices.xml
index 4b63570..c5871a3 100644
--- a/tests/xmlconfig-xml/boot-many-devices.xml
+++ b/tests/xmlconfig-xml/boot-many-devices.xml
@@ -22,12 +22,12 @@
   <on_crash>restart</on_crash>
   <devices>
     <emulator>/usr/lib/xen/bin/qemu-dm</emulator>
-    <disk type='block' device='floppy'>
-      <source dev='/dev/loop0'/>
+    <disk type='file' device='floppy'>
+      <source file='/dev/null'/>
       <target dev='fda' bus='fdc'/>
     </disk>
-    <disk type='block' device='disk'>
-      <source dev='/dev/loop0'/>
+    <disk type='file' device='disk'>
+      <source file='/dev/null'/>
       <target dev='sda' bus='scsi'/>
     </disk>
     <disk type='dir' device='floppy'>
diff --git a/tests/xmlconfig-xml/boot-many-disks2.xml b/tests/xmlconfig-xml/boot-many-disks2.xml
index 54b6c34..c68b460 100644
--- a/tests/xmlconfig-xml/boot-many-disks2.xml
+++ b/tests/xmlconfig-xml/boot-many-disks2.xml
@@ -22,19 +22,19 @@
       <source file='/tmp/test.img'/>
       <target dev='hda' bus='ide'/>
     </disk>
-    <disk type='block' device='disk'>
-      <source dev='/dev/loop0'/>
+    <disk type='file' device='disk'>
+      <source file='/dev/null'/>
       <target dev='hdb' bus='ide'/>
     </disk>
-    <disk type='block' device='cdrom'>
+    <disk type='file' device='cdrom'>
       <driver type='raw'/>
-      <source dev='/dev/loop0'/>
+      <source file='/dev/null'/>
       <target dev='hdc' bus='ide'/>
       <readonly/>
     </disk>
-    <disk type='block' device='disk'>
+    <disk type='file' device='disk'>
       <driver name='qemu' type='qcow2'/>
-      <source dev='/dev/loop0'/>
+      <source file='/dev/null'/>
       <target dev='hdd' bus='ide'/>
     </disk>
     <disk type='block' device='cdrom'>
@@ -44,14 +44,14 @@
     <disk type='block' device='floppy'>
       <target dev='fda' bus='fdc'/>
     </disk>
-    <disk type='block' device='floppy'>
+    <disk type='file' device='floppy'>
       <driver name='phy' cache='none'/>
-      <source dev='/dev/loop0'/>
+      <source file='/dev/null'/>
       <target dev='fdb' bus='fdc'/>
     </disk>
-    <disk type='block' device='disk'>
+    <disk type='file' device='disk'>
       <driver name='qemu' type='qcow2' cache='none' io='threads'/>
-      <source dev='/dev/loop0'/>
+      <source file='/dev/null'/>
       <target dev='vda' bus='virtio'/>
     </disk>
     <input type='mouse' bus='ps2'/>
diff --git a/tests/xmlconfig-xml/boot-paravirt-disk-block.xml b/tests/xmlconfig-xml/boot-paravirt-disk-block.xml
index c2f6827..42974cc 100644
--- a/tests/xmlconfig-xml/boot-paravirt-disk-block.xml
+++ b/tests/xmlconfig-xml/boot-paravirt-disk-block.xml
@@ -9,8 +9,8 @@
   <on_reboot>restart</on_reboot>
   <on_crash>restart</on_crash>
   <devices>
-    <disk type='block' device='disk'>
-      <source dev='/dev/loop0'/>
+    <disk type='file' device='disk'>
+      <source file='/dev/null'/>
       <target dev='xvda' bus='xen'/>
     </disk>
     <input type='mouse' bus='xen'/>
diff --git a/tests/xmlconfig-xml/boot-paravirt-disk-drv-phy.xml b/tests/xmlconfig-xml/boot-paravirt-disk-drv-phy.xml
index f9213b2..16c4ac0 100644
--- a/tests/xmlconfig-xml/boot-paravirt-disk-drv-phy.xml
+++ b/tests/xmlconfig-xml/boot-paravirt-disk-drv-phy.xml
@@ -9,9 +9,9 @@
   <on_reboot>restart</on_reboot>
   <on_crash>restart</on_crash>
   <devices>
-    <disk type='block' device='disk'>
+    <disk type='file' device='disk'>
       <driver name='phy'/>
-      <source dev='/dev/loop0'/>
+      <source file='/dev/null'/>
       <target dev='xvda' bus='xen'/>
     </disk>
     <input type='mouse' bus='xen'/>
diff --git a/tests/xmlconfig-xml/boot-paravirt-many-disks.xml b/tests/xmlconfig-xml/boot-paravirt-many-disks.xml
index b88d1c8..1acbac0 100644
--- a/tests/xmlconfig-xml/boot-paravirt-many-disks.xml
+++ b/tests/xmlconfig-xml/boot-paravirt-many-disks.xml
@@ -18,8 +18,8 @@
       <source file='/tmp/test2.img'/>
       <target dev='xvdb' bus='xen'/>
     </disk>
-    <disk type='block' device='disk'>
-      <source dev='/dev/loop0'/>
+    <disk type='file' device='disk'>
+      <source file='/dev/null'/>
       <target dev='xvdc' bus='xen'/>
     </disk>
     <input type='mouse' bus='xen'/>
diff --git a/tests/xmlconfig-xml/boot-windowsxp-kvm.xml b/tests/xmlconfig-xml/boot-windowsxp-kvm.xml
index 91cc3d0..2973adf 100644
--- a/tests/xmlconfig-xml/boot-windowsxp-kvm.xml
+++ b/tests/xmlconfig-xml/boot-windowsxp-kvm.xml
@@ -24,12 +24,12 @@
     </disk>
     <disk type='block' device='disk'>
       <driver name='qemu'/>
-      <source dev='/dev/loop0'/>
+      <source dev='/dev/null'/>
       <target dev='hdb' bus='ide'/>
     </disk>
     <disk type='block' device='cdrom'>
       <driver name='qemu'/>
-      <source dev='/dev/loop0'/>
+      <source dev='/dev/null'/>
       <target dev='hdc' bus='ide'/>
       <readonly/>
     </disk>
diff --git a/tests/xmlconfig-xml/install-f10.xml b/tests/xmlconfig-xml/install-f10.xml
index 470df8c..0ef7cb0 100644
--- a/tests/xmlconfig-xml/install-f10.xml
+++ b/tests/xmlconfig-xml/install-f10.xml
@@ -23,9 +23,9 @@
       <source file='/tmp/test.img'/>
       <target dev='vda' bus='virtio'/>
     </disk>
-    <disk type='block' device='disk'>
+    <disk type='file' device='disk'>
       <driver name='qemu'/>
-      <source dev='/dev/loop0'/>
+      <source file='/dev/null'/>
       <target dev='vdb' bus='virtio'/>
     </disk>
     <interface type='network'>
diff --git a/tests/xmlconfig-xml/install-f11-ac97.xml b/tests/xmlconfig-xml/install-f11-ac97.xml
index c017594..9b158d3 100644
--- a/tests/xmlconfig-xml/install-f11-ac97.xml
+++ b/tests/xmlconfig-xml/install-f11-ac97.xml
@@ -27,9 +27,9 @@
       <source file='/tmp/test.img'/>
       <target dev='vda' bus='virtio'/>
     </disk>
-    <disk type='block' device='disk'>
+    <disk type='file' device='disk'>
       <driver name='qemu'/>
-      <source dev='/dev/loop0'/>
+      <source file='/dev/null'/>
       <target dev='vdb' bus='virtio'/>
     </disk>
     <disk type='block' device='cdrom'>
diff --git a/tests/xmlconfig-xml/install-f11-noac97.xml b/tests/xmlconfig-xml/install-f11-noac97.xml
index 24ed598..a6b5a5a 100644
--- a/tests/xmlconfig-xml/install-f11-noac97.xml
+++ b/tests/xmlconfig-xml/install-f11-noac97.xml
@@ -27,9 +27,9 @@
       <source file='/tmp/test.img'/>
       <target dev='vda' bus='virtio'/>
     </disk>
-    <disk type='block' device='disk'>
+    <disk type='file' device='disk'>
       <driver name='qemu'/>
-      <source dev='/dev/loop0'/>
+      <source file='/dev/null'/>
       <target dev='vdb' bus='virtio'/>
     </disk>
     <disk type='block' device='cdrom'>
diff --git a/tests/xmlconfig-xml/install-f11-qemu.xml b/tests/xmlconfig-xml/install-f11-qemu.xml
index 685ccd4..302e4bd 100644
--- a/tests/xmlconfig-xml/install-f11-qemu.xml
+++ b/tests/xmlconfig-xml/install-f11-qemu.xml
@@ -27,9 +27,9 @@
       <source file='/tmp/test.img'/>
       <target dev='hda' bus='ide'/>
     </disk>
-    <disk type='block' device='disk'>
+    <disk type='file' device='disk'>
       <driver name='qemu'/>
-      <source dev='/dev/loop0'/>
+      <source file='/dev/null'/>
       <target dev='hdb' bus='ide'/>
     </disk>
     <disk type='block' device='cdrom'>
diff --git a/tests/xmlconfig-xml/install-f11-xen.xml b/tests/xmlconfig-xml/install-f11-xen.xml
index b902126..67159b8 100644
--- a/tests/xmlconfig-xml/install-f11-xen.xml
+++ b/tests/xmlconfig-xml/install-f11-xen.xml
@@ -26,8 +26,8 @@
       <source file='/tmp/test.img'/>
       <target dev='hda' bus='ide'/>
     </disk>
-    <disk type='block' device='disk'>
-      <source dev='/dev/loop0'/>
+    <disk type='file' device='disk'>
+      <source file='/dev/null'/>
       <target dev='hdb' bus='ide'/>
     </disk>
     <disk type='block' device='cdrom'>
diff --git a/tests/xmlconfig-xml/install-f11.xml b/tests/xmlconfig-xml/install-f11.xml
index ccf30d6..c132ae9 100644
--- a/tests/xmlconfig-xml/install-f11.xml
+++ b/tests/xmlconfig-xml/install-f11.xml
@@ -27,9 +27,9 @@
       <source file='/tmp/test.img'/>
       <target dev='vda' bus='virtio'/>
     </disk>
-    <disk type='block' device='disk'>
+    <disk type='file' device='disk'>
       <driver name='qemu'/>
-      <source dev='/dev/loop0'/>
+      <source file='/dev/null'/>
       <target dev='vdb' bus='virtio'/>
     </disk>
     <disk type='block' device='cdrom'>
diff --git a/tests/xmlconfig-xml/install-fullyvirt-disk-block.xml b/tests/xmlconfig-xml/install-fullyvirt-disk-block.xml
index f361961..09b02ab 100644
--- a/tests/xmlconfig-xml/install-fullyvirt-disk-block.xml
+++ b/tests/xmlconfig-xml/install-fullyvirt-disk-block.xml
@@ -19,12 +19,12 @@
   <on_crash>destroy</on_crash>
   <devices>
     <emulator>/usr/lib/xen/bin/qemu-dm</emulator>
-    <disk type='block' device='disk'>
-      <source dev='/dev/loop0'/>
+    <disk type='file' device='disk'>
+      <source file='/dev/null'/>
       <target dev='hda' bus='ide'/>
     </disk>
-    <disk type='block' device='cdrom'>
-      <source dev='/dev/loop0'/>
+    <disk type='file' device='cdrom'>
+      <source file='/dev/null'/>
       <target dev='hdc' bus='ide'/>
       <readonly/>
     </disk>
diff --git a/tests/xmlconfig-xml/install-fullyvirt-disk-file.xml b/tests/xmlconfig-xml/install-fullyvirt-disk-file.xml
index 95a80c8..bcea591 100644
--- a/tests/xmlconfig-xml/install-fullyvirt-disk-file.xml
+++ b/tests/xmlconfig-xml/install-fullyvirt-disk-file.xml
@@ -23,8 +23,8 @@
       <source file='/tmp/test.img'/>
       <target dev='hda' bus='ide'/>
     </disk>
-    <disk type='block' device='cdrom'>
-      <source dev='/dev/loop0'/>
+    <disk type='file' device='cdrom'>
+      <source file='/dev/null'/>
       <target dev='hdc' bus='ide'/>
       <readonly/>
     </disk>
diff --git a/tests/xmlconfig-xml/install-fullyvirt-livecd.xml b/tests/xmlconfig-xml/install-fullyvirt-livecd.xml
index 351fdc5..7f793c0 100644
--- a/tests/xmlconfig-xml/install-fullyvirt-livecd.xml
+++ b/tests/xmlconfig-xml/install-fullyvirt-livecd.xml
@@ -18,8 +18,8 @@
   <on_crash>restart</on_crash>
   <devices>
     <emulator>/usr/lib/xen/bin/qemu-dm</emulator>
-    <disk type='block' device='cdrom'>
-      <source dev='/dev/loop0'/>
+    <disk type='file' device='cdrom'>
+      <source file='/dev/null'/>
       <target dev='hdc' bus='ide'/>
       <readonly/>
     </disk>
diff --git a/tests/xmlconfig-xml/install-paravirt-disk-block.xml b/tests/xmlconfig-xml/install-paravirt-disk-block.xml
index c3483c7..cc7da6a 100644
--- a/tests/xmlconfig-xml/install-paravirt-disk-block.xml
+++ b/tests/xmlconfig-xml/install-paravirt-disk-block.xml
@@ -13,8 +13,8 @@
   <on_reboot>destroy</on_reboot>
   <on_crash>destroy</on_crash>
   <devices>
-    <disk type='block' device='disk'>
-      <source dev='/dev/loop0'/>
+    <disk type='file' device='disk'>
+      <source file='/dev/null'/>
       <target dev='xvda' bus='xen'/>
     </disk>
     <input type='mouse' bus='xen'/>
diff --git a/tests/xmlconfig-xml/install-paravirt-disk-drv-phy.xml b/tests/xmlconfig-xml/install-paravirt-disk-drv-phy.xml
index a5a542f..1c0e748 100644
--- a/tests/xmlconfig-xml/install-paravirt-disk-drv-phy.xml
+++ b/tests/xmlconfig-xml/install-paravirt-disk-drv-phy.xml
@@ -13,9 +13,9 @@
   <on_reboot>destroy</on_reboot>
   <on_crash>destroy</on_crash>
   <devices>
-    <disk type='block' device='disk'>
+    <disk type='file' device='disk'>
       <driver name='phy'/>
-      <source dev='/dev/loop0'/>
+      <source file='/dev/null'/>
       <target dev='xvda' bus='xen'/>
     </disk>
     <input type='mouse' bus='xen'/>
diff --git a/tests/xmlconfig-xml/install-paravirt-many-disks.xml b/tests/xmlconfig-xml/install-paravirt-many-disks.xml
index 27a522e..9be0350 100644
--- a/tests/xmlconfig-xml/install-paravirt-many-disks.xml
+++ b/tests/xmlconfig-xml/install-paravirt-many-disks.xml
@@ -22,8 +22,8 @@
       <source file='/tmp/test2.img'/>
       <target dev='xvdb' bus='xen'/>
     </disk>
-    <disk type='block' device='disk'>
-      <source dev='/dev/loop0'/>
+    <disk type='file' device='disk'>
+      <source file='/dev/null'/>
       <target dev='xvdc' bus='xen'/>
     </disk>
     <input type='mouse' bus='xen'/>
diff --git a/tests/xmlconfig-xml/install-windowsxp-kvm.xml b/tests/xmlconfig-xml/install-windowsxp-kvm.xml
index 21c75fe..7d54eab 100644
--- a/tests/xmlconfig-xml/install-windowsxp-kvm.xml
+++ b/tests/xmlconfig-xml/install-windowsxp-kvm.xml
@@ -25,12 +25,12 @@
     </disk>
     <disk type='block' device='disk'>
       <driver name='qemu'/>
-      <source dev='/dev/loop0'/>
+      <source dev='/dev/null'/>
       <target dev='hdb' bus='ide'/>
     </disk>
     <disk type='block' device='cdrom'>
       <driver name='qemu'/>
-      <source dev='/dev/loop0'/>
+      <source dev='/dev/null'/>
       <target dev='hdc' bus='ide'/>
       <readonly/>
     </disk>
diff --git a/tests/xmlconfig-xml/install-windowsxp-xennew.xml b/tests/xmlconfig-xml/install-windowsxp-xennew.xml
index 3447e89..3037251 100644
--- a/tests/xmlconfig-xml/install-windowsxp-xennew.xml
+++ b/tests/xmlconfig-xml/install-windowsxp-xennew.xml
@@ -23,12 +23,12 @@
       <source file='/tmp/test.img'/>
       <target dev='hda' bus='ide'/>
     </disk>
-    <disk type='block' device='disk'>
-      <source dev='/dev/loop0'/>
+    <disk type='file' device='disk'>
+      <source file='/dev/null'/>
       <target dev='hdb' bus='ide'/>
     </disk>
-    <disk type='block' device='cdrom'>
-      <source dev='/dev/loop0'/>
+    <disk type='file' device='cdrom'>
+      <source file='/dev/null'/>
       <target dev='hdc' bus='ide'/>
       <readonly/>
     </disk>
diff --git a/tests/xmlconfig-xml/install-windowsxp-xenold.xml b/tests/xmlconfig-xml/install-windowsxp-xenold.xml
index 3016fdb..e684aa1 100644
--- a/tests/xmlconfig-xml/install-windowsxp-xenold.xml
+++ b/tests/xmlconfig-xml/install-windowsxp-xenold.xml
@@ -20,12 +20,12 @@
       <source file='/tmp/test.img'/>
       <target dev='hda' bus='ide'/>
     </disk>
-    <disk type='block' device='disk'>
-      <source dev='/dev/loop0'/>
+    <disk type='file' device='disk'>
+      <source file='/dev/null'/>
       <target dev='hdb' bus='ide'/>
     </disk>
-    <disk type='block' device='cdrom'>
-      <source dev='/dev/loop0'/>
+    <disk type='file' device='cdrom'>
+      <source file='/dev/null'/>
       <target dev='hdc' bus='ide'/>
       <readonly/>
     </disk>
diff --git a/tests/xmlconfig-xml/misc-qemu-driver-name.xml b/tests/xmlconfig-xml/misc-qemu-driver-name.xml
index 5059cc1..8eb2494 100644
--- a/tests/xmlconfig-xml/misc-qemu-driver-name.xml
+++ b/tests/xmlconfig-xml/misc-qemu-driver-name.xml
@@ -19,14 +19,14 @@
   <on_crash>destroy</on_crash>
   <devices>
     <emulator>/usr/lib/xen/bin/qemu-dm</emulator>
-    <disk type='block' device='disk'>
+    <disk type='file' device='disk'>
       <driver name='qemu'/>
-      <source dev='/dev/loop0'/>
+      <source file='/dev/null'/>
       <target dev='hda' bus='ide'/>
     </disk>
-    <disk type='block' device='cdrom'>
+    <disk type='file' device='cdrom'>
       <driver name='qemu'/>
-      <source dev='/dev/loop0'/>
+      <source file='/dev/null'/>
       <target dev='hdc' bus='ide'/>
       <readonly/>
     </disk>
diff --git a/tests/xmlconfig-xml/misc-qemu-driver-overwrite.xml b/tests/xmlconfig-xml/misc-qemu-driver-overwrite.xml
index 0cf03b5..4fd7b03 100644
--- a/tests/xmlconfig-xml/misc-qemu-driver-overwrite.xml
+++ b/tests/xmlconfig-xml/misc-qemu-driver-overwrite.xml
@@ -24,9 +24,9 @@
       <source file='/dev/default-pool/iso-vol'/>
       <target dev='hda' bus='ide'/>
     </disk>
-    <disk type='block' device='cdrom'>
+    <disk type='file' device='cdrom'>
       <driver name='qemu'/>
-      <source dev='/dev/loop0'/>
+      <source file='/dev/null'/>
       <target dev='hdc' bus='ide'/>
       <readonly/>
     </disk>
diff --git a/tests/xmlconfig-xml/misc-qemu-driver-type.xml b/tests/xmlconfig-xml/misc-qemu-driver-type.xml
index 65f00b5..a07a131 100644
--- a/tests/xmlconfig-xml/misc-qemu-driver-type.xml
+++ b/tests/xmlconfig-xml/misc-qemu-driver-type.xml
@@ -29,9 +29,9 @@
       <source dev='/iscsi-pool/diskvol1'/>
       <target dev='hdb' bus='ide'/>
     </disk>
-    <disk type='block' device='cdrom'>
+    <disk type='file' device='cdrom'>
       <driver name='qemu'/>
-      <source dev='/dev/loop0'/>
+      <source file='/dev/null'/>
       <target dev='hdc' bus='ide'/>
       <readonly/>
     </disk>
diff --git a/tests/xmlconfig-xml/misc-qemu-iso-disk.xml b/tests/xmlconfig-xml/misc-qemu-iso-disk.xml
index 1191320..e55ec35 100644
--- a/tests/xmlconfig-xml/misc-qemu-iso-disk.xml
+++ b/tests/xmlconfig-xml/misc-qemu-iso-disk.xml
@@ -24,9 +24,9 @@
       <source file='/dev/default-pool/iso-vol'/>
       <target dev='hda' bus='ide'/>
     </disk>
-    <disk type='block' device='cdrom'>
+    <disk type='file' device='cdrom'>
       <driver name='qemu'/>
-      <source dev='/dev/loop0'/>
+      <source file='/dev/null'/>
       <target dev='hdc' bus='ide'/>
       <readonly/>
     </disk>
diff --git a/tests/xmlconfig-xml/misc-xml-escaping.xml b/tests/xmlconfig-xml/misc-xml-escaping.xml
index 7dd9cd0..9ace6b5 100644
--- a/tests/xmlconfig-xml/misc-xml-escaping.xml
+++ b/tests/xmlconfig-xml/misc-xml-escaping.xml
@@ -26,8 +26,8 @@
       <source file='/tmp/ISO&amp;&apos;&amp;s'/>
       <target dev='hda' bus='ide'/>
     </disk>
-    <disk type='block' device='cdrom'>
-      <source dev='/dev/loop0'/>
+    <disk type='file' device='cdrom'>
+      <source file='/dev/null'/>
       <target dev='hdc' bus='ide'/>
       <readonly/>
     </disk>
diff --git a/tests/xmlconfig-xml/rhel6-kvm-stage1.xml b/tests/xmlconfig-xml/rhel6-kvm-stage1.xml
index 75afd3d..b80fbf5 100644
--- a/tests/xmlconfig-xml/rhel6-kvm-stage1.xml
+++ b/tests/xmlconfig-xml/rhel6-kvm-stage1.xml
@@ -29,9 +29,9 @@
       <source file='/dev/default-pool/rhel6.img'/>
       <target dev='vda' bus='virtio'/>
     </disk>
-    <disk type='block' device='disk'>
+    <disk type='file' device='disk'>
       <driver name='qemu'/>
-      <source dev='/dev/loop0'/>
+      <source file='/dev/null'/>
       <target dev='vdb' bus='virtio'/>
     </disk>
     <interface type='network'>
diff --git a/tests/xmlconfig-xml/rhel6-kvm-stage2.xml b/tests/xmlconfig-xml/rhel6-kvm-stage2.xml
index a679b5a..c436f80 100644
--- a/tests/xmlconfig-xml/rhel6-kvm-stage2.xml
+++ b/tests/xmlconfig-xml/rhel6-kvm-stage2.xml
@@ -27,9 +27,9 @@
       <source file='/dev/default-pool/rhel6.img'/>
       <target dev='vda' bus='virtio'/>
     </disk>
-    <disk type='block' device='disk'>
+    <disk type='file' device='disk'>
       <driver name='qemu'/>
-      <source dev='/dev/loop0'/>
+      <source file='/dev/null'/>
       <target dev='vdb' bus='virtio'/>
     </disk>
     <interface type='network'>
diff --git a/tests/xmlconfig-xml/winxp-kvm-stage1.xml b/tests/xmlconfig-xml/winxp-kvm-stage1.xml
index b4a84ac..e82f100 100644
--- a/tests/xmlconfig-xml/winxp-kvm-stage1.xml
+++ b/tests/xmlconfig-xml/winxp-kvm-stage1.xml
@@ -23,14 +23,14 @@
       <source file='/dev/default-pool/winxp.img'/>
       <target dev='hda' bus='ide'/>
     </disk>
-    <disk type='block' device='disk'>
+    <disk type='file' device='disk'>
       <driver name='qemu'/>
-      <source dev='/dev/loop0'/>
+      <source file='/dev/null'/>
       <target dev='hdb' bus='ide'/>
     </disk>
-    <disk type='block' device='cdrom'>
+    <disk type='file' device='cdrom'>
       <driver name='qemu'/>
-      <source dev='/dev/loop0'/>
+      <source file='/dev/null'/>
       <target dev='hdc' bus='ide'/>
       <readonly/>
     </disk>
diff --git a/tests/xmlconfig-xml/winxp-kvm-stage2.xml b/tests/xmlconfig-xml/winxp-kvm-stage2.xml
index b858c29..e29f6d4 100644
--- a/tests/xmlconfig-xml/winxp-kvm-stage2.xml
+++ b/tests/xmlconfig-xml/winxp-kvm-stage2.xml
@@ -22,14 +22,14 @@
       <source file='/dev/default-pool/winxp.img'/>
       <target dev='hda' bus='ide'/>
     </disk>
-    <disk type='block' device='disk'>
+    <disk type='file' device='disk'>
       <driver name='qemu'/>
-      <source dev='/dev/loop0'/>
+      <source file='/dev/null'/>
       <target dev='hdb' bus='ide'/>
     </disk>
-    <disk type='block' device='cdrom'>
+    <disk type='file' device='cdrom'>
       <driver name='qemu'/>
-      <source dev='/dev/loop0'/>
+      <source file='/dev/null'/>
       <target dev='hdc' bus='ide'/>
       <readonly/>
     </disk>
diff --git a/tests/xmlconfig-xml/winxp-kvm-stage3.xml b/tests/xmlconfig-xml/winxp-kvm-stage3.xml
index a926a0f..ef3d1ce 100644
--- a/tests/xmlconfig-xml/winxp-kvm-stage3.xml
+++ b/tests/xmlconfig-xml/winxp-kvm-stage3.xml
@@ -22,14 +22,14 @@
       <source file='/dev/default-pool/winxp.img'/>
       <target dev='hda' bus='ide'/>
     </disk>
-    <disk type='block' device='disk'>
+    <disk type='file' device='disk'>
       <driver name='qemu'/>
-      <source dev='/dev/loop0'/>
+      <source file='/dev/null'/>
       <target dev='hdb' bus='ide'/>
     </disk>
-    <disk type='block' device='cdrom'>
+    <disk type='file' device='cdrom'>
       <driver name='qemu'/>
-      <source dev='/dev/loop0'/>
+      <source file='/dev/null'/>
       <target dev='hdc' bus='ide'/>
       <readonly/>
     </disk>
diff --git a/tests/xmlconfig.py b/tests/xmlconfig.py
index e691130..8c0179f 100644
--- a/tests/xmlconfig.py
+++ b/tests/xmlconfig.py
@@ -546,10 +546,10 @@ class TestXMLConfig(unittest.TestCase):

         g.add_device(utils.get_filedisk())
         g.add_device(utils.get_blkdisk())
-        g.add_device(VirtualDisk(conn=g.conn, path="/dev/loop0",
+        g.add_device(VirtualDisk(conn=g.conn, path="/dev/null",
                                    device=VirtualDisk.DEVICE_CDROM,
                                    driverType="raw"))
-        g.add_device(VirtualDisk(conn=g.conn, path="/dev/loop0",
+        g.add_device(VirtualDisk(conn=g.conn, path="/dev/null",
                                    device=VirtualDisk.DEVICE_DISK,
                                    driverName="qemu", format="qcow2"))
         g.add_device(VirtualDisk(conn=g.conn, path=None,
@@ -557,10 +557,10 @@ class TestXMLConfig(unittest.TestCase):
                                    bus="scsi"))
         g.add_device(VirtualDisk(conn=g.conn, path=None,
                                    device=VirtualDisk.DEVICE_FLOPPY))
-        g.add_device(VirtualDisk(conn=g.conn, path="/dev/loop0",
+        g.add_device(VirtualDisk(conn=g.conn, path="/dev/null",
                                    device=VirtualDisk.DEVICE_FLOPPY,
                                    driverName="phy", driverCache="none"))
-        disk = VirtualDisk(conn=g.conn, path="/dev/loop0",
+        disk = VirtualDisk(conn=g.conn, path="/dev/null",
                            bus="virtio", driverName="qemu",
                            driverType="qcow2", driverCache="none")
         disk.driver_io = "threads"
@@ -694,9 +694,9 @@ class TestXMLConfig(unittest.TestCase):
         g.add_device(VirtualAudio("es1370", conn=g.conn))

         # Disk devices
-        g.add_device(VirtualDisk(conn=g.conn, path="/dev/loop0",
+        g.add_device(VirtualDisk(conn=g.conn, path="/dev/null",
                                    device=VirtualDisk.DEVICE_FLOPPY))
-        g.add_device(VirtualDisk(conn=g.conn, path="/dev/loop0",
+        g.add_device(VirtualDisk(conn=g.conn, path="/dev/null",
                                    bus="scsi"))
         g.add_device(VirtualDisk(conn=g.conn, path="/tmp", device="floppy"))
         d3 = VirtualDisk(conn=g.conn, path="/dev/default-pool/testvol1.img",
diff --git a/tests/xmlparse-xml/add-devices-in.xml b/tests/xmlparse-xml/add-devices-in.xml
index 9e225f0..b84c3bd 100644
--- a/tests/xmlparse-xml/add-devices-in.xml
+++ b/tests/xmlparse-xml/add-devices-in.xml
@@ -29,7 +29,7 @@
     </disk>
     <disk type="block" device="disk">
       <driver name="qemu"/>
-      <source dev="/dev/loop0"/>
+      <source dev="/dev/null"/>
       <target dev="vdb" bus="virtio"/>
     </disk>
     <disk type="block" device="cdrom">
diff --git a/tests/xmlparse-xml/change-boot-kernel-in.xml b/tests/xmlparse-xml/change-boot-kernel-in.xml
index 7abd3b5..ffbc280 100644
--- a/tests/xmlparse-xml/change-boot-kernel-in.xml
+++ b/tests/xmlparse-xml/change-boot-kernel-in.xml
@@ -15,7 +15,7 @@
   <vcpu>5</vcpu>
   <devices>
     <disk type="block" device="disk">
-      <source dev="/dev/loop0"/>
+      <source dev="/dev/null"/>
       <target dev="xvda" bus="xen"/>
     </disk>
     <input type="mouse" bus="xen"/>
diff --git a/tests/xmlparse-xml/change-boot-kernel-out.xml b/tests/xmlparse-xml/change-boot-kernel-out.xml
index 7e8d137..b66c708 100644
--- a/tests/xmlparse-xml/change-boot-kernel-out.xml
+++ b/tests/xmlparse-xml/change-boot-kernel-out.xml
@@ -15,7 +15,7 @@
   <vcpu>5</vcpu>
   <devices>
     <disk type="block" device="disk">
-      <source dev="/dev/loop0"/>
+      <source dev="/dev/null"/>
       <target dev="xvda" bus="xen"/>
     </disk>
     <input type="mouse" bus="xen"/>
diff --git a/tests/xmlparse-xml/change-disk-in.xml b/tests/xmlparse-xml/change-disk-in.xml
index b2ebfab..885e296 100644
--- a/tests/xmlparse-xml/change-disk-in.xml
+++ b/tests/xmlparse-xml/change-disk-in.xml
@@ -29,7 +29,7 @@
     </disk>
     <disk type="block" device="cdrom">
       <driver type="raw"/>
-      <source dev="/dev/loop0"/>
+      <source file="/dev/zero"/>
       <target dev="hdc" bus="ide"/>
       <driver name='phy' error_policy='stop'/>
       <readonly/>
diff --git a/tests/xmlparse-xml/change-disk-out.xml b/tests/xmlparse-xml/change-disk-out.xml
index ebccd57..c59881b 100644
--- a/tests/xmlparse-xml/change-disk-out.xml
+++ b/tests/xmlparse-xml/change-disk-out.xml
@@ -28,7 +28,7 @@
       <source dev="/dev/loop0"/>
       <target dev="hdb" bus="ide"/>
     </disk>
-    <disk type="block" device="floppy">
+    <disk type="file" device="floppy">
       <target dev="fde" bus="fdc"/>
     </disk>
     <disk type="block" device="disk">
diff --git a/tests/xmlparse-xml/change-filesystems-in.xml b/tests/xmlparse-xml/change-filesystems-in.xml
index f0d5a1a..bd1b5ca 100644
--- a/tests/xmlparse-xml/change-filesystems-in.xml
+++ b/tests/xmlparse-xml/change-filesystems-in.xml
@@ -20,7 +20,7 @@
   <devices>
     <emulator>/usr/lib/xen/bin/qemu-dm</emulator>
     <disk type="block" device="floppy">
-      <source dev="/dev/loop0"/>
+      <source dev="/dev/null"/>
       <target dev="fda" bus="fdc"/>
     </disk>
     <filesystem>
diff --git a/tests/xmlparse-xml/change-filesystems-out.xml b/tests/xmlparse-xml/change-filesystems-out.xml
index 6d0c00c..2329792 100644
--- a/tests/xmlparse-xml/change-filesystems-out.xml
+++ b/tests/xmlparse-xml/change-filesystems-out.xml
@@ -20,7 +20,7 @@
   <devices>
     <emulator>/usr/lib/xen/bin/qemu-dm</emulator>
     <disk type="block" device="floppy">
-      <source dev="/dev/loop0"/>
+      <source dev="/dev/null"/>
       <target dev="fda" bus="fdc"/>
     </disk>
     <filesystem type="mount" accessmode="passthrough">
diff --git a/tests/xmlparse-xml/change-graphics-in.xml b/tests/xmlparse-xml/change-graphics-in.xml
index 6d44ec5..7d0bd72 100644
--- a/tests/xmlparse-xml/change-graphics-in.xml
+++ b/tests/xmlparse-xml/change-graphics-in.xml
@@ -20,7 +20,7 @@
   <devices>
     <emulator>/usr/lib/xen/bin/qemu-dm</emulator>
     <disk type="block" device="floppy">
-      <source dev="/dev/loop0"/>
+      <source dev="/dev/null"/>
       <target dev="fda" bus="fdc"/>
     </disk>
     <graphics type="vnc" passwd="foobar" port="100" listen="0.0.0.0"/>
diff --git a/tests/xmlparse-xml/change-graphics-out.xml b/tests/xmlparse-xml/change-graphics-out.xml
index 3acf093..7975f17 100644
--- a/tests/xmlparse-xml/change-graphics-out.xml
+++ b/tests/xmlparse-xml/change-graphics-out.xml
@@ -20,7 +20,7 @@
   <devices>
     <emulator>/usr/lib/xen/bin/qemu-dm</emulator>
     <disk type="block" device="floppy">
-      <source dev="/dev/loop0"/>
+      <source dev="/dev/null"/>
       <target dev="fda" bus="fdc"/>
     </disk>
     <graphics type="vnc" passwd="newpass" port="6000" listen="1.2.3.4"/>
diff --git a/tests/xmlparse-xml/change-guest-in.xml b/tests/xmlparse-xml/change-guest-in.xml
index ab56c03..650ee31 100644
--- a/tests/xmlparse-xml/change-guest-in.xml
+++ b/tests/xmlparse-xml/change-guest-in.xml
@@ -39,7 +39,7 @@
     </disk>
     <disk type="block" device="disk">
       <driver name="qemu"/>
-      <source dev="/dev/loop0"/>
+      <source dev="/dev/null"/>
       <target dev="vdb" bus="virtio"/>
     </disk>
     <disk type="block" device="cdrom">
diff --git a/tests/xmlparse-xml/change-guest-out.xml b/tests/xmlparse-xml/change-guest-out.xml
index c0d3e72..015f811 100644
--- a/tests/xmlparse-xml/change-guest-out.xml
+++ b/tests/xmlparse-xml/change-guest-out.xml
@@ -42,7 +42,7 @@
     </disk>
     <disk type="block" device="disk">
       <driver name="qemu"/>
-      <source dev="/dev/loop0"/>
+      <source dev="/dev/null"/>
       <target dev="vdb" bus="virtio"/>
     </disk>
     <disk type="block" device="cdrom">
diff --git a/tests/xmlparse-xml/change-smartcard-in.xml b/tests/xmlparse-xml/change-smartcard-in.xml
index 5033e8e..c07010c 100644
--- a/tests/xmlparse-xml/change-smartcard-in.xml
+++ b/tests/xmlparse-xml/change-smartcard-in.xml
@@ -36,7 +36,7 @@
     </disk>
     <disk type='block' device='disk'>
       <driver name='qemu'/>
-      <source dev='/dev/loop0'/>
+      <source dev='/dev/null'/>
       <target dev='vdb' bus='virtio'/>
     </disk>
     <disk type='block' device='cdrom'>
diff --git a/tests/xmlparse-xml/change-smartcard-out.xml b/tests/xmlparse-xml/change-smartcard-out.xml
index 72305af..d733f55 100644
--- a/tests/xmlparse-xml/change-smartcard-out.xml
+++ b/tests/xmlparse-xml/change-smartcard-out.xml
@@ -36,7 +36,7 @@
     </disk>
     <disk type="block" device="disk">
       <driver name="qemu"/>
-      <source dev="/dev/loop0"/>
+      <source dev="/dev/null"/>
       <target dev="vdb" bus="virtio"/>
     </disk>
     <disk type="block" device="cdrom">
diff --git a/tests/xmlparse-xml/change-sounds-in.xml b/tests/xmlparse-xml/change-sounds-in.xml
index 001c50b..dc5365d 100644
--- a/tests/xmlparse-xml/change-sounds-in.xml
+++ b/tests/xmlparse-xml/change-sounds-in.xml
@@ -20,7 +20,7 @@
   <devices>
     <emulator>/usr/lib/xen/bin/qemu-dm</emulator>
     <disk type="block" device="floppy">
-      <source dev="/dev/loop0"/>
+      <source dev="/dev/null"/>
       <target dev="fda" bus="fdc"/>
     </disk>
     <sound model="sb16"/>
diff --git a/tests/xmlparse-xml/change-sounds-out.xml b/tests/xmlparse-xml/change-sounds-out.xml
index 9d7dd4b..dfd9ddd 100644
--- a/tests/xmlparse-xml/change-sounds-out.xml
+++ b/tests/xmlparse-xml/change-sounds-out.xml
@@ -20,7 +20,7 @@
   <devices>
     <emulator>/usr/lib/xen/bin/qemu-dm</emulator>
     <disk type="block" device="floppy">
-      <source dev="/dev/loop0"/>
+      <source dev="/dev/null"/>
       <target dev="fda" bus="fdc"/>
     </disk>
     <sound model="ac97"/>
diff --git a/tests/xmlparse-xml/change-videos-in.xml b/tests/xmlparse-xml/change-videos-in.xml
index 76f8806..7dde768 100644
--- a/tests/xmlparse-xml/change-videos-in.xml
+++ b/tests/xmlparse-xml/change-videos-in.xml
@@ -20,7 +20,7 @@
   <devices>
     <emulator>/usr/lib/xen/bin/qemu-dm</emulator>
     <disk type="block" device="floppy">
-      <source dev="/dev/loop0"/>
+      <source dev="/dev/null"/>
       <target dev="fda" bus="fdc"/>
     </disk>
     <video>
diff --git a/tests/xmlparse-xml/change-videos-out.xml b/tests/xmlparse-xml/change-videos-out.xml
index 929862c..c11ffd3 100644
--- a/tests/xmlparse-xml/change-videos-out.xml
+++ b/tests/xmlparse-xml/change-videos-out.xml
@@ -20,7 +20,7 @@
   <devices>
     <emulator>/usr/lib/xen/bin/qemu-dm</emulator>
     <disk type="block" device="floppy">
-      <source dev="/dev/loop0"/>
+      <source dev="/dev/null"/>
       <target dev="fda" bus="fdc"/>
     </disk>
     <video>
diff --git a/tests/xmlparse-xml/change-watchdogs-in.xml b/tests/xmlparse-xml/change-watchdogs-in.xml
index e9ae34f..fb9bcd1 100644
--- a/tests/xmlparse-xml/change-watchdogs-in.xml
+++ b/tests/xmlparse-xml/change-watchdogs-in.xml
@@ -20,7 +20,7 @@
   <devices>
     <emulator>/usr/lib/xen/bin/qemu-dm</emulator>
     <disk type="block" device="floppy">
-      <source dev="/dev/loop0"/>
+      <source dev="/dev/null"/>
       <target dev="fda" bus="fdc"/>
     </disk>
     <watchdog model="ib700" action="none"/>
diff --git a/tests/xmlparse-xml/change-watchdogs-out.xml b/tests/xmlparse-xml/change-watchdogs-out.xml
index 58456dd..2b9622d 100644
--- a/tests/xmlparse-xml/change-watchdogs-out.xml
+++ b/tests/xmlparse-xml/change-watchdogs-out.xml
@@ -20,7 +20,7 @@
   <devices>
     <emulator>/usr/lib/xen/bin/qemu-dm</emulator>
     <disk type="block" device="floppy">
-      <source dev="/dev/loop0"/>
+      <source dev="/dev/null"/>
       <target dev="fda" bus="fdc"/>
     </disk>
     <watchdog model="i6300esb" action="poweroff"/>
diff --git a/tests/xmlparse.py b/tests/xmlparse.py
index e19bfdb..bc1f7d6 100644
--- a/tests/xmlparse.py
+++ b/tests/xmlparse.py
@@ -273,7 +273,7 @@ class XMLParseTest(unittest.TestCase):
         check("serial", "WD-WMAP9A966149", "frob")

         check = self._make_checker(disk2)
-        check("path", "/dev/loop0", None)
+        check("path", "/dev/zero", None)
         check("device", "cdrom", "floppy")
         check("read_only", True, False)
         check("target", None, "fde")
-- 
1.8.3.2