QEMU is an emulator for PC systems which can runs on x86 systems. The QEMU addon in IPFire is specially adapted for this system. It provides the ability to emulate one or more operating systems. The great advantage of QEMU is that it can emulate other processors (like ARM) and even VMware images can be imported. With enough computing power and memory you can to emulate all existing OSses: Windows, Linux, UNIX. In fact what ever you want. Allow at least 256 MB for your host system (IPFire) to keep the system running.
Remember: It doesnt matter how powerful your CPU is, if your machine has less than 2 GB memory, you wont have much fun with it QEMU! QEMU is a brilliant idea, but it will consume a lot of memory.
After this run
paxctl -m /usr/bin/qemu
to disable qsecurity MPROTECT for qemu (qemu-0.15.0-14). Now create a “virtual disk” with 8 GB (this is as an example that may be suitable for a basic XP installation, if you try to install a full debian - 64 gb disk space may find your acceptance) with the following command:
qemu-img create /PATH/DATEINAME.img 8GB
it takes time - get a coffee - spend some time with your wife or children - it takes time
YEPP Done. Now we are ready to install the operating system:
To access your QEMU virtual machine, VNC may be a good idea. Start the viewer and see:
me ( heisenberg - as the translator of this page) may give you this as an additional information: if you are a windows kid - you may try dameware (http://www.dameware.com/) - its free for 30 days - and yes (excuse me again) i fucking love it (oh yess - i do) - but feel free to make your own decision)
Start QEMU with the following options:
qemu -vnc :1 -hda /mnt/harddisk/testimage.img -cdrom /mnt/harddisk/ubuntu-7.10-desktop-i386.iso -no-acpi -m 256 -net nic -net user -boot d -usbdevice tablet &
Remember that this is an example - change it to your needs: In this example(!) the QEMU-harddisk (testimage.img) and the UBUNTU ISO (ubuntu-7.10-desktop-i386.iso) will be accesesed via a second harddisk which is mounted via ExtraHD - if you like just use your favourite CD/DVD-image as your ISO.image to boot from.
|How to use the start parameters|
|-vnc :1|| instructs the integrated VNC-server to send its output over port 5901
- be aware of your firewall settings
|-no-acpi||starts QEMU without any ACPI features|
|-m 256|| allocates 256 MB MEMORY to your virtual machine;
default is 128 MB, 512 MB for XP will be fine
|-net nic||emulates a Realtek RTL 8029(AS) PCI Ethernet|
|-net nic,model=rtl8139||emulates a Realtek RTL 8139 PCI Ethernet|
|-net user||allows NAT on the network interface card|
|-boot d||boots from drive D: ( your CDRom maybe)|
|-usbdevice tablet||emulates a HID-mouse|
|-daemonize||executes QEMU in the background|
|-redir tcp:3389::3389|| allows the use of the RDP protocol for Windows clients
→ access it on a win machine via: mstsc /V:IP_ADRESS /console
|-soundhw es1370,sb16,adlib||only one possible soundcard|
|-localtime||gets the system time from the host system|
the “-daemonize” option is a good option to keep your system running stable
on some test systems we run QEMU with the option “-&” but they result in an unstable system.
and ! as always ! - be part of the system - share your knowledge - and let us know if you find a good combination of parameters
If you want to run it as a server under QEMU please consider the following points: The example shown below is used for the blue (blue0) interface and may be adjusted for your own setup.
The following steps are required:
1. Load the script to /etc/init.d
Therefor switch to the directory /etc/init.d/ with a:
and load the bridge script with:
After a successful download the rights of the owner and the symlinks are need to be changed:
ln -s /etc/init.d/bridge /etc/rc.d/rc3.d/S19bridge chmod 754 /etc/init.d/bridge
2. Reboot IPFire
After a reboot the modules needed to be loaded again and QEMU needs to be started manually.
modprobe kvm_intel qemu -vnc :1 -hda /pfad zum image -m 1536 -k de-ch -net nic,model=virtio -net tap, ifname=tap0,script=no -soundhw ac97 -boot c -usbdevice tablet -enable-kvm -daemonize
I am using kvm and virtio drivers! if you are using some different ones you need to adjust it accordingly !!!
if you find errors , mostly after a reboot, you may find this interesting:
use a terminal session the vmmon error: sudo modprobe vmmon the vmci error: sudo modprobe vmci your virtual machine starts, but with network error: sudo modprobe vmnet still does not work ? change to /usr/bin (if you installed it by standard you will find it here - others: find this file and execute) vmware-netcfg a window will open - change your first network card to something different like: from auto to ethX - or back do not think . just do it - this will initzialize your network again if you dont trust - change it from auto to ethX- accept - and change it back to the original, BUT ACCEPT - to initialize and it will work enjoy cheers Heisenberg
For normal operation of QEMU, the following parameters should be quite sufficient:
qemu -vnc :1 -hda /mnt/harddisk/testimage.img -m 256 -net nic -net user -boot c -usbdevice tablet &
qemu-img create -f vmdk playdisk.vmdk 6000000
Creates a blank hard disk image (VMWare formated) with 6GB memory.