On Tue, Oct 19, 2010 at 4:43 AM, Alex Davis <alex14641@xxxxxxxxx> wrote: > Steps to reproduce: > ) Download the first two Slackware-13.1 32-bit CD-ROM ISO images. > ) Start KVM with the following command > qemu-system-x86_64 -m 1024M \ > -cdrom < full path of 1st install disk > \ > -boot d > ) Hit return when prompted for extra boot parameters. > ) Hit return when asked to select a keyboard map. > ) Hit return at the login prompt. > ) cat /sys/block/sr0/size: this should return 1209360. > ) Press Alt-Ctrl-2 to access the monitor > ) eject ide1-cd0 > ) change ide1-cd0 < full path name of 2nd install disk > > ) Press Alt-Ctrl-1 to return to the guest. > ) dd if=/dev/sr0 of=/dev/null bs=512 skip=1209360 count=3 > this should return > 3+0 records in > 3+0 records out. > instead it returns 0+0.... > ) cat /sys/block/sr0/size: this still returns 1209360; it should return 1376736. > > Oddly, when "mount /dev/sr0 ...." is executed in the guest, ls of the mounted directory shows the correct contents for the 2nd CD. After changing the CD-ROM, does running "blockdev --rereadpt /dev/sr0" update the size as expected? You ejected the CD-ROM on the QEMU side, the guest doesn't necessarily know about the medium change. What happens when you use "eject /dev/sr0" inside the guest instead? I don't know how CD-ROM media change works on real hardware, but that is the behavior that QEMU should be following. Stefan -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html