Ubuntu is a free server operating system that is easy to maintain and build on. I’m a big fan; and recently, I’ve been using it to run our development environments at the office. If, like us, you’re looking to build a low-cost environment for non-production work, here’s an article that may be a useful start.
- To get started, you’ll need Ubuntu Server. If you’re planning to use the server for production, download the latest LTS; otherwise, you can just get the latest version.
- You’ll need the hardware to run the hypervisor, of course. Make sure that the machine that you use has ample CPU’s (64-bit processors with hypervising instructions), memory, and storage space (RAID-1 15K SAS should be sufficient for a production environment as long are you’ve got a SAN for storage; if your physical host is also supposed to be storing the VM’s, I assume this is a test or dev environment — I’d recommend at least two SATA drives in RAID-0). If you have spare hardware, I would definitely recommend setting up one machine as an iSCSI or NFS SAN instead.
- Run the Ubuntu Server installation on your compute node. I won’t walk you through the installation, as this is not a KB article on setting up Ubuntu. However, do make sure you at least consider the following:
- You may wish to set up your storage partitions as LVM so that you can add disks later (that is, if you’re using your compute node as a storage device as well)
- When prompted for the services to install, you should at least set up openSSH and VM Server services.
- Once your system is installed, you may wish to set up your public-key authentication. You can find information on how to do this in putty here: http://www.ualberta.ca/CNS/RESEARCH/LinuxClusters/pka-putty.html
- Make sure that you have all the necessary libraries: apt-get install qemu-kvm libvirt-bin ubuntu-vm-builder bridge-utils openssh-server virt-manager convirt
- Set up your putty server profile (skip for Linux users):
- Specify the host address
- Specify the auto-login username in Connections > Data
- Enable X11 forwarding in Connections > SSH > X11
- Specify the private key file to be used in Connections > Auth (if applicable)
- Make sure you have Xming installed. It needs to be running when you run putty.
- If you’re using linux, when you connect via SSH be sure to specify the X11 parameters and public key parameters like so:ssh <host> -X -i <private key file>
Private keys can be generated using ssh-keygen as described here: https://help.ubuntu.com/community/SSH/OpenSSH/Keys
- At this point, your host should be ready to be used. You can create the VM in two ways:
- run virt-manager and create the machine using the GUI
- run ubuntu-vm-build with syntax like this:sudo ubuntu-vm-builder kvm hardy –addpkg vim –mem 256 –libvirt qemu:///system
Set up NFS4 shares, so that you can share VM’s and migrate them from one compute node to another: https://help.ubuntu.com/community/NFSv4Howto
Set up a bridge so that your VM’s can use the LAN: https://help.ubuntu.com/8.04/serverguide/C/libvirt.html
NOTE FOR LINUX MACHINES: when cloning a linux machine, don’t forget to delete /etc/udev/rules.d/70-persistent-net.rules: http://muffinresearch.co.uk/archives/2008/07/13/vmware-siocsifaddr-no-such-device-eth0-after-cloning/