Bug 616480 - virtinst incorrectly sets cache=none for physical CDROM/DVD device
virtinst incorrectly sets cache=none for physical CDROM/DVD device
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: python-virtinst (Show other bugs)
6.0
All Linux
medium Severity high
: rc
: 6.0
Assigned To: Cole Robinson
Virtualization Bugs
: Reopened
: 619214 619951 (view as bug list)
Depends On: 608548
Blocks: 494052
  Show dependency treegraph
 
Reported: 2010-07-20 10:51 EDT by Jes Sorensen
Modified: 2013-01-09 17:54 EST (History)
15 users (show)

See Also:
Fixed In Version: python-virtinst-0.500.3-6.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 608548
Environment:
Last Closed: 2010-11-10 16:23:56 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Don't set an explicit default cache value for guest CDROM devices (662 bytes, text/plain)
2010-07-20 17:00 EDT, Cole Robinson
no flags Details

  None (edit)
Comment 1 Cole Robinson 2010-07-20 11:15:35 EDT
Actually, virtinst is where the cache=none default is being set. The solution isn't necc. straightforward though, since virtinst doesn't know for sure whether --cdrom /dev/foo is a host cdrom or just a plain host block device. The safest thing to do is probably just not set an explicit cache value for any -cdrom device, I assume CDROM performance isn't the highest priority. Sound good to QEMU folks?

Whether we want libvirt (or I'd argue it should be qemu) to reject cache=none for cdrom devices is probably less urgent and could wait till 6.1
Comment 2 Jes Sorensen 2010-07-20 12:16:34 EDT
In my case it wasn't actually virt-install but virt-manager I used to verify
the case. Even after a guest is installed, it allows you to go in and connect
the CDROM drive and then change the caching of it to 'none' which will not
work.

It's not quite clear to me in how many places this needs to be fixed, I thought
it was libvirt allowing it for CDROMs. However from what you are saying it
sounds like it is both a problem with virt-install and virt-manager setting
'none' as default, which is a serious blocker, plus virt-manager allowing
one to change it to 'none' after install as well.

QEMU upstream will reject cache=none with an error, so libvirt/virt-install/
virt-manager needs to know not to specify it for those devices.

Not setting cache default for CDROM devices in virt-install and virt-manager
seems a reasonable fix for 6.0.
Comment 3 Cole Robinson 2010-07-20 17:00:02 EDT
Created attachment 433262 [details]
Don't set an explicit default cache value for guest CDROM devices

Blocker justification: Installing a guest using the host's CDROM device is a fairly common usage scenario, and without this patch it is completely broken (install errors in the bios) via virt-install and virt-manager in a non-obvious way. The patch is very small and IMO very low risk.
Comment 5 Jes Sorensen 2010-07-21 03:11:16 EDT
Cole, just to be sure, does your patch fix both virt-manager and virt-install,
or is a separate patch needed for virt-manager?
Comment 6 Cole Robinson 2010-07-21 08:55:54 EDT
This patch fixes the install from host CDROM case for both virt-install and virt-manager.

virt-manager still offers cache=none if adding a guest CDROM device post-install, but I don't think that is as important to fix for 6.0.
Comment 7 Cole Robinson 2010-07-21 10:56:33 EDT
Fix built in python-virtinst-0.500.3-6.el6
Comment 9 Johnny Liu 2010-07-28 23:15:33 EDT
Verified this bug with python-virtinst-0.500.3-6.el6.noarch and PASSED.

On old version - python-virtinst-0.500.3-5.el6.noarch:
...
    <disk type='block' device='cdrom'>
      <driver name='qemu' type='raw' cache='none'/>
      <source dev='/dev/cdrom'/>
      <target dev='hdc' bus='ide'/>
      <readonly/>
      <alias name='ide0-1-0'/>
      <address type='drive' controller='0' bus='1' unit='0'/>
    </disk>
...

On new version - python-virtinst-0.500.3-6.el6.noarch:
...
    <disk type='block' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source dev='/dev/cdrom'/>
      <target dev='hdc' bus='ide'/>
      <readonly/>
      <alias name='ide0-1-0'/>
      <address type='drive' controller='0' bus='1' unit='0'/>
    </disk>
...

After update python-virtinst-0.500.3-6.el6, virt-manager install guest from CDROM device successfully, too.
Comment 10 Amit Shah 2010-08-03 05:21:17 EDT
*** Bug 619951 has been marked as a duplicate of this bug. ***
Comment 11 Dor Laor 2010-08-05 11:06:23 EDT
*** Bug 619214 has been marked as a duplicate of this bug. ***
Comment 12 releng-rhel@redhat.com 2010-11-10 16:23:56 EST
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.
Comment 13 zhe peng 2011-04-19 03:32:41 EDT
verified this bug with:
Linux localhost.localdomain 2.6.32-130.el6.x86_64 #1 SMP Tue Apr 5 19:58:31 EDT
2011 x86_64 x86_64 x86_64 GNU/Linux

python-virtinst-0.500.5-3.el6.noarch
libvirt-0.8.7-17.el6.x86_64

passed.

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