Brents IT Blog

Random thoughts by an IT GOAT

NAVIGATION - SEARCH

Review of KVM ( as installed on Ubuntu 12.04 )

So being a long time Microsoft and VMWare user, i am biased to point and click systems of virtualization.  I say this upfront so everyone who reads this, knows that i am a bit biased to a certain type of control method.  That being said, i am also a long time linux/unix admin, been running AIX for 15 years and slackware builds for 20+.  I like the solid performance of linux but i really hate the command line.  yea, i can create scripts and do everything automated, which i do, but when i first get my hands on a box, i HAVE to do ALL that.  Its just time consuming(even if i am cutting/pasting scripts).  Yea there are great tools like webmin out there but they dont always do what i need and bringing other admins up to speed is harsh.

Anyhow, with this recent project i just completed, we deployed KVM on ubuntu 12.04.03 server.  Now, i did install Ubuntu desktop on all the servers so i could run virt-manager on each.  The servers are setup in a way that makes them individual silos(no shared storage).  I normally dont deal with remote support on linux servers that involves a gui, so this was a bit of change.  I must say though, the install for unbuntu and setup was easy.  I did have to install a custom video driver on all the servers because they used an ASPEED video card which apparently is not supported by default by Xorg auto config in ubuntu.  A quick drop in of the driver though was all that was needed, no manual configuration necessary.  This did present a problem when i had a fix a partition though, you cant just boot into a live USB install, the video doesnt work.  Luckily gparted has a gparted liveUSB iso out there i was able to use instead( so that saved me from having to format the machine as parted wasnt able to re-partition what i need, it kept telling me the partition was mounted even though it wasnt. )  This reminds me that i need to contact LSI and get their linux SAS controller management tools for linux.

So after logging in, immediately i am told by virt-manager that i dont have permissions to LibVirt.  FFS, why so locked down?  So i sudo back into X and walla, we are working!  Creating a VM is simple, though the settings you should actually use are bit hard to find on the internet.  I had to do a bit of research for the Windows 2012 R2 and Ubuntu settings, which are essentially the use of Virt0 disks, vga and e1000 NIC.

Once created, the VM is saved to /var/lib/libvrt/images where no one else but root can go apparently(unless you change it).  The configurations are saved in /etc/libvirt/qemu/ in xml files.  These two locations make it easy for you to save the VM and move it to another host for whatever reason.  I would of preferred to have had shared storage to work with, but thats not always available.

Making connections to other servers in my setup using the virt-manager gui console proved to be annoying because i had run them with sudo, it cant connect to a remotely run console using root.  So i had to adjust permissions on all the host servers.. ugh.  I personally think this is one of the downfalls of KVM, centralized management only exists in a useful form if you use a Redhat KVM install setup.  Theirs is geared toward people who are used to centralized control.  Course as everyone would counter argue, my setup here is free, so free is free.  For some clients, this is fine, for others, its not(adoption anyone?).

One of the bigger issues i have with KVM is that it doesnt seem to support much HOT plug functionality.  It does have the ability to allow for minimum and maximum settings for RAM and CPU, which i guess could serve as a hotplug surrogate function.  Removing devices while the machine is on is seemingly impossible.

Importing machines is fast and relatively easy.  Just shutdown the machine on the existing host, copy the files to the designated locations listed above on the new machine and run a simple virsh define command on the new host to import.  Simply power it on after you are done with the import(which only takes a few seconds).  If you are cloning a machine, make sure to change up the ethernet MAC addresses when you run the clone.  If you are manually cloning, add the option to change MAC address for the ethernet connection.  If you are using shared storage, this all MUCH easier to do, though live migration is only currently supported if you pause the machine( i hear they are close on this though).

Please keep in mind that this is linux, there are other front ends to KVM besides virt-manager.  I havent tried any others at this point besides seeing a live red hat demo.  The KVM site has a listing of them, some are gui, some are web based, some are CLI.  People swear by different ones.  I am sure i would use all of them at some point over the next year depending on how things go.  I am getting into Openstack and that itself uses KVM a lot.  It also does most of the control and interactivity with VM management.

From a VMware point of view, i only saw basic stats information on the host server side.  Would be nice to see network utilization.  There is not alarm system that i could find, so you best be monitoring each VM with a remote monitoring tool.  The Red Hat version has this information(BTW).

I am sure the community will catch up to where VMWare and HyperV are now.  With Red Hat handling the enterprise customers, small business are left with a good option in the Ubuntu setup, it will get the job done.  Most small business dont need heavy monitoring and optimization, so its a good fit as it currently stands.  Course, like i said, Red Hat can handle the big guys who need all that.  I wish i could make the move over the Red Hat as well, but their pricing structure for support makes it more expensive than VMWare for me(the buyout is too high), perhaps that will change as more and more functionality flows into KVM.  BTW, will someone please change the name KVM to something else.  Searching for help online brings up KVM switches, so for those who dont have google foo like me, they will be buried.

Feel free to add anything useful to this discussion below, i would love to hear about better tools.  Those of us working in the field dont have weeks to play with everything out there before rolling a solution with a deadline.  Your work and input is appreciated!  To the community developing KVM and its various add-ons, many thanks!

Add comment