RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1065507 - kvm guest fails to start without optical media in host's optical drive
Summary: kvm guest fails to start without optical media in host's optical drive
Keywords:
Status: CLOSED DUPLICATE of bug 1019926
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.5
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Libvirt Maintainers
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-02-14 19:48 UTC by James B. Byrne
Modified: 2014-03-27 16:00 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-03-27 10:25:33 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description James B. Byrne 2014-02-14 19:48:27 UTC
Description of problem:

kvm guest fails to start without optical media in host's optical drive

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

qemu-kvm-0.12.1.2-2.415.el6_5.3
libvirt-client-0.10.2-29.el6.x86_64

How reproducible:

Always

Steps to Reproduce:

1. Use virt-manager to create and provision a MS-WinV7pro guest from optical media.
2. Shutdown and power off guest (virsh shutdown <domain>)
3. Remove media from optical drive on host.
4. Start guest (virsh start <domain>)

Actual results:

Guest fails to start.

Expected results:

Guest should start.

Additional info:

Is this a regression to bug 709585?

RHEl6
qemu-kvm-0.12.1.2-2.4-15.el6_5.3
virt-manager.x86_64-0.9.0-19.el6
Guest OS = MS-WinV7proSP1 (updated to date)


The guest was created and provisioned from CD-ROM without difficulty via virt-manager. The guest subsequently responded to console commands and mouse actions, obtained network access and was updated via Windows-Update service.  Subsequent to the controlled shutdown of the guest system and power down of the vm the guest image subsequently fails to start giving instead this error:

virsh start brws-ms-v7-37v.brockley.harte-lyne.ca
error: Failed to start domain brws-ms-v7-37v.brockley.harte-lyne.ca
error: cannot open file '/dev/sr0': No medium found

Examination of the guest configuration file shows this:

     30     <disk type='block' device='cdrom'>
     31       <driver name='qemu' type='raw'/>
     32       <source dev='/dev/sr0'/>
     33       <target dev='hdc' bus='ide'/>
     34       <readonly/>
     35       <address type='drive' controller='0' bus='1' target='0' unit='0'/>
     36     </disk>

Despite the inference I draw from the above referenced bug report, that the <driver> tag attribute 'format' actually refers to the attribute 'type' since the attribute format' is not found anywhere in the guest configuration file, one cannot in fact change the driver attribute 'type' to any value other than raw. Any attempt to do so results in this message:

unsupported configuration: unknown driver format value 'host_cdrom'
Failed. Try again? [y,n,f,?]:

Further, the value 'f' is not permitted so one cannot forcibly save the
configuration to determine if in fact it might work.

However, if a readable medium is placed in the host's optical drive then the guest will start using the configuration generated by virt-manager.

Comment 2 mazhang 2014-02-21 07:06:58 UTC
Reproduce this bug with virt-manager.

Host:
qemu-kvm-tools-0.12.1.2-2.415.el6_5.3.x86_64
qemu-kvm-0.12.1.2-2.415.el6_5.3.x86_64
gpxe-roms-qemu-0.9.7-6.10.el6.noarch
qemu-img-0.12.1.2-2.415.el6_5.3.x86_64
qemu-kvm-debuginfo-0.12.1.2-2.415.el6_5.3.x86_64
libvirt-client-0.10.2-29.el6.x86_64
libvirt-0.10.2-29.el6.x86_64
libvirt-python-0.10.2-29.el6.x86_64

Guest:
win7

Steps to Reproduce:
1. Use virt-manager to create and provision a MS-WinV7pro guest from optical media.
2. Shutdown and power off guest (virsh shutdown <domain>)
3. Remove media from optical drive on host.
4. Start guest (virsh start <domain>)

Result:
Start vm failed.

Error starting domain: cannot open file '/dev/sr0': No medium found

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 44, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 65, in tmpcb
    callback(*args, **kwargs)
  File "/usr/share/virt-manager/virtManager/domain.py", line 1114, in startup
    self._backend.create()
  File "/usr/lib64/python2.6/site-packages/libvirt.py", line 678, in create
    if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self)
libvirtError: cannot open file '/dev/sr0': No medium found


But can not reproduce this problem with qemu-kvm directly, so this bug could be a problem of libvirt.

Comment 3 mazhang 2014-02-21 10:21:33 UTC
Libvirt and virt-manager version:
libvirt-0.10.2-29.el6.x86_64
virt-manager-0.9.0-19.el6.x86_64

Comment 4 Qunfang Zhang 2014-03-27 09:37:16 UTC
Hi, Jiri

Do you think this is probably a libvirt or virt-manager issue?  Correct me if I ping a wrong person :)

Thanks,
Qunfang

Comment 5 Jiri Denemark 2014-03-27 10:14:56 UTC
There is a similar libvirt bug upstream:  https://bugzilla.redhat.com/show_bug.cgi?id=868673

Comment 6 Jiri Denemark 2014-03-27 10:24:56 UTC
(In reply to James B. Byrne from comment #0)
> Despite the inference I draw from the above referenced bug report, that the
> <driver> tag attribute 'format' actually refers to the attribute 'type'
> since the attribute format' is not found anywhere in the guest configuration
> file, one cannot in fact change the driver attribute 'type' to any value
> other than raw. Any attempt to do so results in this message:
> 
> unsupported configuration: unknown driver format value 'host_cdrom'

That's expected, type attribute specifies whether the image pointed to by <source> is raw, qcow2, whatever. You really want "raw" for CDROM images.

> Failed. Try again? [y,n,f,?]:
> 
> Further, the value 'f' is not permitted so one cannot forcibly save the
> configuration to determine if in fact it might work.

Hmm, I'm not sure what this "f" is supposed to be used for. If libvirtd fails to parse the XML (which is what happened here), there's no way we could force it to take that XML anyway.

> However, if a readable medium is placed in the host's optical drive then the
> guest will start using the configuration generated by virt-manager.

There's an easy workaround for this. Just remove the <source .../> element (line 32 above) from the domain XML. That will provide an empty CDROM drive to the guest.

Comment 7 Jiri Denemark 2014-03-27 10:25:33 UTC

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

Comment 8 James B. Byrne 2014-03-27 16:00:43 UTC
Thank you.  The work-around solves the startup problem for me.


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