Bug 1463168 - can't update the cdrom after ejecting cdrom in the guest and then doing save/restore operation
can't update the cdrom after ejecting cdrom in the guest and then doing save/...
Status: ASSIGNED
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt (Show other bugs)
7.4
x86_64 Linux
medium Severity medium
: rc
: ---
Assigned To: Peter Krempa
lijuan men
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-06-20 05:52 EDT by lijuan men
Modified: 2017-07-04 03:58 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
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 lijuan men 2017-06-20 05:52:27 EDT
Description of problem:
can't update the cdrom after ejecting cdrom in the guest and then doing save/restore operation

Version-Release number of selected component (if applicable):
libvirt-3.2.0-10.el7.x86_64
qemu-kvm-rhev-2.9.0-12.el7.x86_64

How reproducible:
100%

Steps to Reproduce:

1.start a guest with cdrom:
 <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/var/lib/libvirt/images/rhel7.3.iso'/>
      <target dev='sda' bus='scsi'/>
      <readonly/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
[root@lmen1 ~]# virsh start test
Domain test started


2.eject the iso file in the guest
in the guest,run the command:
#eject /dev/sr0

3.save and restore the guest

[root@lmen1 ~]# virsh save test /tmp/save
Domain test saved to /tmp/save

[root@lmen1 ~]# virsh restore /tmp/save
Domain restored from /tmp/save

[root@lmen1 ~]# virsh dumpxml test
...
 <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <backingStore/>
      <target dev='sda' bus='scsi'/>
      <readonly/>
      <alias name='scsi0-0-0-0'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
...

4.use change-media to update iso file
[root@lmen1 ~]# virsh domblklist test
Target     Source
------------------------------------------------
vda        /var/lib/libvirt/images/uefi.qcow2
sda        -

[root@lmen1 ~]# virsh change-media test sda /var/lib/libvirt/images/rhel7.3.iso --update
error: Failed to complete action update on media
error: internal error: timed out waiting for disk tray status update


Actual results:
failed to update

Expected results:
update successfully

Additional info:
If I migrate the guest after  ejecting cdrom in the guest,the cdrom can not be updated too.

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