QEMU tips and tricks

-----------------

Starting Qemu with a bat file

Exemple:

 

@ECHO OFF

REM Start qemu on windows.

 

SET SDL_VIDEODRIVER=directx

 

REM QEMU_AUDIO_DRV=dsound or fmod or sdl or none can be used. See qemu -audio-help.

SET QEMU_AUDIO_DRV=dsound

 

REM SDL_AUDIODRIVER=waveout or dsound can be used. Only if QEMU_AUDIO_DRV=sdl.

SET SDL_AUDIODRIVER=dsound

 

REM QEMU_AUDIO_LOG_TO_MONITOR=1 displays log messages in QEMU monitor.

SET QEMU_AUDIO_LOG_TO_MONITOR=0

 

REM #########################################################

REM # Boot disk image + use eth0 + Video Display Device = std

REM # remap 5555 to guest telnet and 5556 to guest ssh

REM #########################################################

REM

REM Starting on the iso image for installing Fedora 10 can be done by adding:

REM -boot d -cdrom Images/F10-i686.iso

 

qemu.exe -L Bios -m 1024 -name Fedora10 -hda Images/fedora10.img -vga std -soundhw es1370 -localtime -M pc -net nic,model=e1000 -net user -redir tcp:5555::23 -redir tcp:5556::22

 

Changing a CD-ROM image

To change a CD-ROM image, please use QEMU Monitor:

        To see the Monitor, press Ctrl-Alt-2 keys together.

        To go back to the guest OS, press Ctrl-Alt-1 keys.

        With the latest GTK user interface the console is now available in the View menu as compatmonitor0

        And going back to the guest OS window in the View menu as VGA

 

(qemu) eject ide1-cd0
(qemu) change ide1-cd0 filename.iso

 

Note:

        Please use slash instead of back slash in the QEMU Monitor window.

        Path of the filenames is relative to the directory where qemu.exe lives.

        You can see the status of the block devices with:

 

(qemu) info block

ide0-hd0: test-i386/hda.qcow2 (qcow2)
    Cache-mode:      writeback

ide1-cd0: Images/os.iso (raw, read-only)
    Removable device: not locked, tray closed
    Cache mode:       writethrough
../..

 

 

-----------------

This program is provided as is and without any warranty.