Virtualisation with KVM
Links
What to install to run your KVM host server on ubuntu:
sudo aptitude install kvm libvirt-bin ubuntu-vm-builder bridge-utils
What to do in the virtual machine:
/etc/inittab
[...] # Example how to put a getty on a serial line (for a terminal) # T0:23:respawn:/sbin/getty -L ttyS0 57600 vt100 #T1:23:respawn:/sbin/getty -L ttyS1 9600 vt100 [...]
telinit q
/boot/grub/menu.lst
[...] ## ## Start Default Options ## ## default kernel options ## default kernel options for automagic boot options ## If you want special options for specific kernels use kopt_x_y_z ## where x.y.z is kernel version. Minor versions can be omitted. ## e.g. kopt=root=/dev/hda1 ro ## kopt_2_6_8=root=/dev/hdc1 ro ## kopt_2_6_8_2_686=root=/dev/hdc2 ro # kopt=root=/dev/mapper/vg0-root ro console=tty0 console=ttyS0,115200 [...]
update-grub
What to do on the KVM server host:
edit /etc/libvirt/qemu/vmhostname.conf and add in the <device> section:
[...]
<serial type='pty'>
<target port='0'/>
</serial>
<console type='pty'>
<target port='0'/>
</console>
[...]
Reload your config.
Do the connection:
virsh # console vmhostname Connected to domain vmhostname Escape character is ^]
To exit the console press right control + 5 (on a german keyboard layout)
See https://help.ubuntu.com/10.04/serverguide/C/libvirt.html
create a disk image
create a virtual machine
run the virtual machine
For step by step howto see help.ubuntu.com
Quick list: