Installing oVirt 3.4
09 Apr 2014So I build a lot of projects for fun at home, and I have for a long time wanted to stand up lots of little machines (jenkins, nexus, test machines, etc…) to help me with the development of those projects. I am at home, and I am not interested in running an entire server farm (my house is warm enough thank you); of course virtualization is the answer!
- VMWare: I know that they now have a free version of ESXi, but I want to be able to manage the cluster from the browser and they are still charging for vSphere (or vCenter I can’t remember which is which)
- VirtualBox: I love VirtualBox; it is easy to use and they have an api and several projects have made web interfaces for controlling it, however it doesn’t have the room for expansion. Each installation is kinda tied to the host and it is a pain to move around
- KVM/QEMU/libVirt: The heart of linux virtualization. Works amazing, pain to setup/manage.
- oVirt: Looked very promising, by building on top of the qemu solution, but adding some fancy management via a web interface. With the release of 3.4 I thought it might finally be time to give this a whirl.
I grabbed an old i3 machine that I had laying around, booted it into the BIOS and made sure the VT-x extensions were enabled. First I wanted to install the latest Fedora 20, following the oVirt documentation I discovered (the hard way) that not all of the dependencies for oVirt are in the F20 repository.
So I backed down to F19….The yum install of ovirt rpms went fine, but the setup scripts kept dying and it just wouldn’t initialize the VDSM services.
CentOS 6.5 – Winner! Everything worked! … eventually. Below are the annotated steps that I followed.
*Note – Several steps in this installation require FQDNs so I went ahead and created two static IPs in DNSMasq one for the hardware MAC on the host machine and one for a random virtual MAC address for the engine VM that will get assigned in the installer.
######################### On Host Machine #################
Install the oVirt yum repository
sudo yum localinstall -y http://ovirt.org/releases/ovirt-release.noarch.rpm sudo yum localinstall -y http://ftp.osuosl.org/pub/fedora-epel/6/i386/epel-release-6-8.noarch.rpm sudo yum install -y ovirt-hosted-engine-setup screen
Create some folders on the host machine that will be used as NFS exports
mkdir /home/vmdrives chown -R 36:36 /home/vmdrives mkdir /home/vmdata chown -R 36:36 /home/vmdata
Since we are going to run the engine as a VM inside the cluster we need to download a min installer for CentOS.
mkdir /home/tmp && cd /home/tmp curl -O http://mirrors.kernel.org/centos/6.5/isos/x86_64/CentOS-6.5-x86_64-minimal.iso chown -R 36:36 /home/tmp
Edit /etc/exports; add the following lines to enable the NFS shares
/home/tmp *(rw,async,no_wdelay,no_root_squash,insecure_locks) /home/vmdrives *(rw,async,no_wdelay,no_root_squash,insecure_locks) /home/vmdata *(rw,async,no_wdelay,no_root_squash,insecure_locks)
Enable the NFS services for the host machine
sudo service rpcbind start && sudo chkconfig rpcbind on sudo service nfslock start && sudo chkconfig nfslock on sudo service nfs start && sudo chkconfig nfs on
Confirm that the NFS mounts actually show up in the RPC service
showmount -e localhost
Enable X11 Forwarding
You are going to have to export some VNC displays so you will need to make sure your host can export X11 displays over SSH.
sudo yum install xauth sudo vi /etc/ssh/sshd_config
Make sure these settings are set in /etc/ssh/sshd_config
X11Forwarding yes X11UseLocalhost no
Restart SSHD
sudo /etc/init.d/sshd reload
Actually install the host, you can accept the defaults for most of the steps, just make sure your NFS shares get entered properly
screen hosted-engine --deploy
If this all goes well it will give you directions on-screen for how to remote in and export the VNC display to the console for installing the hosted engine VM.
Install the VM and continue, it will reboot the VM and give you another VNC terminal for getting back in and installing the engine.
######################### On Engine Machine VM #############
This is pretty easy, just follow the prompts and make sure the passwords match those you setup on the host machine.
sudo yum localinstall -y http://ovirt.org/releases/ovirt-release.noarch.rpm sudo yum localinstall -y http://ftp.osuosl.org/pub/fedora-epel/6/i386/epel-release-6-8.noarch.rpm sudo yum install -y ovirt-engine screen screen sudo engine-setup
######################### On Host Machine #############
Once the engine installation is complete you confirm it on the host machine and it will restart the engine VM as a managed VM.
After this happens you are pretty much done, except I had some problems where the manager never unmounted the install CD from the engine VM. So I remove the file (you are done with it anyway) and it isn’t a problem. Also I don’t want to waste time installing VMs until after I reboot the host just in-case the engine doesn’t come back up.
rm /home/tmp/CentOS-6.5-x86_64-minimal.iso reboot
Go to the https:///ovirt-engine/webadmin/ in your browser and start getting the datacenter setup. The oVirt documentation worked fine from here on out.
-Cheers!