Topic: QEMU on FreeBSD
After scottro suggestion:
http://forums.bsdnexus.com/viewtopic.ph … 707#p13707
I wrote short qemu howto install/usage on FreeBSD as host os, and in this example with Win2000 as guest os. ![]()
changelog:
1. removed useless /etc/qemu-ifup script [it was used in older versions of qemu with tap/bridge interfaces]
2. added info about sound emumation inside qemu OS.
3. removed HACKS_CIRRUS from options [thx to scottro sugestion], reason here: http://forums.bsdnexus.com/viewtopic.ph … 036#p14036
4. sometimes OS installation requires unload of kqemu. short: install without kqemu and the use with kqemu
Install qemu with options showed below:
# cd /usr/ports/emulators/qemu && make install cleanOptions for qemu:
[X] KQEMU Build with (alpha!) accelerator module
[ ] HACKS_CIRRUS Large display speedup (buggy!)
[ ] RTL8139_TIMER allow use of re(4) nic with FreeBSD guests
[ ] SAMBA samba dependency (for -smb)
[X] SDL SDL/X dependency (graphical output)
[X] CDROM_DMA IDE CDROM DMAinstall and configure sudo:
# cd /usr/ports/security/sudo && make install cleansudo config:
# cat > /usr/local/etc/sudoers << EOF
root ALL=(ALL) ALL
username ALL=(ALL) NOPASSWD: ALL
EOFusername is YOU.
load needed modules:
# sudo kldload aio
# sudo kldload kqemucreate Windows2000 install CD image, use cat or dd:
% cat /dev/acd0 > ~/qemu/win2k.iso
% dd bs=2048 if=/dev/acd0 of=~/qemu/win2k.isocreate qemu image for new OS:
% qemu-img create -f qcow2 ~/qemu/win2000.img 4Ginstall new os, Windows2000 in our example:
% qemu -boot d -hda ~/qemu/win2000.img -m 128 -cdrom ~/qemu/win2k.iso -win2k-hack -localtimeif You have any problems while installing the OS then unload kqemu module and install again, then after install, load the kqemu module again:
% sudo kldunload kqemu
% qemu -boot d -hda ~/qemu/win2000.img -m 128 -cdrom ~/qemu/win2k.iso -win2k-hack -localtime
% sudo kldload kqemutypical usage of OS under qemu:
% qemu -hda ~/qemu/win2000.img -m 256 -localtimetypical usage of OS under qemu in snapshot mode [to commit made changes hit left_CTRL+left_ALT+2 and type commit]:
% qemu -hda ~/qemu/win2000.img -m 256 -localtime -snapshot1. to switch focus between qemu mouse focus and X11 mouse focus use: left_CTRL+left_ALT
2. to ensure that You use kqemu kernel module in user mode hit left_CTRL+left_ALT+2 and type info kqemu, if everything is ok You will see:
kqemu support: enabled for user codeif not You will see:
kqemu support: disabledif disabled it will work, but terribly slow, You will be running at Pentium 75 speed at host with CPU AthlonXP 1.66GHz.
3. to switch between qemu console and qemu os emualtion use left_CTRL+left_ALT+2 to go to console and left_CTRL+left_ALT+1 to back to emulation.
4. enabling network on emulated os, use DHCP configuration inside emulated os to get automatic IP adress 10.x.x.x
after You quit You os inside emulated os, or by qemu console left_CTRL+left_ALT+2 and type quit use this command to launch again Your emulated OS:
% qemu -hda ~/qemu/win2000.img -m 256 -localtimeHow to have sound in qemu OS, You just need to launch qemu the way I listed above, only with -soundhw sb16 or -soundhw es1370 to emulate Sound Blaster 16, or Sound Blaster 128. You can also enable standart annoying BEEP with -soundhw pcspk. You can also enable all three of them like that: -soundhw sb16,es1370,pcspk, or just BEEP + one of them: -soundhw es1370,pcspk, examples
% qemu -hda ~/qemu/win2000.img -m 256 -localtime -soundhw pcspk% qemu -hda ~/qemu/win2000.img -m 256 -localtime -soundhw es1370,pcspk% qemu -hda ~/qemu/win2000.img -m 256 -localtime -soundhw es1370,pcspk,sb16fluxbox add-on:
in ~/.fluxbox/apps:
# qemu
[app] (class=SDL_App)
[Workspace] {2}
[Deco] {BORDER}
[end]resources:
man qemu-img
man qemu
man aio
man dd
man cat
http://kidsquid.com/cgi-bin/moin.cgi/QuickStartGuide
http://qemu-forum.ipi.fi/qemu-snapshots/
http://qemu-forum.ipi.fi/
http://qemu.org/user-doc.html
http://en.wikipedia.org/wiki/QEMU
The sameschema works for Solaris 10, You only do not use -win2k-hack.
feel free to point errors, typo and Your hints/suggestions here.
Last edited by vermaden (2007-02-05 03:34:49)
[color=Blue]Linux is not UNIX! Face it! It is not an insult. It is fact: GNU is a recursive acronym for