-
Bug
-
Resolution: Won't Do
-
Undefined
-
None
-
rhel-8.6.0, rhel-9.0.0, rhel-9.1.0, rhel-9.2.0, rhel-9.3.0, rhel-9.4
-
None
-
None
-
rhel-sst-virtualization
-
ssg_virtualization
-
None
-
QE ack
-
False
-
-
None
-
None
-
None
-
Automated
-
None
What were you trying to do that didn't work?
{}{}
Live migrate a guest with NFS storage from source to target after ejecting media from guest on source. The live migration is expected to succeed, but failed:
# virsh migrate --live a qemu+ssh://<target-ip>/system --verbose error: Cannot access storage file '/var/lib/libvirt/images/cdrom': No such file or directory # virsh dumpxml a --xpath //disk ... <disk type="file" device="cdrom"> <driver name="qemu" type="raw"/> <source file="/var/lib/libvirt/images/cdrom" index="1"/> <backingStore/> <target dev="hdc" bus="scsi" tray="open"/> <readonly/> <alias name="scsi0-0-0-2"/> <address type="drive" controller="0" bus="0" target="0" unit="2"/> </disk>
Please provide the package NVR for which bug is seen:
For both migration source and target:
- rpm -qa qemu-kvm
qemu-kvm-8.2.0-6.el9.x86_64 - # rpm -qa libvirt
libvirt-10.0.0-4.el9.x86_64 - # uname -r
5.14.0-423.el9.x86_64
Guest
100%
Steps to reproduce
- Create cdrom disk that is not available to migration target
# qemu-img create -f raw /var/lib/libvirt/images/cdrom 10M
- Attach disk to vm
# virsh attach-disk --domain a --source /var/lib/libvirt/images/cdrom --target sdb --config --driver qemu --subdriver raw --cache none --type cdrom --mode readonly
- Start vm
# virsh start a --console
- Check disk is attached (sr0) (inside guest)
# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS ... sr0 11:0 1 10M 0 ro
- Eject the media (inside guest)
# eject /dev/sr0 # echo $? 0
- PS. ejection process silently fails, lsblk after eject:
From `eject` man page:
"If eject does not work, it is most likely a limitation of the kernel driver for the device and not the eject program itself."# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS ... sr0 11:0 1 10M 0 rom
- Check disk tray is open:
# virsh dumpxml a --xpath //disk ... <disk type="file" device="cdrom"> <driver name="qemu" type="raw"/> <source file="/var/lib/libvirt/images/cdrom" index="1"/> <backingStore/> <target dev="hdc" bus="scsi" tray="open"/> <readonly/> <alias name="scsi0-0-0-2"/> <address type="drive" controller="0" bus="0" target="0" unit="2"/> </disk>
# virsh migrate --live a qemu+ssh://10.73.211.28/system --verbose error: Cannot access storage file '/var/lib/libvirt/images/cdrom': No such file or directory
Expected results
With tray="open" the live migration should succeed. See patch: https://listman.redhat.com/archives/libvir-list/2011-September/msg00465.html
Actual results
Live migration fails