Rohit Yadav Aug 4, 2015
I’ve two KVM hosts based on Ubuntu 14.04 and 15.04 that I use for CloudStack development and testing. The Ubuntu 14.04 based host is managed by CloudStack and the Ubuntu 15.04 based host is my workstation. In order to develop and test CloudStack with VMware I always wanted a DevCloud like appliance that could run ESXi/vCenter, this post explains how you can build your own DevCloud-VMware.
Enable nested virtualization on KVM host:
Next, we will need to patch and build our own qemu-system package. To do that, either build qemu with the following patch or get the source qemu package from Ubuntu and build your own. I’ve some prebuilt packages here .
As an example, the following worked for me on Ubuntu 14.04.2:
Install qemu-kvm dependencies or simply run apt-get build-dep qemu-kvm .
Next, apply this patch :
Finally, commit the patch and build the package:
Assuming you’re on x86 architecture, install the qemu-system-x86 package:
In my case I setup a ESXi 5.5 VM with NIC adapter set to vmxnet3 . NIC adapter to vmxnet3. In case of CloudStack, you can update the VM details using CloudMonkey:
With CloudStack 4.5.1 and above, I recommend following settings (at least vmx) in the agent.properties for maximum efficiency:
Next, install ESXi 5.5 with at least 8GB RAM and 4 cores. Once done, enable SSH and ESXi shell on the host.
SSH to the ESXi VM, add the following to /etc/vmware/config and reboot the host:
For some reason, vCenter 5.5 on Windows Server 2008 R2 never worked for me; so I tried using the vCenter 5.5 ova appliance which worked for me. I also could not get the vSphere client to upload the ova to the ESXi host, but ovftool tool worked for me:
Once done, you can reduce the vCenter VM RAM to 2-3GB using the vSphere 5.5 Windows client. Once vCenter VM has started you can open the vCenter URL in your browser to configure it, and later use the vSphere client to add the host to the vCenter VM. I had issue with running certain ESXi 5.5 ISOs on Ubuntu 14.04, but on Ubuntu 15.04 it has worked out of the box so I recommend using Ubuntu 15.04.
Update: For ESXi 6.0, you can simply use E1000 based nic. For qemu 2.2+, you don’t need to patch the qemu-system-x86 package but instead add the following in the VM’s virt xml directly:
© 2010-2016 Rohit Yadav feed | gpg | ssh | email | github | twitter | linkedin | k