Bug 679292

Summary: virt-manager set <driver name> to "file" instead of "qemu" when changing the attached cdrom from the VM
Product: Red Hat Enterprise Linux 5 Reporter: Muhammad Riyas vk <mvattakk>
Component: virt-managerAssignee: Cole Robinson <crobinso>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.6CC: jwest, xen-maint
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-03-09 22:55:07 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Muhammad Riyas vk 2011-02-22 07:22:26 UTC
Description of problem:

"virt-manager" wrongly set <driver name> to "file" instead of "qemu" when attaching a virtual cdrom disk to the VM by clicking "connect/disconnect" button, and VM fails to start with following trace back.

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/engine.py", line 501, in run_domain
    vm.startup()
  File "/usr/share/virt-manager/virtManager/domain.py", line 575, in startup
    self.vm.create()
  File "/usr/lib64/python2.4/site-packages/libvirt.py", line 333, in create
    if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self)
libvirtError: internal error unsupported driver name 'file' for disk '/vm/ISO/rhel-5-server-x86_64-dvd.iso'

Environment:

virt-manager-0.6.1-13.el5
libvirt-0.8.2-15.el5_6.1
RHEL 5.6 KVM

How reproducible:

- Click Add Hardware and add a new cdrom drive attached to an iso image.
- verify that the <driver name> is set correctly to "qemu"

<disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/vm/ISO/rhel-5-server-x86_64-dvd.iso'/>
      <target dev='hdc' bus='ide'/>
      <readonly/>
      <address type='drive' controller='0' bus='1' unit='0'/>
    </disk>

- Now shutdown the VM
- Select "cdrom" and click "disconnect" button and disconnect the ISO image from drive.
- Click "connect" button and connect the ISO image back to the drive.
- Check xml configuration and see that <driver name> is changed to "file" at this time.

<disk type='file' device='cdrom'>
      <driver name='file' type='raw'/>
      <source file='/vm/ISO/rhel-5-server-x86_64-dvd.iso'/>
      <target dev='hdc' bus='ide'/>
      <readonly/>
      <address type='drive' controller='0' bus='1' unit='0'/>
    </disk>

Comment 1 Cole Robinson 2011-03-09 22:55:07 UTC

*** This bug has been marked as a duplicate of bug 641858 ***