Monday, April 20, 2015

reddit lab post 1 - setup a KVM hypervisor

For people looking to become systems administrators, one of the first steps listed in the reddit post involves installing a KVM hypervisor.  This is a neat, easy to use hypervisor that works with the centos/redhat OS with minimal installation.  But to install it, you first must install centos 6/rhel 6.  One big thing to take note of when doing this install is that VM images are stored by default on /var/lib/libvrt/images.  You'll really want to dedicate a big partition to that directory.  A lot of your storage could very well be needed for the /var mount point. 

 After installing the VM, you can find the packages needed to get KVM running as group packages.  you can see the available packages running the yum grouplist virt* command as below

[root@dns1 ~]# yum grouplist virt*
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Group Process
Loading mirror speeds from cached hostfile
 * Webmin: download.webmin.com
 * base: mirror.us.leaseweb.net
 * extras: mirror.team-cymru.org
 * updates: mirror.5ninesolutions.com
Available Groups:
   Virtualization
   Virtualization Client
   Virtualization Platform
   Virtualization Tools
Done

The main packages associated with virtualization are qemu-kvm, python-virtinst, virt-manager, virt-top, virt-viewer, libvirt, and libvirt-client as described in chapter 2 of Jang's RHCSA/RHCE book.  But I typically will just install all packages in the group by running

 yum groupinstall "Virtualization" "Virtualization Client" "Virtualization Platform" "Virtualization Tools"

After this, you'll find a "Virtual Machine manager" you can use in the gnome desktop.  This is the main tool you'll want to use configuring VMs.  I would go in here immediately and configure your virtual networks as needed.  The default VM network will use the subnet 192.168.122.0/24 with DHCP taking up the full subnet.  I normally will reduce that severely when practicing so I can assign IPs as needed. 


Aside:
For this project, I will be using a preinstalled version of Vmware ESXi 5.5 free.  It's something that's again pretty easy to install and configure but there's a lot of options and setup required beyond the scope of this blog.