How To Change The Floppy Image Of Qemu?

I'm developing my own OS, but I'm having some problems with Qemu, because I need to change the floppy image from grub.img to os.img while the emulation is running, but how can I do this?


Solution 1:

You can open qemu's console by pressing Ctrl-Alt-2 then type:

(qemu) change floppy0 os.img

Ctrl-Alt-1 to switch back to the VM's display.

If you start qemu from a terminal, an easier way of doing this is to run qemu with the -monitor stdio option, which will give the same qemu console in the terminal window.