Bug 602026
| Summary: | Cannot change cdrom by "change device filename [format] " in (qemu) command line | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Cao, Chen <kcao> | ||||
| Component: | qemu-kvm | Assignee: | chellwig <chellwig> | ||||
| Status: | CLOSED WORKSFORME | QA Contact: | Virtualization Bugs <virt-bugs> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | low | ||||||
| Version: | 6.0 | CC: | amit.shah, berrange, gcosta, juzhang, lihuang, llim, mkenneth, mshao, shuang, syeghiay, tburke, virt-maint | ||||
| Target Milestone: | rc | Keywords: | Reopened | ||||
| Target Release: | 6.1 | ||||||
| Hardware: | All | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | qemu-kvm-0.12.1.2-2.78.el6 | Doc Type: | Bug Fix | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2011-06-13 07:57:14 UTC | Type: | --- | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Bug Depends On: | |||||||
| Bug Blocks: | 580954 | ||||||
| Attachments: |
|
||||||
|
Description
Cao, Chen
2010-06-09 02:07:51 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux major release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux Major release. This request is not yet committed for inclusion. Addtionally,
1.
the cdrom can be changed successfully if the .iso file is on local harddisk.
2.
/home/kvm_autotest_root/iso/ is a mount point to nfs server
[root@dhcp-0-1 ~]# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/VolGroup-lv_root
51606140 6484972 42499728 14% /
tmpfs 3997220 0 3997220 0% /dev/shm
/dev/sda1 495844 93790 376454 20% /boot
/dev/mapper/VolGroup-lv_home
418528000 50934360 346333560 13% /home
192.168.1.110:/vol/kvm/iso
1395654656 910985984 484668672 66% /home/kvm_autotest_root/iso
Is the NFS server exported read-only? It seems like the monitor change command opens the block device without the read-only flag, which would cause errors when the filesystem is read-only. In addition to that we're lacking any kind of error handling for the bdrv_open call in the change command, so no errors get reported. Created attachment 423357 [details]
Open CDROM device read-only from the monitor change command
Backport of the upstream patch to open CDROM device read-only. We're still missing out on error handling in the monitor change handler, but it seems like a lot of infrastructure for that is missing in the RHEL6 qemu version.
(In reply to comment #4) > Is the NFS server exported read-only? It seems like the monitor change command > opens the block device without the read-only flag, which would cause errors > when the filesystem is read-only. In addition to that we're lacking any kind > of error handling for the bdrv_open call in the change command, so no errors > get reported. yes, it is read-only. and if the NFS server is mounted as RW, the "change" command returns successfully. I have verified the fix on qemu-kvm-0.12.1.2-2.78.el6. *** Bug 602186 has been marked as a duplicate of this bug. *** I can reproduce this bug qemu: qemu-kvm-0.12.1.2-2.113.el6_0.1.x86_64 kernel: 2.6.32-71.2.1.el6_0.x86_64 cmd: /usr/local/staf/test/RHEV/kvm-new/autotest/client/tests/kvm/qemu -monitor stdio -drive file='/usr/local/staf/test/RHEV/kvm-new/autotest/client/tests/kvm/images/win2008r2-64-virtio.qcow2',index=0,if=none,id=drive-virtio-disk1,media=disk,cache=none,boot=on,format=qcow2,aio=native -device virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk1,id=virtio-disk1 -device virtio-net-pci,netdev=id5poILV,id=ndev00id5poILV,mac='02:30:1F:F3:6d:5a',bus=pci.0,addr=0x3 -netdev tap,id=id5poILV,ifname='virtio_0_8000',script='/usr/local/staf/test/RHEV/kvm-new/autotest/client/tests/kvm/scripts/qemu-ifup-switch',downscript='no' -m 2048 -smp 2 -cpu cpu64-rhel6,+x2apic -vnc :0 -spice port=8000,disable-ticketing -vga qxl -rtc base=utc,clock=host,driftfix=none -M rhel6.0.0 -usbdevice tablet -no-kvm-pit-reinjection -enable-kvm 3. change cdrom, iso is not changed 1). (qemu) info block drive-virtio-disk1: type=hd removable=0 file=/usr/local/staf/test/RHEV/kvm-new/autotest/client/tests/kvm/images/win2008r2-64-virtio.qcow2 ro=0 drv=qcow2 encrypted=0 ide1-cd0: type=cdrom removable=1 locked=0 [not inserted] floppy0: type=floppy removable=1 locked=0 [not inserted] sd0: type=floppy removable=1 locked=0 [not inserted] 2). (qemu) change ide1-cd0 file=/usr/share/virtio-win/virtio-win-1.1.12.iso 3). (qemu) info block drive-virtio-disk1: type=hd removable=0 file=/usr/local/staf/test/RHEV/kvm-new/autotest/client/tests/kvm/images/win2008r2-64-virtio.qcow2 ro=0 drv=qcow2 encrypted=0 ide1-cd0: type=cdrom removable=1 locked=0 [not inserted] floppy0: type=floppy removable=1 locked=0 [not inserted] sd0: type=floppy removable=1 locked=0 [not inserted] Suqin, can you please retest it again? I tried in a couple different setups with qemu-kvm-0.12.1.2-2.150.el6 and both changing an existing CDROM as in the original bug report, as well as changing the empyt default cdrom as in your test works fine. 1. Can not reproduce in qemu-kvm-0.12.1.2-2.152.el6.x86_64 /usr/libexec/qemu-kvm -monitor stdio -drive file=/root/win2008r2-64-virtio.qcow2,index=0,if=none,id=drive-virtio-disk1,media=disk,cache=none,format=qcow2,aio=native -device virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk1,id=virtio-disk1 -device virtio-net-pci,netdev=idBUoK1M,mac=9a:cd:2e:5a:f3:8f,id=ndev00idBUoK1M,bus=pci.0,addr=0x3 -netdev tap,id=idBUoK1M,vhost=on,script=/home/Auto/autotest/client/tests/kvm/scripts/qemu-ifup-switch,downscript=no -m 2048 -smp 2,cores=1,threads=1,sockets=2 -cpu Penryn -vnc :1 -rtc base=utc,clock=host,driftfix=none -M rhel6.1.0 -boot order=cdn,once=c,menu=off -usbdevice tablet -no-kvm-pit-reinjection -enable-kvm Using CPU model "Penryn" Using CPU model "Penryn" QEMU 0.12.1 monitor - type 'help' for more information (qemu) info block drive-virtio-disk1: type=hd removable=0 file=/root/win2008r2-64-virtio.qcow2 ro=0 drv=qcow2 encrypted=0 ide1-cd0: type=cdrom removable=1 locked=0 [not inserted] floppy0: type=floppy removable=1 locked=0 [not inserted] sd0: type=floppy removable=1 locked=0 [not inserted] (qemu) change ide1-cd0 /home/kvm_autotest_root/iso/linux/RHEL6.1-Server-i386.iso (qemu) info block drive-virtio-disk1: type=hd removable=0 file=/root/win2008r2-64-virtio.qcow2 ro=0 drv=qcow2 encrypted=0 ide1-cd0: type=cdrom removable=1 locked=0 file=/home/kvm_autotest_root/iso/linux/RHEL6.1-Server-i386.iso ro=1 drv=raw encrypted=0 floppy0: type=floppy removable=1 locked=0 [not inserted] sd0: type=floppy removable=1 locked=0 [not inserted] Can not be reproduced with qemu-kvm-0.12.1.2-2.164.el6.x86_64,Mark qa_ack+ (1). /usr/libexec/qemu-kvm -name 'vm1' -monitor stdio -drive file=rhel5.7-64,if=virtio,cache=none,boot=on -net nic,vlan=0,model=virtio,macaddr=02:30:20:EC:31:c2 -net tap,vlan=0,ifname=virtio_0_6001,script=/etc/qemu-ifup,downscript=no -m 4096 -smp 2 -soundhw ac97 -redir tcp:5000::22 -vnc :0 -usbdevice tablet -rtc-td-hack -cpu qemu64,+sse2 -no-kvm-pit-reinjection -serial unix:/tmp/serial-20100608-115414-Avvj,server,nowait -drive file=RHEL-Server-5.7-x86_64-DVD.iso,media=cdrom,if=ide (2). (qemu) info block virtio0: type=hd removable=0 file=rhel5.7-64 ro=0 drv=qcow2 encrypted=0 ide0-cd0: type=cdrom removable=1 locked=0 file=RHEL-Server-5.7-x86_64-DVD.iso ro=1 drv=raw encrypted=0 ide1-cd0: type=cdrom removable=1 locked=0 [not inserted] floppy0: type=floppy removable=1 locked=0 [not inserted] sd0: type=floppy removable=1 locked=0 [not inserted] (qemu) change ide0-cd0 RHEL-Server-5.7-x86_64-DVD-bak.iso (qemu) info block virtio0: type=hd removable=0 file=rhel5.7-64 ro=0 drv=qcow2 encrypted=0 ide0-cd0: type=cdrom removable=1 locked=0 file=RHEL-Server-5.7-x86_64-DVD-bak.iso ro=1 drv=raw encrypted=0 ide1-cd0: type=cdrom removable=1 locked=0 [not inserted] floppy0: type=floppy removable=1 locked=0 [not inserted] sd0: type=floppy removable=1 locked=0 [not inserted] (qemu) change ide1-cd0 RHEL-Server-5.7-x86_64-DVD.iso (qemu) info block virtio0: type=hd removable=0 file=rhel5.7-64 ro=0 drv=qcow2 encrypted=0 ide0-cd0: type=cdrom removable=1 locked=0 file=RHEL-Server-5.7-x86_64-DVD-bak.iso ro=1 drv=raw encrypted=0 ide1-cd0: type=cdrom removable=1 locked=0 file=RHEL-Server-5.7-x86_64-DVD.iso ro=1 drv=raw encrypted=0 floppy0: type=floppy removable=1 locked=0 [not inserted] sd0: type=floppy removable=1 locked=0 [not inserted] (qemu) eject ide0-cd0 (qemu) info block virtio0: type=hd removable=0 file=rhel5.7-64 ro=0 drv=qcow2 encrypted=0 ide0-cd0: type=cdrom removable=1 locked=0 [not inserted] ide1-cd0: type=cdrom removable=1 locked=0 file=RHEL-Server-5.7-x86_64-DVD.iso ro=1 drv=raw encrypted=0 floppy0: type=floppy removable=1 locked=0 [not inserted] sd0: type=floppy removable=1 locked=0 [not inserted] |