Why install on Virtual server
Here is an overview of a sample partioning on hard drive.
|Directory||Type||File System||Typical Size||Size LAB|
Can your hardware support KVM?
inspect the cpuinfo virtual file:
egrep '(vmx|svm)' --color=always /proc/cpuinfo
No output means no KVM support. Try checking virtualization settings in the BIOS.
If there is support, install the required packages:
$ sudo apt-get install kvm libvirt-bin ubuntu-vmbuilder qemu bridge-utils virt-viewer
Add your user name to the libvirtd group
More about user management later. -->
$ sudo usermod -aG libvirtd `id -un`
This will give you access to the system-wide libvirtd instance. Log out and in to make this effective.
Test the installation is valid:
virsh is the main interface for managing guest domains
$ virsh -c qemu:///system list Id Name State $
Run the KVM command as root to reveal problems, such as lack of hardware
kvm command can be used to start guest machines directly
$ sudo kvm QEMU PC emulator version 0.9.1 (kvm-62), Copyright (c) 2003-2008 Fabrice Bellard usage: qemu [options] [disk_image] ... $
You need to configure bridge networking to enable network services to the VM and VM access to the outside world. The VM will access the network through the host’s physical network interface.
Install the bridge utility with the following command
sudo apt-get install bridge-utils
Stop networking services
sudo invoke-rc.d networking stop
Edit /etc/network/ interfaces and add the br0 section:
auto lo iface lo inet loopback auto eth0 iface eth0 inet manual auto br0 iface br0 inet static address 192.168.0.10 network 192.168.0.0 netmask 255.255.255.0 broadcast 192.168.0.255 gateway 192.168.0.1 bridge_ports eth0 bridge_stp off bridge_fd 0 bridge_maxwait 0
You may also use DHCP instead of fixed IP address.
Restart networking services:
sudo /etc/init.d/networking restart