From: Alex Davis <alex14641@yahoo.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: kvm@vger.kernel.org
Subject: Re: CD-ROM size not updated when switching CD-ROM images.
Date: Tue, 19 Oct 2010 17:03:12 -0700 (PDT) [thread overview]
Message-ID: <511807.4805.qm@web50208.mail.re2.yahoo.com> (raw)
In-Reply-To: <AANLkTik3W-sKx9SLYmpDbSVkwZx-OgMtCKN2mAu4Jny_@mail.gmail.com>
I code, therefore I am
--- On Tue, 10/19/10, Stefan Hajnoczi <stefanha@gmail.com> wrote:
> From: Stefan Hajnoczi <stefanha@gmail.com>
> Subject: Re: CD-ROM size not updated when switching CD-ROM images.
> To: "Alex Davis" <alex14641@yahoo.com>
> Cc: kvm@vger.kernel.org
> Date: Tuesday, October 19, 2010, 4:31 AM
> On Tue, Oct 19, 2010 at 4:43 AM, Alex
> Davis <alex14641@yahoo.com>
> 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?
The install CD does not have the blockdev command.
> 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 get a 'no medium found' error from the 'dd..' command. After
going into the the monitor, ejecting and reloading the disk,
I still get the size of the first disk in the guest.
>
> I don't know how CD-ROM media change works on real
> hardware, but that
> is the behavior that QEMU should be following.
>
> Stefan
next prev parent reply other threads:[~2010-10-20 0:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-19 3:43 CD-ROM size not updated when switching CD-ROM images Alex Davis
2010-10-19 8:31 ` Stefan Hajnoczi
2010-10-20 0:03 ` Alex Davis [this message]
2010-10-20 16:44 ` David Ahern
2010-10-20 23:28 ` Alex Davis
2010-10-30 20:32 ` Alex Davis
-- strict thread matches above, loose matches on Subject: below --
2010-10-20 12:50 Alex Davis
2010-10-30 21:24 Alex Davis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=511807.4805.qm@web50208.mail.re2.yahoo.com \
--to=alex14641@yahoo.com \
--cc=kvm@vger.kernel.org \
--cc=stefanha@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox