Posts Tagged ‘kvm’
Launching Ubuntu 11.04 Instances on KVM
This post is mostly for my own record as I keep having to look at my shell history every time I want to spin up a new virtual machine on my KVM server at home (so for those looking for something earth shattering, move along). For anyone looking for a how-to to get started, I followed an entry over a howtoforge. It’s pretty good, so no need to replicate.
Now, the goods.
If this is your first image, I recommend looking for the section in the page referenced titled “3 Creating An Image-Based VM” (seems no way to link to specific sections..). For me, I just copy one of the dirs from an existing one and clear out the ubuntu-kvm dir and edit vmbuilder.partition as necessary.
Then, from that dir, run:
sudo vmbuilder kvm ubuntu --suite=natty --flavour=virtual --arch=amd64 -o --libvirt=qemu:///system --ip=172.16.0.10 --templates=mytemplates --user=wyatt --name=Wyatt --pass=supersecret --addpkg=vim-nox --addpkg=unattended-upgrades --addpkg=acpid --addpkg=openssh-server --firstboot=/home/user/host.whatan00b.com/boot.sh --mem=1024 --hostname=host.whatan00b.com --bridge=br0 --part=vmbuilder.partition
Then, start the vm:
sudo virsh start host.whatan00b.com
It should boot shortly and you can ssh to the shiny new vm with the IP and username/password specified. Hopefully soon I can find some fancy way to integrate Puppet into the mix.
Tags: kvm, ubuntu, virtualization
Filed under How-Tos / Tips :
Comments (0) :
Oct 23rd, 2011