Bug 865338 - RFE: CDROM device properties should not have 'cache=none' and should be format=raw
RFE: CDROM device properties should not have 'cache=none' and should be forma...
Status: CLOSED NOTABUG
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-nova (Show other bugs)
unspecified
Unspecified Unspecified
unspecified Severity medium
: ---
: ---
Assigned To: Nikola Dipanov
Yaniv Kaul
: FutureFeature, Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-11 05:17 EDT by Yaniv Kaul
Modified: 2016-04-22 01:01 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-12-18 08:37:20 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Yaniv Kaul 2012-10-11 05:17:22 EDT
Description of problem:
Not sure if it makes any difference, but current QEMU command line for the cdrom device is:

-drive file=<file>,if=none,media=cdrom,id=drive-ide0-0-0,readonly=on,format=qcow2,cache=none 

It should be, though I'm not sure it makes a difference:
-drive file=<file>,if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw

(note the lack of cache=none and the difference in format)

(I'm also wondering why the ID is different between what VDSM and Nova have. not sure it matters).

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
Comment 3 Nikola Dipanov 2012-12-18 07:00:59 EST
This is actually not a bug. Nova will create a local image on the Hypervisor node for all the devices and this image is by default a qcow2, so the above is correct for the default nova setup.
Comment 4 Yaniv Kaul 2012-12-18 08:26:08 EST
(In reply to comment #3)
> This is actually not a bug. Nova will create a local image on the Hypervisor
> node for all the devices and this image is by default a qcow2, so the above
> is correct for the default nova setup.

The CDROM image is certainly not qcow2. Please check again. 
Can you actually read from the CD? (even if you can, would be nice to allow caching of reading from it).
Comment 5 Daniel Berrange 2012-12-18 08:37:20 EST
No, Nikola is correct - Nova is using QCow2 for the ISO image

# virsh dumpxml instance-0000000f | xpath '/domain/devices/disk[1]'
    <disk type="file" device="cdrom">
      <driver name="qemu" type="qcow2" cache="none" />
      <source file="/home/berrange/src/cloud/data/nova/instances/instance-0000000f/disk" />
      <target dev="hda" bus="ide" />
      <readonly />
      <alias name="ide0-0-0" />
      <address type="drive" controller="0" bus="0" target="0" unit="0" />
    </disk>

Look at the disk that is assigned to the VM and see that is qcow2

# qemu-img info /home/berrange/src/cloud/data/nova/instances/instance-0000000f/disk
image: /home/berrange/src/cloud/data/nova/instances/instance-0000000f/disk
file format: qcow2
virtual size: 693M (727169024 bytes)
disk size: 204K
cluster_size: 65536
backing file: /home/berrange/src/cloud/data/nova/instances/_base/4439e969f6630e5a878f0f4a8b41bff2214eb757

The backing file of this image is raw:

# qemu-img info /home/berrange/src/cloud/data/nova/instances/_base/4439e969f6630e5a878f0f4a8b41bff2214eb757
image: /home/berrange/src/cloud/data/nova/instances/_base/4439e969f6630e5a878f0f4a8b41bff2214eb757
file format: raw
virtual size: 693M (727169024 bytes)
disk size: 694M

and is an ISO:

# file /home/berrange/src/cloud/data/nova/instances/_base/4439e969f6630e5a878f0f4a8b41bff2214eb757
/home/berrange/src/cloud/data/nova/instances/_base/4439e969f6630e5a878f0f4a8b41bff2214eb757: # ISO 9660 CD-ROM filesystem data 'Fedora-9-Live-x86_64            ' (bootable)

Note You need to log in before you can comment on or make changes to this bug.