qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Problem with `change' monitor command
@ 2008-09-17 11:46 Robert Riebisch
  2008-09-17 11:53 ` Daniel P. Berrange
  2008-09-17 14:57 ` Jamie Lokier
  0 siblings, 2 replies; 5+ messages in thread
From: Robert Riebisch @ 2008-09-17 11:46 UTC (permalink / raw)
  To: qemu-devel

Hi!

I'm using QEMU 0.9.1 and SVN on Win32 to emulate an x86 PC environment.

With `change floppy0 foo.img' I'm able to use another floppy image on
the fly, but this will only work, if the new floppy image is of the same
size as the old one. Switching from, e.g., 1.44M to 2.88M is not
recognized by the guest OS. Even rebooting the VM doesn't help, because
CMOS value 0x10 ("Floppy Drive Type") won't be adjusted.
(http://www.brl.ntt.co.jp/people/takehiko/interrupt/CMOS.LST.txt)

This is also a big problem when you omit "-fda bar.img" from the command
line. You can still change the image file in QEMU monitor, but guest OS
(here: DOS) will never recognize it, because CMOS value 0x10 still holds
"0" (= "none" for floppy0 and floppy1). Btw: It would be more
consistently to also change command-line option "-fda" to "-floppy0".

For demonstration I quickly wrote a minimal DOS tool using free Turbo
Pascal 5.5 to decode this value. Just tell me, if anyone is interested
in the binary and source code (very simple). I could also provide a
bootable disk image (FreeDOS + my tool).

Robert Riebisch
-- 
BTTR Software
http://www.bttr-software.de/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] Problem with `change' monitor command
  2008-09-17 11:46 [Qemu-devel] Problem with `change' monitor command Robert Riebisch
@ 2008-09-17 11:53 ` Daniel P. Berrange
  2008-09-17 12:07   ` Robert Riebisch
  2008-09-17 14:57 ` Jamie Lokier
  1 sibling, 1 reply; 5+ messages in thread
From: Daniel P. Berrange @ 2008-09-17 11:53 UTC (permalink / raw)
  To: qemu-devel

On Wed, Sep 17, 2008 at 01:46:13PM +0200, Robert Riebisch wrote:
> Hi!
> 
> I'm using QEMU 0.9.1 and SVN on Win32 to emulate an x86 PC environment.
> 
> With `change floppy0 foo.img' I'm able to use another floppy image on
> the fly, but this will only work, if the new floppy image is of the same
> size as the old one. Switching from, e.g., 1.44M to 2.88M is not
> recognized by the guest OS. Even rebooting the VM doesn't help, because
> CMOS value 0x10 ("Floppy Drive Type") won't be adjusted.
> (http://www.brl.ntt.co.jp/people/takehiko/interrupt/CMOS.LST.txt)
> 
> This is also a big problem when you omit "-fda bar.img" from the command
> line. You can still change the image file in QEMU monitor, but guest OS
> (here: DOS) will never recognize it, because CMOS value 0x10 still holds
> "0" (= "none" for floppy0 and floppy1). Btw: It would be more
> consistently to also change command-line option "-fda" to "-floppy0".

The -fdXX, -hdXX, etc args are all legacy syntax. The recommended way
to specify disks is via the -drive parameter, so no change to -floppy0
is required.

Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] Problem with `change' monitor command
  2008-09-17 11:53 ` Daniel P. Berrange
@ 2008-09-17 12:07   ` Robert Riebisch
  0 siblings, 0 replies; 5+ messages in thread
From: Robert Riebisch @ 2008-09-17 12:07 UTC (permalink / raw)
  To: qemu-devel

"Daniel P. Berrange" wrote:

> The -fdXX, -hdXX, etc args are all legacy syntax. The recommended way
> to specify disks is via the -drive parameter, so no change to -floppy0
> is required.

OK, but I guess this doesn't fix the CMOS problem. Right?

Robert Riebisch
-- 
BTTR Software
http://www.bttr-software.de/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] Problem with `change' monitor command
  2008-09-17 11:46 [Qemu-devel] Problem with `change' monitor command Robert Riebisch
  2008-09-17 11:53 ` Daniel P. Berrange
@ 2008-09-17 14:57 ` Jamie Lokier
  2008-09-17 15:07   ` Robert Riebisch
  1 sibling, 1 reply; 5+ messages in thread
From: Jamie Lokier @ 2008-09-17 14:57 UTC (permalink / raw)
  To: qemu-devel

Robert Riebisch wrote:
> I'm using QEMU 0.9.1 and SVN on Win32 to emulate an x86 PC environment.
> 
> With `change floppy0 foo.img' I'm able to use another floppy image on
> the fly, but this will only work, if the new floppy image is of the same
> size as the old one. Switching from, e.g., 1.44M to 2.88M is not
> recognized by the guest OS. Even rebooting the VM doesn't help, because
> CMOS value 0x10 ("Floppy Drive Type") won't be adjusted.
> (http://www.brl.ntt.co.jp/people/takehiko/interrupt/CMOS.LST.txt)

I agree that CMOS should be adjusted, but only on the next reboot.

Changing floppy _drive_ type is not possible until the next reboot,
and it might confuse the OS to try it: you can't replace a floppy
drive on a real PC while the OS is running either.

It might be possible to force the drive type to 2.88M at boot time
even with a 1.44 image, though.  I think those drives can read smaller
capacity disks, and the OS should be fine with that.

-- Jamie

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] Problem with `change' monitor command
  2008-09-17 14:57 ` Jamie Lokier
@ 2008-09-17 15:07   ` Robert Riebisch
  0 siblings, 0 replies; 5+ messages in thread
From: Robert Riebisch @ 2008-09-17 15:07 UTC (permalink / raw)
  To: qemu-devel

Jamie Lokier wrote:

> > With `change floppy0 foo.img' I'm able to use another floppy image on
> > the fly, but this will only work, if the new floppy image is of the same
> > size as the old one. Switching from, e.g., 1.44M to 2.88M is not
> > recognized by the guest OS. Even rebooting the VM doesn't help, because
> > CMOS value 0x10 ("Floppy Drive Type") won't be adjusted.
> > (http://www.brl.ntt.co.jp/people/takehiko/interrupt/CMOS.LST.txt)
> 
> I agree that CMOS should be adjusted, but only on the next reboot.

That would be OK for me. I've already looked at the source code, but
it's far beyond my limited knowledge. So I hope someone else will
provide a proper patch.

> Changing floppy _drive_ type is not possible until the next reboot,
> and it might confuse the OS to try it: you can't replace a floppy
> drive on a real PC while the OS is running either.

You can, but only an USB FDD. ;-)

Robert Riebisch
-- 
BTTR Software
http://www.bttr-software.de/

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-09-17 15:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-17 11:46 [Qemu-devel] Problem with `change' monitor command Robert Riebisch
2008-09-17 11:53 ` Daniel P. Berrange
2008-09-17 12:07   ` Robert Riebisch
2008-09-17 14:57 ` Jamie Lokier
2008-09-17 15:07   ` Robert Riebisch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).