QEMU on FreeBSD
Using QEMU processor emulator on FreeBSD
Is straightforward, although to take advantage of virtualisation features it is recommended to build the kqemu accellerator module.
make WITH_KQEMU=1 install clean
Loading up the kqemu kernel module
You may want to do this automatically at boot time by adding the following line to your /boot/loader.conf
If during make you chose to use DMA for IDE, you will also need to load the aio kernel module
Using QEMU for the first time
QEMU is really easy to use. We will install Centos Linux in this example.
This will be the disk image that will be used as the hard disk for the virtual installation.
qemu-img centos.img 8G
This will create an 8GB disk image for your installation called centos.img This is straightforward, but you can use the -h option to see other options.
Making sure SDL is working
QEMU uses SDL for video output, you may need to specific the video option for SDL in your shell environment:
Booting QEMU and installation
qemu -cdrom CentOS-4.2-i386-bin1of4.iso -hda centos.img
This will boot from cdrom loaded with CentOS disk 1 iso, and use our recently created disk image as the first IDE hard disk.
If all goes well you will get the CentOS boot screen
The QEMU console is very useful for a few basic tasks. It is accessed by pressing ctrl-alt-2.
- Changing Disks
When you are installing certain distributions like Centos you will need to change disks. When the time comes, you switch to the QEMU console and type
change cdrom CentOS-4.2-i386-bin2of4.iso
- Sending key combination commands
Another common use is when you want to switch to the console from graphical display in your virtual session. For example to access VTY1 you would switch to the console and type:
You can switch back to the virtual session by pressing ctrl-alt-1
- QEMU Homepage
- "Changing Disks" - http://www.h7.dion.ne.jp/~qemu-win/HowToFloppyCdrom-en.html