[openstack-dev] Blueprint for vmware workstation driver in Openstack Nova

Lei Zhang redheadflyundershadow at gmail.com
Thu May 30 04:05:25 UTC 2013


Hi

This requirement is actually come from our client, they would like to build
a openstack private cloud env and trying to use their vmware workstation
license, so they prefer to have a driver in nova to create, and manage the
VMs in vmware workstation.

I've noticed that openstack already has driver for vmware esxi, and
v-center, but no one for workstation, so I add a new blueprint:
https://blueprints.launchpad.net/nova/+spec/vmware-workstation-driver

Actually, I already have a poc driver for it, I use vmrun command line
tools to control VMs in vmware workstation. My approach can be described
below:

1. vmware workstation has three default network, bridge(vmnet0),
host-only(vmnet1), and NAT(vmnet8), we use NAT and config it to the same
network as nova's fixed_range
nova.conf
...
fixed_range=192.168.56.0/24
...
vmnet8 also use 192.168.56.0 in every vmware workstations.

2. Build vmdk image by using vmware workstation and install vmware-tools in
it.
Then upload it to glance.

3. Wrote a poc driver for vmware workstation and use vmrun command line
tools to control VMs, like start, stop, reboot and so on. I also have a vmx
file for this vmdk image, I could change RAM size, cpu core count, vmdk
file ref in it to fit the user's request.

4. After call "vmrun start <path_to_vmx_file>", I change its ip to what we
get from nova-network. by the way, we use flat-dhcp mode. We inject a shell
to change ip and restart network service.

5. Also assigning floating ip to each VMs automatically to make sure VMs in
different workstation can communicate.

6. After this, I found the VMs in same host can not be ssh-connected by
using floating ip, so I add one more iptables rules into Chain
nova-network-float-snat,
and yes, I change the nova-network a little bit, but only when compute node
work on vmware workstation mode.
SNAT  all  --  <fixed_ip> <fixed-range>  ctstate DNAT to:<floating_ip>

I still have some limitation on it, like Disk size configuration, and I am
not sure if I am on the right way to implement this feature. But if you are
interested in this feature, I think more discussions are helpful.

Regards
Lei
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20130530/9e0f9490/attachment.html>


More information about the OpenStack-dev mailing list