HowTo: Platform9 + Ravello + VMware

RavelloSystems provides a cloud-based platform for spinning up a test-lab quickly and easily, and it supports VMware’s vSphere/ESXi hypervisor through nested hypervisors (running ESXi on a Google or AWS compute instance).

Platform9 is a cloud-based automation and control platform for spinning up and managing an OpenStack environment quickly and easily, and it supports VMware’s vSphere/ESXi hypervisor as of 18 August 2015. It also supports KVM and Docker.

Naturally, I wanted to see if I could test out Platform9 on VMware using Ravello to provide the infrastructure. I’d previously spun up a vSphere 6.0 lab to test out vROps (see my series on it here, which was sponsored by VMware) so why not see if I could use that to run Platform9?

Yep. You totally can. Here’s how!

AutoLab 2.6 for Ravello

The first step (after getting an account at Ravello here) is to use AutoLab to configure a VMware lab. I won’t go over the details here, but follow the AutoLab instructions for a Ravello setup carefully and you should be set up with a running environment in about 4 hours. The environment can live in your account without running, so you can always fire it up against later, or save it as a blueprint to respawn another time.

I built a vSphere 6.0 environment, because AutoLab 2.6 apparently doesn’t support vSphere 5.5 on Ravello. Platform9 says on their website they support vSphere 5.1 and up, though I did see something somewhere about it not being supported on vSphere 6.0 yet. It appears to work fine.

A quick tip: create a jumpbox in Ravello to use for downloading software. Having to download OVAs and plugins and whatnot onto your own system and then re-upload into Ravello is a pain, so having a simple Linux box in Ravello for this purpose makes life a lot easier. Plus, the network bandwidth in AWS and Google clouds is much better than mine typically is, so it’s faster overall. You can even have your jumpbox server up data via NFS or SMB if you want to get fancy, but a simple jumpbox with VNC will work well, too. Kudos to my friend Keith Townsend for this tip.

Platform9 VMware Gateway

While your AutoLab is building, grab the Platform9 VMware gateway appliance OVA from your Platform9 control panel. The full instructions on how to install the appliance into your VMware environment are here.

You need to import this OVA into vSphere, not Ravello, so make sure the OVA is loaded onto the AutoLab NAS server. I tend to put OVAs and the like into the Build datastore. Once it’s there, you can import it into vSphere and follow the instructions from Platform9 to configure it.

The Platform9 needs credentials to log into vCenter, so have those on hand. They’re documented in the AutoLab vSphere Deployment Guide (which comes as a PDF with the AutoLab packages) in the As Built Documentation section. You should probably use the vi-admin account, but I used Administrator because I forgot what I changed the vi-admin password to, and I was in a hurry to do this before VMworld.

Deploying the Platform9 Gateway Appliance

Deploying the Platform9 Gateway Appliance

Once you’ve imported the OVA and booted the resulting virtual machine, it will connect outbound to your account at Platform9 over HTTPS. You shouldn’t need to do anything to the Ravello networking setup for AutoLab, because all the hosts have outbound access and it deals with all the NAT and routing for you. It should just work, so long as the vCenter credentials are correct.

Platform9 Gateway for VMware

Platform9 Gateway for VMware

The gateway will then show up in Platform9 asking to be authorised. Say yes, and Platform9 will then merrily discover your VMware environment running in Ravello. This can take a while, what with nested hypervisors not being the speediest of things, but expect about 10-15 minutes. You should then see something like this:

Platform9 Connected to VMware on Ravello

Platform9 Connected to VMware on Ravello

Loading Instance Images

While you can control any existing VMs in your lab environment, we actually want to do OpenStack type things, which means we need instance images. I chose Ubuntu 14.04.02 LTS , because that’s what I use for a lot of things, it’s free, and it’s easy to configure.

This was made a little tricky because Platform9 doesn’t have any pre-built images for VMware; they’re all for KVM. Building one myself wasn’t too hard, because I’ve done this a bunch before, and this was honestly the hardest part of the entire setup.

Platform9 do provide instructions for how to roll your own Ubuntu image here.  You don’t need the patch file there, only the .deb package; I don’t know why the patch file is there as well, perhaps so you can patch the built-in cloud-init?

I used virt-manager on Ubuntu to create the image, and then converted it from the native .img format to a .vmdk using qemu-img like this:

qemu-img -convert -O vmdk <vmname.img> <vmname.vmdk>

I built this VM on my desktop, which meant I had to upload the file into the Ravello environment, so I compressed the VMDK file first, and then used scp to send it directly onto the NAS box in the Ravello lab. From there, because the Build directory is shared out over NFS to everything in the lab, I could mount the Build directory on the Platform9 gateway server.

Tip: the default login/password for Platform9 is root/pf9vmware.

The image file has to appear in a specific place for Platform9 to find it: /var/opt/pf9/imagelibrary/data/ so you will need to copy the image into there. I haven’t tested just using a symlink, but it should probably work, though you’ll need to make the NFS mount of the Build directory from the NAS server permanent.

There is a screen in the Platform9 control panel that suggests that putting image instances into one of the Datastores will work:

Platform9 discovers your VM Template Images as long as they are located on one of the Datastores you’ve paired with Platform9.

Please copy over the VM Templates that you would like to see in Platform9’s image catalog onto one of the paired Datastores. They should be reported in the Platform9 Image Catalog within the next 10 minutes.

but it didn’t work for me. That could just be something I did wrong, but the advice does appear a little contradictory.

Once Platform9 sees your image, it’ll show up like this, ready to be used:

Imported Image Into Platform9

Imported Image Into Platform9

Using Platform9

Let’s provision a new VM from our image!

Use the New Instance instance, and you’ll end up with a screen like this:

Platform9 New Instance Wizard

Platform9 New Instance Wizard

This will create a new VM in your VMware environment, and then start configuring it, which you’ll be able to see in vCenter:

Platform9 building VMs in vCenter

Platform9 building VMs in vCenter

and also in Platform9:

Platform9 building instances

Platform9 building instances

Tada! All done:

Screenshot from 2015-08-27 12:15:23 Screenshot from 2015-08-27 12:29:22 Screenshot from 2015-08-27 12:31:01

Easy. :)

Disclosure: RavelloSystems provide me with 1000 hours a month of their service for free by virtue of my vExpert status. Platform9 have also graciously provided me with a free test account.

Bookmark the permalink.