Install KVM Ubuntu Server VMware Workstation
If you want to play around with KVM virtualization inside of VMware Workstation, this is quick and easy to do with a few steps. ย Let’s take a look at how to install KVM Ubuntu Server VMware Workstation. ย The VM used for this post was an Ubuntu 14.04 64 bit server installation.
Install KVM Ubuntu Server VMware Workstation
The first thing that we need to do is properly set the virtual CPU inside of VMware Workstation so that it can perform nested virtualization. ย To do this, click on your “Processors” and make sure under theย virtualization engine you haveย Virtualize Intel VT-x/EPT or AMD-V/RVIย checked. ย This will allow KVM to function properly in the nested configuration.
Once your Ubuntu VM is installed and booted, you can check that you indeed have the KVM acceleration support enabled by issuing the following command:
egrep -c '(vmx|svm)' /proc/cpuinfo
Alternatively you can also issue theย kvm-ok command. ย To do that however, you will need to install theย cpu-checkerย package:
sudo apt-get install cpu-checker
You should see a messageย kvm acceleration can be used after issuing theย kvm-ok command if you have the support enabled.
KVM Install:
Installing KVM is easy using this command:
sudo apt-get install qemu-kvm libvirt-bin ubuntu-vm-builder bridge-utils
You need to add your user to theย libvirtd group. ย To do that, simply issue this command:
sudo adduser 'root' libvirtd
Then log out and back in.
Virtual Machine manager:
To manage my virtual machines, I used another Ubuntu 15.10 desktop machine to install theย virt-manager package on. ย To install virt-manager, issue this command:
sudo apt-get install virt-manager
Now you are ready to start playing around with creating some Virtual machines.
Windows VM
I played around with a Windows 2012 R2 VM as the first VM that I created in the KVM environment. ย This was fairly straightforward. ย After you launch Virtual Machine Manager, just click the button at the top left to “create a new virtual machine” and follow the prompts to assign storage, networking, and compute resources. ย As you can see below I have the Windows server VM ready to go.
I had an issue right at first where I couldn’t see the console. ย I changed the Console display type to VNC Server and this seemed to resolve that issue.
Also, the VM wouldn’t boot from the ISO I had mounted at first. ย However, this is resolved under theย Boot Options as you have to place aย check by the Boot device for IDE CDROM to actually activate it.
After doing the above, I was able to get a Windows 2012 R2 VM up and running and then successfully install the OS.
Final Thoughts
KVM is still a maturing technology but is widely available in most Linux distros. ย Hopefully this post on how toย Install KVM Ubuntu Server VMware Workstation can help most with getting a lab version of KVM up and running inside of VMware Workstation.