Ubuntu with KVMΒΆ
Ubuntu. You can | use virt-manager if you prefer a graphical user | interface. Do submit your relevant virt-manager configs if you have some!
are | working from. If not, adapt the commands accordingly.
Installation steps:
Download Ubuntu 12.04 LTS 64 bit (
ubuntu-12.04.1-server-amd64.iso) fromhttp://www.ubuntu.com/download/server. For example, run the
- following
commands within the OpenCrowbar git checkout on the qemu-kvm host:
cd dev-setup/qemu-kvm aria2c http://releases.ubuntu.com/precise/ubuntu-12.04.1-server-amd64.iso.torrent
- Create a blank disk image that is at least 20 GB. For example:
qemu-img create -f qcow2 -o preallocation=metadata ubuntu-12.04.qcow2 20G
Start a VM with the desired network (private network with NAT), with the ISO
and disk attached. For example:
sudo qemu-kvm -m 2G -daemonize -vnc :10 -cdrom ubuntu-12.04.1-server-amd64.iso \ -net nic,model=virtio,macaddr=DE:AD:BE:EF:30:22 \ -net tap,script=qemu-ifup \ -drive file=ubuntu-12.04.qcow2,cache=none,if=virtio
script=qemu-ifup points to the script atqemu-kvm/qemu-ifup,
| so make sure you are running the above command in the same directory,
or
| modify it accordingly.
- Connect to the VM via VNC and install the system:
vncviewer :10
which | you can cancel and jump to manual configuration instead with the following | settings:
IP address: 192.168.124.10 Netmask: 255.255.255.0 Gateway: 192.168.124.1
find out
| on Linux systems by running grep nameserver /etc/resolv.conf on
the host.
| For example, within the SUSE intranet it is 10.120.2.88. If the
host is not
| running in any internal or corporate network, you can use
8.8.8.8.
proxy | can also be left blank.
Once installation is complete, you can shutdown the VM (
sudo poweroff) andsubsequently start it in the same way, minus the
-cdrom ...- option. Or
use the
- qemu-kvm/start-vm)
helper script.