diskbackend: Use type=file for empty cdrom, not type=block

It doesn't have any operational effect, however since most people use
type=file for cdrom isos, this makes it easier for people to hand edit
the XML.
This commit is contained in:
Cole Robinson 2015-11-21 20:07:05 -05:00
parent e18d2caa45
commit 4f9fd84f8f
16 changed files with 16 additions and 16 deletions

View File

@ -35,7 +35,7 @@
<source file="/var/lib/libvirt/images/fedora.qcow2"/>
<target dev="sda" bus="scsi"/>
</disk>
<disk type="block" device="cdrom">
<disk type="file" device="cdrom">
<target dev="hda" bus="ide"/>
<readonly/>
</disk>

View File

@ -60,7 +60,7 @@
<source file="/dev/default-pool/testvol1.img"/>
<target dev="sda" bus="scsi"/>
</disk>
<disk type="block" device="cdrom">
<disk type="file" device="cdrom">
<target dev="sdb" bus="scsi"/>
<readonly/>
</disk>

View File

@ -113,7 +113,7 @@
<source file="/tmp/.local/share/libvirt/images/foobar.qcow2"/>
<target dev="vda" bus="virtio"/>
</disk>
<disk type="block" device="cdrom">
<disk type="file" device="cdrom">
<target dev="hda" bus="ide"/>
<readonly/>
</disk>

View File

@ -95,7 +95,7 @@
</pm>
<devices>
<emulator>/usr/bin/qemu-kvm</emulator>
<disk type="block" device="cdrom">
<disk type="file" device="cdrom">
<target dev="hda" bus="ide"/>
<readonly/>
</disk>

View File

@ -43,7 +43,7 @@
<target dev="vdb" bus="virtio"/>
<readonly/>
</disk>
<disk type="block" device="cdrom">
<disk type="file" device="cdrom">
<target dev="sda" bus="sata"/>
<iotune>
<read_bytes_sec>1</read_bytes_sec>

View File

@ -109,7 +109,7 @@
<source file="/dev/default-pool/testvol1.img"/>
<target dev="sda" bus="sata"/>
</disk>
<disk type="block" device="cdrom">
<disk type="file" device="cdrom">
<target dev="sdb" bus="sata"/>
<readonly/>
</disk>

View File

@ -21,7 +21,7 @@
<source file="/dev/default-pool/1234.img"/>
<target dev="hda" bus="ide"/>
</disk>
<disk type="block" device="floppy">
<disk type="file" device="floppy">
<target dev="fdb" bus="fdc"/>
</disk>
<disk type="block" device="cdrom">

View File

@ -30,7 +30,7 @@
</pm>
<devices>
<emulator>/usr/bin/qemu-kvm</emulator>
<disk type="block" device="cdrom">
<disk type="file" device="cdrom">
<target dev="hda" bus="ide"/>
<readonly/>
</disk>

View File

@ -31,7 +31,7 @@
</pm>
<devices>
<emulator>/usr/bin/qemu-kvm</emulator>
<disk type="block" device="cdrom">
<disk type="file" device="cdrom">
<driver type="raw"/>
<target dev="hda" bus="ide"/>
<readonly/>

View File

@ -35,7 +35,7 @@
<source file="/var/lib/libvirt/images/fedora"/>
<target dev="sda" bus="scsi"/>
</disk>
<disk type="block" device="cdrom">
<disk type="file" device="cdrom">
<target dev="hda" bus="ide"/>
<readonly/>
</disk>

View File

@ -35,7 +35,7 @@
<source file="/var/lib/libvirt/images/fedora.raw"/>
<target dev="sda" bus="scsi"/>
</disk>
<disk type="block" device="cdrom">
<disk type="file" device="cdrom">
<target dev="hda" bus="ide"/>
<readonly/>
</disk>

View File

@ -31,7 +31,7 @@
</pm>
<devices>
<emulator>/usr/bin/qemu-kvm</emulator>
<disk type="block" device="cdrom">
<disk type="file" device="cdrom">
<target dev="hda" bus="ide"/>
<readonly/>
</disk>

View File

@ -37,7 +37,7 @@
<source dev="/dev/disk-pool/diskvol1"/>
<target dev="vdb" bus="virtio"/>
</disk>
<disk type="block" device="cdrom">
<disk type="file" device="cdrom">
<target dev="hda" bus="ide"/>
<readonly/>
</disk>

View File

@ -37,7 +37,7 @@
<source dev="/dev/disk-pool/diskvol1"/>
<target dev="vdb" bus="virtio"/>
</disk>
<disk type="block" device="cdrom">
<disk type="file" device="cdrom">
<target dev="hda" bus="ide"/>
<readonly/>
</disk>

View File

@ -31,7 +31,7 @@
</source>
<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="lun" sgio="unfiltered">

View File

@ -557,7 +557,7 @@ class StorageBackend(_StorageBase):
self._dev_type = "block"
if not self._dev_type:
self._dev_type = "block"
self._dev_type = "file"
return self._dev_type
def get_driver_type(self):