System Emulators / Virtual Environments

QEmu

http://bellard.org/qemu/index.html
http://wiki.ubuntuusers.de/QEMU

[Strg] + [Alt] to release mouse

http://www.linux-community.de/Internal/Artikel/Print-Artikel/LinuxUser/2007/06/Mit-Q-zum-Partnertausch
to boot from an iso image:

qemu -cdrom knoppix.iso -boot d -m 512

to boot from a real cd:

qemu -cdrom /dev/cdrom -boot d -m 512

to set up a hard disk to use with qemu:

qemu -cdrom /dev/cdrom -boot d -m 512 -hda /dev/hdb

or as an image file:
Set up the image using

qemu-img create dsk.img 5G

and use it:

qemu -cdrom /dev/cdrom -boot d -m 512 -hda dsk.img

if you want that your image starts at no size: -f qcow2 as parameter when creating the image!

Qemulator - a very good GTK GUI for QEmu

http://qemulator.createweb.de/

$ sudo aptitude install qemulator

VirtualBox

Installation:

sudo apt-get install virtualbox-ose

Now add the users to the group vboxusers (to allow them to use the program) [NOT NEEDED IN INTREPID]:

# in general
sudo adduser <username> vboxusers
# for yourself:
sudo adduser $USER vboxusers

Starting virtualbox:

$ virtualbox

You may change the folder where your virtual machines are stored under File → Preferences → General

Now create your virtual machine:

New → Next → "virt Windows XP machine", "Windows XP" → Next → 768 MB → New Hard Disk → Next → Dynamically expanding image → Next → Filename: "virt Windows XP machine" , 10 GB → Next → Next → Finish

Mount CD: Settings → CD/DVD-ROM→ Mount ISO-Image

Start and install

Install Guest extensions: Download them: http://dlc-cdn-rd.sun.com/c1/virtualbox/2.0.4/VBoxGuestAdditions_2.0.4.iso?e=1235946310&h=4489beaaa0c9a733200afd2652ac02d3
mount iso image and install

host mode for the network interface

source: ( http://wiki.ubuntuusers.de/VirtualBox/Netzwerk )

sudo apt-get install bridge-utils uml-utilities

execute the following script vbox_tun.sh before you startup your machine:

#!/bin/bash

if [ $UID != "0" ]
  then
    sudo $0 $1 $(id -un)
    exit
fi

eth=eth2
bridge=br0
iface=vbox0
user=$2

case "$1" in
  start)
    exists=`brctl show|grep -c ${bridge}`
    if [ ${exists} == "0" ]
      then
        brctl addbr ${bridge}
        ifconfig ${eth} 0.0.0.0
        brctl addif ${bridge} ${eth}
        dhclient ${bridge}
        chmod 0660 /dev/net/tun
        chgrp vboxusers /dev/net/tun
    fi

    tunctl -t ${iface} -u ${user}
    ifconfig ${iface} up
    brctl addif ${bridge} ${iface}
    ;;
  stop)
    brctl delif ${bridge} ${iface}
    tunctl -d ${iface}
    ;;
  *)
    echo "Usage: $0 [start|stop]"
    exit 1
esac

start the tunnel-device using ./vbox_tun.sh start stop it using ./vbox_tun.sh start after starting the device set the network adapter in VirtualBox to vbox0!

Serial Ports

host mode /dev/ttyS0

if it doesn't work right out of the box try to add the serial adapter manually via the "Add hardware..." dialogue on the vitualized Windows machine.

USB devices

Add the following line to fstab and reboot:

none /proc/bus/usb usbfs devgid=46,devmode=666 0 0

Be in the vboxusers group. You need the non OSE version. (get here: http://www.virtualbox.org/wiki/Linux_Downloads) or: get USB 2.0 to work under Ubuntu Intrepid Ibex 8.10: http://forums.virtualbox.org/viewtopic.php?p=33944#p33944

This seems to be enough for Ubuntu 8.10 Run id to check if you are member of the group vboxusers and to see its groupID. If you're not a member of the vboxusers group, add yourself with the following command with root privileges, then log off and back on.

$ sudo usermod -aG vboxusers <your username>

add in /etc/fstab:

none /sys/bus/usb/drivers usbfs devgid=501,devmode=664 0 0

CLI: vboxmanage

controlling VirtualBox from the command line: http://www.linux.com/feature/151029

list all installed VMs:

$ vboxmanage list vms

start the VM with the name "Windows XP":

$ vboxmanage startvm "Windows XP"

Parallels Desktop for Linux

not developed any more http://www.parallels.com/products/workstation/

VMware Workstation / VMware Server

http://www.vmware.com/products/ws/ and http://www.vmware.com/products/server/

Bochs emulator

Xen

Comments