mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-01-10 01:18:03 +03:00
tests: move the storage pool under /dev.
The commit efab27afbf02743a3a2582e9a111eb1b7d985b26 in libvirt uses /dev/%s for logical pools, change the tests to accommodate it. (crobinso: additional fix to work with older libvirt)
This commit is contained in:
parent
7616077ebf
commit
4f63458050
@ -15,7 +15,7 @@
|
||||
<devices>
|
||||
<disk type='file' device='disk'>
|
||||
<target dev='hda' bus='ide'/>
|
||||
<source file='/default-pool/default-vol'/>
|
||||
<source file='/dev/default-pool/default-vol'/>
|
||||
</disk>
|
||||
<disk type='file' device='floppy'>
|
||||
<target dev='fda' bus='fdc'/>
|
||||
|
@ -21,12 +21,12 @@
|
||||
<emulator>/usr/lib/xen/bin/qemu-dm</emulator>
|
||||
<disk type="block" device="floppy">
|
||||
<driver type="vmdk"/>
|
||||
<source dev="/disk-pool/diskvol1-clone"/>
|
||||
<source dev="/dev/disk-pool/diskvol1-clone"/>
|
||||
<target dev="fda" bus="fdc"/>
|
||||
<address type="drive" controller="0" bus="0" target="0" unit="0"/>
|
||||
</disk>
|
||||
<disk type="block" device="disk">
|
||||
<source dev="/disk-pool/diskvol2"/>
|
||||
<source dev="/dev/disk-pool/diskvol2"/>
|
||||
<target dev="sda" bus="scsi"/>
|
||||
<readonly/>
|
||||
<address type="drive" controller="0" bus="0" target="0" unit="0"/>
|
||||
@ -38,19 +38,19 @@
|
||||
</disk>
|
||||
<disk type="block" device="disk">
|
||||
<driver type="qcow2"/>
|
||||
<source dev="/default-pool/collidevol1.img"/>
|
||||
<source dev="/dev/default-pool/collidevol1.img"/>
|
||||
<target dev="sdc" bus="scsi"/>
|
||||
<readonly/>
|
||||
<shareable/>
|
||||
<address type="drive" controller="0" bus="0" target="0" unit="2"/>
|
||||
</disk>
|
||||
<disk type="file" device="disk">
|
||||
<source file="/default-pool/default-vol-clone"/>
|
||||
<source file="/dev/default-pool/default-vol-clone"/>
|
||||
<target dev="hda" bus="ide"/>
|
||||
<address type="drive" controller="0" bus="0" target="0" unit="0"/>
|
||||
</disk>
|
||||
<disk type="file" device="disk">
|
||||
<source file="/default-pool/testvol2-clone.img"/>
|
||||
<source file="/dev/default-pool/testvol2-clone.img"/>
|
||||
<target dev="hdb" bus="ide"/>
|
||||
<address type="drive" controller="0" bus="0" target="0" unit="1"/>
|
||||
</disk>
|
||||
|
@ -20,7 +20,7 @@
|
||||
<devices>
|
||||
<emulator>/usr/lib/xen/bin/qemu-dm</emulator>
|
||||
<disk type="file" device="disk">
|
||||
<source file="/default-pool/newvm.img"/>
|
||||
<source file="/dev/default-pool/newvm.img"/>
|
||||
<target dev="hda" bus="ide"/>
|
||||
<address type="drive" controller="0" bus="0" target="0" unit="0"/>
|
||||
</disk>
|
||||
|
@ -26,7 +26,7 @@
|
||||
<emulator>/usr/bin/test-hv</emulator>
|
||||
<disk type="file" device="disk">
|
||||
<driver cache="writeback" io="threads"/>
|
||||
<source file="/default-pool/UPPER"/>
|
||||
<source file="/dev/default-pool/UPPER"/>
|
||||
<target dev="hda" bus="ide"/>
|
||||
<shareable/>
|
||||
<serial>WD-WMAP9A966149</serial>
|
||||
@ -114,7 +114,7 @@
|
||||
<emulator>/usr/bin/test-hv</emulator>
|
||||
<disk type="file" device="disk">
|
||||
<driver cache="writeback" io="threads"/>
|
||||
<source file="/default-pool/UPPER"/>
|
||||
<source file="/dev/default-pool/UPPER"/>
|
||||
<target dev="hda" bus="ide"/>
|
||||
<shareable/>
|
||||
<serial>WD-WMAP9A966149</serial>
|
||||
|
@ -113,14 +113,14 @@ test_files = {
|
||||
'VOL' : "testvol1.img",
|
||||
'DIR' : os.getcwd(),
|
||||
'TREEDIR' : treedir,
|
||||
'MANAGEDEXIST1' : "/default-pool/testvol1.img",
|
||||
'MANAGEDEXIST2' : "/default-pool/testvol2.img",
|
||||
'MANAGEDEXISTUPPER' : "/default-pool/UPPER",
|
||||
'MANAGEDNEW1' : "/default-pool/clonevol",
|
||||
'MANAGEDNEW2' : "/default-pool/clonevol",
|
||||
'MANAGEDDISKNEW1' : "/disk-pool/newvol1.img",
|
||||
'COLLIDE' : "/default-pool/collidevol1.img",
|
||||
'SHARE' : "/default-pool/sharevol.img",
|
||||
'MANAGEDEXIST1' : "/dev/default-pool/testvol1.img",
|
||||
'MANAGEDEXIST2' : "/dev/default-pool/testvol2.img",
|
||||
'MANAGEDEXISTUPPER' : "/dev/default-pool/UPPER",
|
||||
'MANAGEDNEW1' : "/dev/default-pool/clonevol",
|
||||
'MANAGEDNEW2' : "/dev/default-pool/clonevol",
|
||||
'MANAGEDDISKNEW1' : "/dev/disk-pool/newvol1.img",
|
||||
'COLLIDE' : "/dev/default-pool/collidevol1.img",
|
||||
'SHARE' : "/dev/default-pool/sharevol.img",
|
||||
|
||||
'VIRTCONV_OUT' : "%s/test.out" % virtconv_out,
|
||||
'VC_IMG1' : "%s/virtimage/test1.virt-image" % vcdir,
|
||||
@ -750,7 +750,7 @@ vclon.add_valid("misc", "-o test --auto-clone") # Auto flag, no storage
|
||||
vclon.add_valid("misc", "--original-xml %(CLONE_DISK_XML)s --auto-clone") # Auto flag w/ storage,
|
||||
vclon.add_valid("misc", "--original-xml %(CLONE_STORAGE_XML)s --auto-clone") # Auto flag w/ managed storage,
|
||||
vclon.add_valid("misc", "-o test-for-clone --auto-clone --clone-running") # Auto flag, actual VM, skip state check
|
||||
vclon.add_valid("misc", "-o test-clone-simple -n newvm --preserve-data --file /default-pool/default-vol --clone-running --force") # Preserve data shouldn't complain about existing volume
|
||||
vclon.add_valid("misc", "-o test-clone-simple -n newvm --preserve-data --file /dev/default-pool/default-vol --clone-running --force") # Preserve data shouldn't complain about existing volume
|
||||
vclon.add_invalid("misc", "--auto-clone# Auto flag, actual VM, without state skip ") # Just the auto flag
|
||||
vclon.add_invalid("misc", "-o test-for-clone --auto-clone")
|
||||
|
||||
|
@ -18,11 +18,11 @@
|
||||
<devices>
|
||||
<emulator>/usr/bin/qemu-kvm</emulator>
|
||||
<disk type='file' device='disk'>
|
||||
<source file='/default-pool/testvol1.img'/>
|
||||
<source file='/dev/default-pool/testvol1.img'/>
|
||||
<target dev='hda' bus='ide'/>
|
||||
</disk>
|
||||
<disk type='file' device='disk'>
|
||||
<source file='/default-pool/testvol2.img'/>
|
||||
<source file='/dev/default-pool/testvol2.img'/>
|
||||
<target dev='hdb' bus='ide'/>
|
||||
</disk>
|
||||
<interface type='network'>
|
||||
|
@ -18,11 +18,11 @@
|
||||
<devices>
|
||||
<emulator>/usr/bin/qemu-kvm</emulator>
|
||||
<disk type="file" device="disk">
|
||||
<source file="/cross-pool/new1.img"/>
|
||||
<source file="/dev/cross-pool/new1.img"/>
|
||||
<target dev="hda" bus="ide"/>
|
||||
</disk>
|
||||
<disk type="file" device="disk">
|
||||
<source file="/cross-pool/new2.img"/>
|
||||
<source file="/dev/cross-pool/new2.img"/>
|
||||
<target dev="hdb" bus="ide"/>
|
||||
</disk>
|
||||
<interface type="network">
|
||||
|
@ -19,7 +19,7 @@
|
||||
<emulator>/usr/bin/qemu-kvm</emulator>
|
||||
<disk type="block" device="disk">
|
||||
<target dev="hda" bus="ide"/>
|
||||
<source dev="/disk-pool/disk-vol1"/>
|
||||
<source dev="/dev/disk-pool/disk-vol1"/>
|
||||
</disk>
|
||||
<disk type="file" device="floppy">
|
||||
<target dev="fdb" bus="fdc"/>
|
||||
|
@ -18,7 +18,7 @@
|
||||
<devices>
|
||||
<emulator>/usr/bin/qemu-kvm</emulator>
|
||||
<disk type="file" device="disk">
|
||||
<source file="/default-pool/1234.img"/>
|
||||
<source file="/dev/default-pool/1234.img"/>
|
||||
<target dev="hda" bus="ide"/>
|
||||
</disk>
|
||||
<disk type="block" device="floppy">
|
||||
|
@ -19,7 +19,7 @@
|
||||
<emulator>/usr/bin/qemu-kvm</emulator>
|
||||
<disk type="block" device="disk">
|
||||
<target dev="hda" bus="ide"/>
|
||||
<source dev="/disk-pool/disk-vol1"/>
|
||||
<source dev="/dev/disk-pool/disk-vol1"/>
|
||||
</disk>
|
||||
<disk type="file" device="disk">
|
||||
<target dev="hdb" bus="ide"/>
|
||||
|
@ -19,11 +19,11 @@
|
||||
<emulator>/usr/bin/qemu-kvm</emulator>
|
||||
<disk type='file' device='disk'>
|
||||
<driver name="qemu" type="vmdk"/>
|
||||
<source file='/default-pool/testvol1.img'/>
|
||||
<source file='/dev/default-pool/testvol1.img'/>
|
||||
<target dev='hda' bus='ide'/>
|
||||
</disk>
|
||||
<disk type='block' device='disk'>
|
||||
<source dev='/disk-pool/diskvol1'/>
|
||||
<source dev='/dev/disk-pool/diskvol1'/>
|
||||
<target dev='hdb' bus='ide'/>
|
||||
</disk>
|
||||
<interface type='network'>
|
||||
|
@ -19,11 +19,11 @@
|
||||
<emulator>/usr/bin/qemu-kvm</emulator>
|
||||
<disk type="file" device="disk">
|
||||
<driver name="qemu" type="vmdk"/>
|
||||
<source file="/default-pool/new1.img"/>
|
||||
<source file="/dev/default-pool/new1.img"/>
|
||||
<target dev="hda" bus="ide"/>
|
||||
</disk>
|
||||
<disk type="block" device="disk">
|
||||
<source dev="/disk-pool/new2.img"/>
|
||||
<source dev="/dev/disk-pool/new2.img"/>
|
||||
<target dev="hdb" bus="ide"/>
|
||||
</disk>
|
||||
<interface type="network">
|
||||
|
@ -19,7 +19,7 @@
|
||||
<emulator>/usr/bin/qemu-kvm</emulator>
|
||||
<disk type="block" device="disk">
|
||||
<target dev="hda" bus="ide"/>
|
||||
<source dev="/disk-pool/disk-vol1"/>
|
||||
<source dev="/dev/disk-pool/disk-vol1"/>
|
||||
</disk>
|
||||
<disk type="file" device="disk">
|
||||
<source file="/tmp/virtinst-test1.img"/>
|
||||
|
@ -29,7 +29,7 @@
|
||||
<readonly/>
|
||||
</disk>
|
||||
<disk type="file" device="disk">
|
||||
<source file="/default-pool/1234.img"/>
|
||||
<source file="/dev/default-pool/1234.img"/>
|
||||
<target dev="sdb" bus="scsi"/>
|
||||
</disk>
|
||||
<interface type="network">
|
||||
|
@ -28,14 +28,14 @@ CLONE_NAME = "clone-new"
|
||||
# Create some files to use as test images
|
||||
FILE1 = "/tmp/virtinst-test1.img"
|
||||
FILE2 = "/tmp/virtinst-test2.img"
|
||||
P1_VOL1 = "/default-pool/testvol1.img"
|
||||
P1_VOL2 = "/default-pool/testvol2.img"
|
||||
P2_VOL1 = "/cross-pool/testvol1.img"
|
||||
P2_VOL2 = "/cross-pool/testvol2.img"
|
||||
P1_VOL1 = "/dev/default-pool/testvol1.img"
|
||||
P1_VOL2 = "/dev/default-pool/testvol2.img"
|
||||
P2_VOL1 = "/dev/cross-pool/testvol1.img"
|
||||
P2_VOL2 = "/dev/cross-pool/testvol2.img"
|
||||
|
||||
POOL1 = "/default-pool"
|
||||
POOL2 = "/cross-pool"
|
||||
DISKPOOL = "/disk-pool"
|
||||
POOL1 = "/dev/default-pool"
|
||||
POOL2 = "/dev/cross-pool"
|
||||
DISKPOOL = "/dev/disk-pool"
|
||||
|
||||
local_files = [FILE1, FILE2]
|
||||
|
||||
@ -92,7 +92,7 @@ class TestClone(unittest.TestCase):
|
||||
cloneobj.clone_macs = ["22:23:45:67:89:00", "22:23:45:67:89:01"]
|
||||
|
||||
if disks is None:
|
||||
disks = ["/disk-pool/disk-vol1", "/tmp/clone2.img",
|
||||
disks = ["/dev/disk-pool/disk-vol1", "/tmp/clone2.img",
|
||||
"/tmp/clone3.img", "/tmp/clone4.img",
|
||||
"/tmp/clone5.img", None]
|
||||
|
||||
@ -179,14 +179,14 @@ class TestClone(unittest.TestCase):
|
||||
def testCloneStorageForce(self):
|
||||
base = "force"
|
||||
self._clone_helper(base,
|
||||
disks=["/default-pool/1234.img",
|
||||
disks=["/dev/default-pool/1234.img",
|
||||
None, "/tmp/clone2.img"],
|
||||
force_list=["hda", "fdb", "sdb"])
|
||||
|
||||
def testCloneStorageSkip(self):
|
||||
base = "skip"
|
||||
self._clone_helper(base,
|
||||
disks=["/default-pool/1234.img",
|
||||
disks=["/dev/default-pool/1234.img",
|
||||
None, "/tmp/clone2.img"],
|
||||
skip_list=["hda", "fdb"])
|
||||
|
||||
@ -203,9 +203,9 @@ class TestClone(unittest.TestCase):
|
||||
def testCloneManagedToUnmanaged(self):
|
||||
base = "managed-storage"
|
||||
|
||||
# We are trying to clone from a pool (/default-pool) to unmanaged
|
||||
# We are trying to clone from a pool (/dev/default-pool) to unmanaged
|
||||
# storage. For this case, the cloning needs to fail back to manual
|
||||
# operation (no libvirt calls), but since /default-pool doesn't exist,
|
||||
# operation (no libvirt calls), but since /dev/default-pool doesn't exist,
|
||||
# this should fail.
|
||||
try:
|
||||
self._clone_helper(base, ["/tmp/new1.img", "/tmp/new2.img"],
|
||||
|
@ -1,13 +1,13 @@
|
||||
<?xml version="1.0"?>
|
||||
<volume>
|
||||
<name>pool-logical-volclone</name>
|
||||
<key>/some/target/path/pool-logical-vol</key>
|
||||
<key>/dev/pool-logical/pool-logical-vol</key>
|
||||
<source>
|
||||
</source>
|
||||
<capacity unit="bytes">10737418240</capacity>
|
||||
<allocation unit="bytes">10737418240</allocation>
|
||||
<target>
|
||||
<path>/some/target/path/pool-logical-vol</path>
|
||||
<path>/dev/pool-logical/pool-logical-vol</path>
|
||||
<permissions>
|
||||
<mode>0700</mode>
|
||||
<owner>10736</owner>
|
||||
|
@ -6,6 +6,6 @@
|
||||
<name>pool-logical</name>
|
||||
</source>
|
||||
<target>
|
||||
<path>/some/target/path</path>
|
||||
<path>/dev/pool-logical</path>
|
||||
</target>
|
||||
</pool>
|
||||
|
@ -158,7 +158,8 @@ class TestStorage(unittest.TestCase):
|
||||
|
||||
def testLVPool(self):
|
||||
poolobj = createPool(self.conn, StoragePool.TYPE_LOGICAL,
|
||||
"pool-logical")
|
||||
"pool-logical",
|
||||
target_path="/dev/pool-logical")
|
||||
invol = createVol(self.conn, poolobj)
|
||||
createVol(self.conn, poolobj,
|
||||
volname=invol.name() + "input", input_vol=invol)
|
||||
|
@ -323,7 +323,7 @@
|
||||
<devices>
|
||||
<emulator>/usr/lib/xen/bin/qemu-dm</emulator>
|
||||
<disk type='file' device='disk'>
|
||||
<source file='/default-pool/default-vol'/>
|
||||
<source file='/dev/default-pool/default-vol'/>
|
||||
<target dev='hda' bus='ide'/>
|
||||
</disk>
|
||||
<interface type='network'>
|
||||
@ -367,7 +367,7 @@
|
||||
<devices>
|
||||
<emulator>/usr/lib/xen/bin/qemu-dm</emulator>
|
||||
<disk type='file' device='disk'>
|
||||
<source file='/default-pool/test-clone-simple.img'/>
|
||||
<source file='/dev/default-pool/test-clone-simple.img'/>
|
||||
<target dev='hda' bus='ide'/>
|
||||
</disk>
|
||||
<interface type='user'>
|
||||
@ -401,12 +401,12 @@
|
||||
<devices>
|
||||
<emulator>/usr/lib/xen/bin/qemu-dm</emulator>
|
||||
<disk type='block' device='floppy'>
|
||||
<source dev='/disk-pool/diskvol1'/>
|
||||
<source dev='/dev/disk-pool/diskvol1'/>
|
||||
<target dev='fda' bus='fdc'/>
|
||||
<driver type="vmdk"/>
|
||||
</disk>
|
||||
<disk type='block' device='disk'>
|
||||
<source dev='/disk-pool/diskvol2'/>
|
||||
<source dev='/dev/disk-pool/diskvol2'/>
|
||||
<target dev='sda' bus='scsi'/>
|
||||
<readonly/>
|
||||
</disk>
|
||||
@ -414,18 +414,18 @@
|
||||
<target dev='sdb' bus='scsi'/>
|
||||
</disk>
|
||||
<disk type='block' device='disk'>
|
||||
<source dev='/default-pool/collidevol1.img'/>
|
||||
<source dev='/dev/default-pool/collidevol1.img'/>
|
||||
<target dev='sdc' bus='scsi'/>
|
||||
<driver type="qcow2"/>
|
||||
<readonly/>
|
||||
<shareable/>
|
||||
</disk>
|
||||
<disk type='file' device='disk'>
|
||||
<source file='/default-pool/default-vol'/>
|
||||
<source file='/dev/default-pool/default-vol'/>
|
||||
<target dev='hda' bus='ide'/>
|
||||
</disk>
|
||||
<disk type='file' device='disk'>
|
||||
<source file='/default-pool/testvol2.img'/>
|
||||
<source file='/dev/default-pool/testvol2.img'/>
|
||||
<target dev='hdb' bus='ide'/>
|
||||
</disk>
|
||||
<interface type='network'>
|
||||
@ -757,7 +757,7 @@
|
||||
<source>
|
||||
</source>
|
||||
<target>
|
||||
<path>/default-pool</path>
|
||||
<path>/dev/default-pool</path>
|
||||
<permissions>
|
||||
<mode>0700</mode>
|
||||
<owner>10736</owner>
|
||||
@ -955,7 +955,7 @@
|
||||
<source>
|
||||
</source>
|
||||
<target>
|
||||
<path>/cross-pool</path>
|
||||
<path>/dev/cross-pool</path>
|
||||
<permissions>
|
||||
<mode>0700</mode>
|
||||
<owner>10736</owner>
|
||||
@ -1074,7 +1074,7 @@
|
||||
<source>
|
||||
</source>
|
||||
<target>
|
||||
<path>/disk-pool</path>
|
||||
<path>/dev/disk-pool</path>
|
||||
<permissions>
|
||||
<mode>0700</mode>
|
||||
<owner>10736</owner>
|
||||
|
@ -224,7 +224,7 @@ def make_import_installer():
|
||||
return virtinst.ImportInstaller(_conn)
|
||||
|
||||
|
||||
def make_distro_installer(location="/default-pool/default-vol"):
|
||||
def make_distro_installer(location="/dev/default-pool/default-vol"):
|
||||
inst = virtinst.DistroInstaller(_conn)
|
||||
inst.location = location
|
||||
return inst
|
||||
@ -255,7 +255,7 @@ def build_win_kvm(path=None, fake=True):
|
||||
|
||||
def get_floppy(path=None):
|
||||
if not path:
|
||||
path = "/default-pool/testvol1.img"
|
||||
path = "/dev/default-pool/testvol1.img"
|
||||
d = VirtualDisk(_conn)
|
||||
d.path = path
|
||||
d.device = d.DEVICE_FLOPPY
|
||||
|
@ -37,7 +37,7 @@
|
||||
</disk>
|
||||
<disk type="file" device="disk">
|
||||
<driver name="qemu" type="qcow2"/>
|
||||
<source file="/default-pool/testvol1.img"/>
|
||||
<source file="/dev/default-pool/testvol1.img"/>
|
||||
<target dev="sdb" bus="scsi"/>
|
||||
<address type="spapr-vio"/>
|
||||
</disk>
|
||||
|
@ -20,7 +20,7 @@
|
||||
<emulator>/usr/lib/xen/bin/qemu-dm</emulator>
|
||||
<disk type="file" device="floppy">
|
||||
<driver name="qemu" type="qcow2"/>
|
||||
<source file="/default-pool/testvol1.img"/>
|
||||
<source file="/dev/default-pool/testvol1.img"/>
|
||||
<target dev="fda" bus="fdc"/>
|
||||
</disk>
|
||||
<disk type="file" device="disk">
|
||||
|
@ -20,7 +20,7 @@
|
||||
<emulator>/usr/lib/xen/bin/qemu-dm</emulator>
|
||||
<disk type="file" device="floppy">
|
||||
<driver name="qemu" type="qcow2"/>
|
||||
<source file="/default-pool/testvol1.img"/>
|
||||
<source file="/dev/default-pool/testvol1.img"/>
|
||||
<target dev="fda" bus="fdc"/>
|
||||
</disk>
|
||||
<disk type="file" device="disk">
|
||||
|
@ -20,7 +20,7 @@
|
||||
<emulator>/usr/lib/xen/bin/qemu-dm</emulator>
|
||||
<disk type="file" device="floppy">
|
||||
<driver name="qemu" type="qcow2"/>
|
||||
<source file="/default-pool/testvol1.img"/>
|
||||
<source file="/dev/default-pool/testvol1.img"/>
|
||||
<target dev="fda" bus="fdc"/>
|
||||
</disk>
|
||||
<disk type="file" device="disk">
|
||||
|
@ -20,7 +20,7 @@
|
||||
<emulator>/usr/lib/xen/bin/qemu-dm</emulator>
|
||||
<disk type="file" device="floppy">
|
||||
<driver name="qemu" type="qcow2" cache="none"/>
|
||||
<source file="/default-pool/testvol1.img"/>
|
||||
<source file="/dev/default-pool/testvol1.img"/>
|
||||
<target dev="fda" bus="fdc"/>
|
||||
</disk>
|
||||
<disk type="file" device="disk">
|
||||
|
@ -20,7 +20,7 @@
|
||||
<devices>
|
||||
<emulator>/usr/lib/xen/bin/qemu-dm</emulator>
|
||||
<disk type="file" device="floppy">
|
||||
<source file="/default-pool/testvol1.img"/>
|
||||
<source file="/dev/default-pool/testvol1.img"/>
|
||||
<target dev="fda" bus="fdc"/>
|
||||
</disk>
|
||||
<disk type="file" device="disk">
|
||||
|
@ -20,7 +20,7 @@
|
||||
<emulator>/usr/lib/xen/bin/qemu-dm</emulator>
|
||||
<disk type="file" device="floppy">
|
||||
<driver name="qemu" type="qcow2"/>
|
||||
<source file="/default-pool/testvol1.img"/>
|
||||
<source file="/dev/default-pool/testvol1.img"/>
|
||||
<target dev="fda" bus="fdc"/>
|
||||
</disk>
|
||||
<disk type="file" device="disk">
|
||||
|
@ -22,7 +22,7 @@
|
||||
<emulator>/usr/lib/xen/bin/qemu-dm</emulator>
|
||||
<disk type="file" device="disk">
|
||||
<driver name="qemu" type="qcow2"/>
|
||||
<source file="/default-pool/iso-vol"/>
|
||||
<source file="/dev/default-pool/iso-vol"/>
|
||||
<target dev="hda" bus="ide"/>
|
||||
</disk>
|
||||
<disk type="block" device="cdrom">
|
||||
|
@ -22,7 +22,7 @@
|
||||
<emulator>/usr/lib/xen/bin/qemu-dm</emulator>
|
||||
<disk type="file" device="disk">
|
||||
<driver name="qemu" type="raw"/>
|
||||
<source file="/default-pool/iso-vol"/>
|
||||
<source file="/dev/default-pool/iso-vol"/>
|
||||
<target dev="hda" bus="ide"/>
|
||||
</disk>
|
||||
<disk type="block" device="cdrom">
|
||||
|
@ -22,12 +22,12 @@
|
||||
<emulator>/usr/lib/xen/bin/qemu-dm</emulator>
|
||||
<disk type="file" device="floppy">
|
||||
<driver name="qemu" type="qcow2"/>
|
||||
<source file="/default-pool/testvol1.img"/>
|
||||
<source file="/dev/default-pool/testvol1.img"/>
|
||||
<target dev="fda" bus="fdc"/>
|
||||
</disk>
|
||||
<disk type="file" device="disk">
|
||||
<driver name="qemu" type="raw"/>
|
||||
<source file="/default-pool/rhel6.img"/>
|
||||
<source file="/dev/default-pool/rhel6.img"/>
|
||||
<target dev="vda" bus="virtio"/>
|
||||
</disk>
|
||||
<disk type="block" device="disk">
|
||||
|
@ -20,12 +20,12 @@
|
||||
<emulator>/usr/lib/xen/bin/qemu-dm</emulator>
|
||||
<disk type="file" device="floppy">
|
||||
<driver name="qemu" type="qcow2"/>
|
||||
<source file="/default-pool/testvol1.img"/>
|
||||
<source file="/dev/default-pool/testvol1.img"/>
|
||||
<target dev="fda" bus="fdc"/>
|
||||
</disk>
|
||||
<disk type="file" device="disk">
|
||||
<driver name="qemu" type="raw"/>
|
||||
<source file="/default-pool/rhel6.img"/>
|
||||
<source file="/dev/default-pool/rhel6.img"/>
|
||||
<target dev="vda" bus="virtio"/>
|
||||
</disk>
|
||||
<disk type="block" device="disk">
|
||||
|
@ -21,7 +21,7 @@
|
||||
<emulator>/usr/lib/xen/bin/qemu-dm</emulator>
|
||||
<disk type="file" device="disk">
|
||||
<driver name="qemu" type="raw"/>
|
||||
<source file="/default-pool/winxp.img"/>
|
||||
<source file="/dev/default-pool/winxp.img"/>
|
||||
<target dev="hda" bus="ide"/>
|
||||
</disk>
|
||||
<disk type="block" device="disk">
|
||||
|
@ -20,7 +20,7 @@
|
||||
<emulator>/usr/lib/xen/bin/qemu-dm</emulator>
|
||||
<disk type="file" device="disk">
|
||||
<driver name="qemu" type="raw"/>
|
||||
<source file="/default-pool/winxp.img"/>
|
||||
<source file="/dev/default-pool/winxp.img"/>
|
||||
<target dev="hda" bus="ide"/>
|
||||
</disk>
|
||||
<disk type="block" device="disk">
|
||||
|
@ -20,7 +20,7 @@
|
||||
<emulator>/usr/lib/xen/bin/qemu-dm</emulator>
|
||||
<disk type="file" device="disk">
|
||||
<driver name="qemu" type="raw"/>
|
||||
<source file="/default-pool/winxp.img"/>
|
||||
<source file="/dev/default-pool/winxp.img"/>
|
||||
<target dev="hda" bus="ide"/>
|
||||
</disk>
|
||||
<disk type="block" device="disk">
|
||||
|
@ -372,11 +372,11 @@ class TestXMLConfig(unittest.TestCase):
|
||||
self._compare(g, "misc-qemu-driver-type", True)
|
||||
|
||||
g = utils.get_basic_fullyvirt_guest()
|
||||
g.add_device(utils.get_filedisk("/default-pool/iso-vol"))
|
||||
g.add_device(utils.get_filedisk("/dev/default-pool/iso-vol"))
|
||||
self._compare(g, "misc-qemu-iso-disk", True)
|
||||
|
||||
g = utils.get_basic_fullyvirt_guest()
|
||||
g.add_device(utils.get_filedisk("/default-pool/iso-vol"))
|
||||
g.add_device(utils.get_filedisk("/dev/default-pool/iso-vol"))
|
||||
g.get_devices("disk")[0].driver_type = "qcow2"
|
||||
self._compare(g, "misc-qemu-driver-overwrite", True)
|
||||
|
||||
@ -483,17 +483,17 @@ class TestXMLConfig(unittest.TestCase):
|
||||
|
||||
def testInstallWindowsKVM(self):
|
||||
utils.set_conn(_plainkvm)
|
||||
g = utils.build_win_kvm("/default-pool/winxp.img")
|
||||
g = utils.build_win_kvm("/dev/default-pool/winxp.img")
|
||||
self._compare(g, "winxp-kvm-stage1", True)
|
||||
|
||||
def testContinueWindowsKVM(self):
|
||||
utils.set_conn(_plainkvm)
|
||||
g = utils.build_win_kvm("/default-pool/winxp.img")
|
||||
g = utils.build_win_kvm("/dev/default-pool/winxp.img")
|
||||
self._compare(g, "winxp-kvm-stage2", True, True)
|
||||
|
||||
def testBootWindowsKVM(self):
|
||||
utils.set_conn(_plainkvm)
|
||||
g = utils.build_win_kvm("/default-pool/winxp.img")
|
||||
g = utils.build_win_kvm("/dev/default-pool/winxp.img")
|
||||
self._compare(g, "winxp-kvm-stage3", False)
|
||||
|
||||
|
||||
@ -737,7 +737,7 @@ class TestXMLConfig(unittest.TestCase):
|
||||
g.add_device(d)
|
||||
|
||||
d = VirtualDisk(g.conn)
|
||||
d.path = "/default-pool/testvol1.img"
|
||||
d.path = "/dev/default-pool/testvol1.img"
|
||||
d.bus = "scsi"
|
||||
d.driver_name = "qemu"
|
||||
d.address.type = "spapr-vio"
|
||||
@ -921,7 +921,7 @@ class TestXMLConfig(unittest.TestCase):
|
||||
location="tests/cli-test-xml/fakerhel6tree")
|
||||
g = utils.get_basic_fullyvirt_guest("kvm", installer=i)
|
||||
g.add_device(utils.get_floppy())
|
||||
g.add_device(utils.get_filedisk("/default-pool/rhel6.img", fake=False))
|
||||
g.add_device(utils.get_filedisk("/dev/default-pool/rhel6.img", fake=False))
|
||||
g.add_device(utils.get_blkdisk())
|
||||
g.add_device(utils.get_virtual_network())
|
||||
g.add_device(VirtualAudio(g.conn))
|
||||
@ -932,7 +932,7 @@ class TestXMLConfig(unittest.TestCase):
|
||||
|
||||
def testFullKVMWinxp(self):
|
||||
utils.set_conn(_plainkvm)
|
||||
g = utils.build_win_kvm("/default-pool/winxp.img", fake=False)
|
||||
g = utils.build_win_kvm("/dev/default-pool/winxp.img", fake=False)
|
||||
self._testInstall(g, "winxp-kvm-stage1",
|
||||
"winxp-kvm-stage3", "winxp-kvm-stage2")
|
||||
|
||||
@ -1019,7 +1019,7 @@ class TestXMLConfig(unittest.TestCase):
|
||||
def testManyVirtio(self):
|
||||
d = VirtualDisk(utils.get_conn())
|
||||
d.bus = "virtio"
|
||||
d.path = "/default-pool/testvol1.img"
|
||||
d.path = "/dev/default-pool/testvol1.img"
|
||||
|
||||
targetlist = []
|
||||
for ignore in range(0, (26 * 2) + 1):
|
||||
|
@ -19,7 +19,7 @@
|
||||
<emulator>/usr/lib/xen/bin/qemu-dm</emulator>
|
||||
<disk type="file" device="floppy">
|
||||
<driver name="qemu" type="qcow2"/>
|
||||
<source file="/default-pool/testvol1.img"/>
|
||||
<source file="/dev/default-pool/testvol1.img"/>
|
||||
<target dev="fda" bus="fdc"/>
|
||||
</disk>
|
||||
<disk type="file" device="disk">
|
||||
|
@ -19,7 +19,7 @@
|
||||
<emulator>/usr/lib/xen/bin/qemu-dm</emulator>
|
||||
<disk type="file" device="floppy">
|
||||
<driver name="qemu" type="qcow2"/>
|
||||
<source file="/default-pool/testvol1.img"/>
|
||||
<source file="/dev/default-pool/testvol1.img"/>
|
||||
<target dev="fda" bus="fdc"/>
|
||||
</disk>
|
||||
<disk type="file" device="disk">
|
||||
|
@ -51,7 +51,7 @@
|
||||
<total_bytes_sec>6</total_bytes_sec>
|
||||
</iotune>
|
||||
<driver cache="writeback" io="native"/>
|
||||
<source file="/default-pool/default-vol"/>
|
||||
<source file="/dev/default-pool/default-vol"/>
|
||||
<shareable/>
|
||||
</disk>
|
||||
<disk type="block" device="floppy">
|
||||
|
@ -29,7 +29,7 @@
|
||||
<emulator>/usr/lib/xen/bin/qemu-dm</emulator>
|
||||
<disk type="file" device="floppy">
|
||||
<driver name="qemu" type="qcow2"/>
|
||||
<source file="/default-pool/testvol1.img"/>
|
||||
<source file="/dev/default-pool/testvol1.img"/>
|
||||
<target dev="fda" bus="fdc"/>
|
||||
</disk>
|
||||
<disk type="file" device="disk">
|
||||
|
@ -31,7 +31,7 @@
|
||||
<emulator>/usr/binnnn/fooemu</emulator>
|
||||
<disk type="file" device="floppy">
|
||||
<driver name="qemu" type="qcow2"/>
|
||||
<source file="/default-pool/testvol1.img"/>
|
||||
<source file="/dev/default-pool/testvol1.img"/>
|
||||
<target dev="fda" bus="fdc"/>
|
||||
</disk>
|
||||
<disk type="file" device="disk">
|
||||
|
@ -13,27 +13,27 @@
|
||||
<disk type="file" device="cdrom">
|
||||
<target dev="hda" bus="ide"/>
|
||||
<driver name="qemu" type="qcow2"/>
|
||||
<source file="/default-pool/default-vol"/>
|
||||
<source file="/dev/default-pool/default-vol"/>
|
||||
</disk>
|
||||
<disk type="block" device="cdrom">
|
||||
<target dev="hdb" bus="ide"/>
|
||||
<driver name="qemu" type="raw"/>
|
||||
<source dev="/disk-pool/diskvol1"/>
|
||||
<source dev="/dev/disk-pool/diskvol1"/>
|
||||
</disk>
|
||||
<disk type="block" device="cdrom">
|
||||
<target dev="hdc" bus="ide"/>
|
||||
<driver name="qemu" type="raw"/>
|
||||
<source dev="/disk-pool/diskvol1"/>
|
||||
<source dev="/dev/disk-pool/diskvol1"/>
|
||||
</disk>
|
||||
<disk type="file" device="floppy">
|
||||
<target dev="fda" bus="fdc"/>
|
||||
<driver name="qemu" type="qcow2"/>
|
||||
<source file="/default-pool/default-vol"/>
|
||||
<source file="/dev/default-pool/default-vol"/>
|
||||
</disk>
|
||||
<disk type="block" device="floppy">
|
||||
<target dev="fdb" bus="fdc"/>
|
||||
<driver name="qemu" type="raw"/>
|
||||
<source dev="/disk-pool/diskvol1"/>
|
||||
<source dev="/dev/disk-pool/diskvol1"/>
|
||||
</disk>
|
||||
</devices>
|
||||
</domain>
|
||||
|
@ -26,7 +26,7 @@
|
||||
<emulator>/usr/lib/xen/bin/qemu-dm</emulator>
|
||||
<disk type='file' device='floppy'>
|
||||
<driver name='qemu' type='qcow2'/>
|
||||
<source file='/default-pool/testvol1.img'/>
|
||||
<source file='/dev/default-pool/testvol1.img'/>
|
||||
<target dev='fda' bus='fdc'/>
|
||||
</disk>
|
||||
<disk type='file' device='disk'>
|
||||
|
@ -26,7 +26,7 @@
|
||||
<emulator>/usr/lib/xen/bin/qemu-dm</emulator>
|
||||
<disk type="file" device="floppy">
|
||||
<driver name="qemu" type="qcow2"/>
|
||||
<source file="/default-pool/testvol1.img"/>
|
||||
<source file="/dev/default-pool/testvol1.img"/>
|
||||
<target dev="fda" bus="fdc"/>
|
||||
</disk>
|
||||
<disk type="file" device="disk">
|
||||
|
@ -26,7 +26,7 @@
|
||||
<emulator>/usr/lib/xen/bin/qemu-dm</emulator>
|
||||
<disk type='file' device='floppy'>
|
||||
<driver name='qemu' type='qcow2'/>
|
||||
<source file='/default-pool/testvol1.img'/>
|
||||
<source file='/dev/default-pool/testvol1.img'/>
|
||||
<target dev='fda' bus='fdc'/>
|
||||
</disk>
|
||||
<disk type='file' device='disk'>
|
||||
|
@ -26,7 +26,7 @@
|
||||
<emulator>/usr/lib/xen/bin/qemu-dm</emulator>
|
||||
<disk type="file" device="floppy">
|
||||
<driver name="qemu" type="qcow2"/>
|
||||
<source file="/default-pool/testvol1.img"/>
|
||||
<source file="/dev/default-pool/testvol1.img"/>
|
||||
<target dev="fda" bus="fdc"/>
|
||||
</disk>
|
||||
<disk type="file" device="disk">
|
||||
|
@ -281,7 +281,7 @@ class XMLParseTest(unittest.TestCase):
|
||||
check("error_policy", "stop", None)
|
||||
|
||||
check = self._make_checker(disk6)
|
||||
check("path", None, "/default-pool/default-vol")
|
||||
check("path", None, "/dev/default-pool/default-vol")
|
||||
disk6.sync_path_props()
|
||||
check("shareable", False, True)
|
||||
check("driver_cache", None, "writeback")
|
||||
@ -760,28 +760,28 @@ class XMLParseTest(unittest.TestCase):
|
||||
|
||||
disk = guest.get_devices("disk")[0]
|
||||
check = self._make_checker(disk)
|
||||
check("path", None, "/default-pool/default-vol")
|
||||
check("path", None, "/dev/default-pool/default-vol")
|
||||
disk.sync_path_props()
|
||||
|
||||
disk = guest.get_devices("disk")[1]
|
||||
check = self._make_checker(disk)
|
||||
check("path", None, "/default-pool/default-vol")
|
||||
check("path", "/default-pool/default-vol", "/disk-pool/diskvol1")
|
||||
check("path", None, "/dev/default-pool/default-vol")
|
||||
check("path", "/dev/default-pool/default-vol", "/dev/disk-pool/diskvol1")
|
||||
disk.sync_path_props()
|
||||
|
||||
disk = guest.get_devices("disk")[2]
|
||||
check = self._make_checker(disk)
|
||||
check("path", None, "/disk-pool/diskvol1")
|
||||
check("path", None, "/dev/disk-pool/diskvol1")
|
||||
disk.sync_path_props()
|
||||
|
||||
disk = guest.get_devices("disk")[3]
|
||||
check = self._make_checker(disk)
|
||||
check("path", None, "/default-pool/default-vol")
|
||||
check("path", None, "/dev/default-pool/default-vol")
|
||||
disk.sync_path_props()
|
||||
|
||||
disk = guest.get_devices("disk")[4]
|
||||
check = self._make_checker(disk)
|
||||
check("path", None, "/disk-pool/diskvol1")
|
||||
check("path", None, "/dev/disk-pool/diskvol1")
|
||||
disk.sync_path_props()
|
||||
|
||||
self._alter_compare(guest.get_xml_config(), outfile)
|
||||
|
Loading…
Reference in New Issue
Block a user