What is this guide about?
This guide will detail how to run a KVM guest in a CentOS host that is also a VM guest in its own right. The software used in this guide is all freely and legally available (at least for personal use).
I hope this guide allows people to take an existing physical host, and without altering its OS, install a CentOS VM that will run KVM and host another CentOS VM inside of it.
This can be done using VMWare Workstation Player (I have also done this using ESXi’s free version, but thats beyond the scope of this guide). While it may be possible to do the same using other VM platforms, I will go forward with what I know and have tested.
To visualize this:
Physical Host >> VMWare Workstation >> CentOS (1)>> KVM >> CentOS (2)
How do we get started?
To do this you will need:
- A physical host machine thats relatively modern, ie: 64 bit CPU and supporting virtualization extensions (Intel VT-x or AMD-V).
- Physical host machine should have Windows or Linux installed
- A CentOS ISO (I have tested with 7.3 and 7.4)
- VMWare Workstation Player (12.5 as of this writing) installed on the host machine (or the paid version, Pro) *I will call this VMWS from now on to make it shorter.
- A basic understanding of or the ability to lookup how to install VMWare Worstation and the basics of setting up a VM within it.
- If it is not already, install VMWS. I will not explain how as there are plenty of resources describing this.
- Once installed, open VMWS.
- In the middle, there should be a button to create a new VM.
- Select the Custom option
- Set/leave hardware compatibility to 12.0 (or matching the version installed)
- For guest OS install, point to your CentOS install media (ISO, DVD or USB drive)
- On the next screen name the VM whatever you like and the location to your choosing.
- Set the number of CPU’s and cores as needed.
- Set memory/RAM as needed.
- Set desired networking type (leave NAT if unsure)
- Set I/O as desired
- Set disc type as desired
- Create a new virtual disk (change only if you know what you are doing)
- Set amount of space and allocation method as desired.
- Set disk file as desired.
- On the last dialog, before hitting finish, click the Customize Hardware button.
- Select Processors on the left of the dialog that comes up.
- On the right check off “Virtualize Intel VT-x/EPT or AMD-V/RVI”
- Optionally, enable “Virtualize CPU performance counters” (may not be required but I enabled it).
- Click close button
- Now hit finished.
Sources / Resources
Where can we go for more information?