Let’s start with Oracle Ravello, what is it and why am I bothered about it? There is an overview of the service here but let me show you the headline blurb.
Enterprise VMware workloads on leading public clouds
Seamlessly deploy your existing VMware or KVM based data center workloads on Oracle Cloud Infrastructure, AWS, or GCP as-is, without any modification to the VMs, network, or storage. Get data-center-like network services with enterprise-grade performance for production workloads, and on-demand and cost-effective scale for agile dev/test processes.
Quite the promise isn’t it, and largely the claim is true. You can import OVA/OVF exports from a VMware environment and they will in large, just run on the Ravello infrastructure.
So why am I interested in Ravello? As a vExpert, Ravello very kindly offers a free service that entitles you to 1000 CPU hours per month. Nice! With this in mind, I wanted to build my lab here rather than spending money on tin. The cloud is the future don’t you know!
So, if it is so easy to run VMware workloads in Ravello, why am I writing an article on deploying a VCSA (vCenter Server Appliance) in Ravello? From vSphere 6.0, VCSA has been distributed as an ISO file with a deployment wizard built in rather than an OVA file. If you are familiar with installing the VCSA, you will know the wizard asks for a vCenter or ESXi host to deploy the appliance onto, Ravello is neither.
Let’s make this thing work.
Now I do make some assumptions at this point. I already have a Windows domain controller deployed in Ravello that serves DNS requests. I dare say you could take advantage of Ravellos own native DNS for this, but I stuck with Windows. This is important as the VCSA deployment absolutely needs fully functioning DNS for this procedure to work correctly. I failed many times trying to get this to work because of DNS.
Very high level on the process, I deploy a temporary ESXi host on Ravello to deploy the VCSA too before exporting the VCSA to an OVF file.
Step 1 – Create the temporary ESXi host.
So you logged into Ravello, created an application and already have a Windows Domain Controller running.
Click on the + symbol to add the Empty ESX VM. This should already be available for you in Ravello.
Give the VM a name. This can be whatever you want.
Increase the memory and CPU so that it has enough resources to run a nested VCSA appliance. 8GB shown below is not enough. 16GB or more should do.
Click on the browse button to attach an ISO image.
Ensure that the ESXi ISO has been uploaded to Ravello. If not you can upload it using the Ravello upload tool.
Add an additional disk which will become the datastore the VCSA is installed onto. I went with 750GB.
Both NICS are fine on DHCP for this exercise. The DHCP server in the Ravello application will issue an IP address.
Click the services tab. Now click the add button shown below and choose to add supplied service.
You can add the HTTPS service to allow access to the host from public facing IP address. This is not a necessity for this exercise, however. SSH will already be available
Click save and then update. Youl will now have an empty VM published in the Ravello application.
Power on the VM, run through the installation of ESXi and provision the datastore. In my case, I ended up with an out of the box ESXi host, with a DHCP address of 10.0.0.4 and a 750GB local datastore. You do not need to customise this host any further than that.
Step 2 – Prepare the environment prior to deploying VCSA.
I mentioned at the beginning of this post that DNS was killing me when trying to deploy the VCSA. Mainly because I was deploying the VCSA appliance and then exporting it prior to running stage 2 setup, which is the customisation steps.
Ok, first things first, I want to exclude an IP address from the Ravello DHCP server range for this VCSA appliance. 10.0.0.100 in my case.
I also want to make an entry for this in Windows DNS. You could probably do this in Ravello DNS and forgo the domain controller, but I have not tried it.
Open up DNS and create a new A record with associated PTR record.
My VCSA appliance will have Fully Qualified Domain Name of snurfvcsa01.snurf.local. Also, forward lookup zones on Windows DNS points to the DNS server provided in the Ravello application.
Step 3 – Install VCSA.
I used my domain controller as the jump box for these steps. You will need some kind of VM running in the application to perfrom these steps.
Download the VCSA ISO and mount it. Browse to the installer and run it.
Choose to install.
Choose deploy appliance.
Accept the Eula.
Choose deployment type. I went for VCSA with integrated Platform Services Controller. This is ok for my needs in a lab environment.
Type in the details for the temporary ESXi host we deployed earlier.
Type a name for the VM and a ROOT password.
Choose deployment size, tiny is good for me. Its not all about the size, its how you use it.
Choose the temp datastore created earlier on the temp ESXi host. I deployed the disks as Thin.
Fill in the system name details for the VCSA. See my reserved IP and FQDN we configured earlier.
Click Finish to complete setup.
Wait for stage 1 deployment to complete.
Step through the stage 2 setup which consists of configuring the vSphere SSO domain and appliance config.
Once stage 2 is complete, log in to the VCSA appliance from a web browser to ensure it works as expected. So for me this https://snurfvcsa01.snurf.local. If you are happy with this, power down the appliance.
Step 4 – Prepare appliance for export and upload.
Ravello only supports 7 disk per SCSI disk controller for its virtual machines. The VCSA has 12 disks. We need to move disks 8 – 12 to a second SCSI disk controller.
Open up the web client for the ESXi host. In my case this is https://10.0.0.4
Find the VCSA appliance and edit the settings.
My VCSA already had 2 SCSI disk controllers, don’t know why, but it did. If yours does not, add a second SCSI disk controller.
Move disks 8 – 12 onto controller 1. So disk 8 will move from location 0:8 to 1:0. Disk 9 will move from 0:9 to 1:1 and so on. Power up the VCSA to ensure that it is still working at this point. Once you are happy, power it back down again.
Save the config and export the VM to OVF.
There will be a total of 13 files to export. The OVF config and the 12 VMDK disks. Only download 1 file at a time. I found I had issues when trying to allow all files to export simultaneously.
Now, as per Emads blog that I referenced at the start of this post, the disks need to be converted to non-stream optimised. To do this, you need to grab a copy of QEMU from here.
The command to convert a disk looks a little something like this
qemu-img convert -p -f vmdk -O vmdk "C:\YourPath\YourVMDK-1.vmdk" "C:\YourPath\Converted\YourVMDK-1.vmdk"
Add the full directory paths as appropriate.
Perform the above step for all disks. Copy the OVF file to the converted folder.
Step 5 – Importing VCSA to Ravello.
Start the Ravello upload tool again and choose to upload a OVF.
Browse to the OVF file.
Wait for the upload to complete.
It should now appear in the Library section. The VM needs to be verified before it can be deployed.
Ensure the disks are in order of 1 – 12. If they are not, you will run into problems.
Save the config once complete.
Step 6 – Deploy the VCSA.
Add the VCSA virtual machine to the existing application.
As we did earlier on the ESXi host, we need to add services to the VCSA but also change it to a static IP address. Edit the virtual machine and change the NIC to a static IP.
Add the following services:
- HTTP – Port 80
- HTTPS – Port 443
- SSH – Port 22
- Web UI – Port 5480
- Web Client – Port 9443
- Remote Console – Port 7374
Enable Ravello OCI bare metal for better performance.
Set prefer physical to true
Click save, click publish and then power on the VM.
That should be it! I know it’s a bit of a faf, but who wants a Windows vCenter server anyways? 🙂
Update – Troubleshooting.
If it turns out that in fact that this is not it and you run into issues booting the appliance, follow the steps below to resolve.
The issue a few folk have ran into is that the mount for the boot volume has changed. This can be changed but we need to boot into the shell on the VCSA.
Reboot the appliance from the Ravello console by pressing the CTRL ALT DEL button 7 times.
Press the ‘E’ key when the Photon OS screen appears.
Add the following to the end of the linux boot command.
Press F10 to boot into bash.
Once in bash run following command to list the volumes. Notice SDG is mounted and not SDA
Once in bash shell run the following commands to make the file system writable and to make a copy of the fstab file. Then run VI to edit fstab.
mount -o remount,rw /
cp /etc/fstab /etc/fstab.bak
Locate the 3 lines with SDA1, SDA2 and SDA3. Press the INSERT key to edit the document.
Change SDA to SDG (or other appropriate mount)
Press the ESC key followed by :x and then carriage return to save and exit. You can run cat /etc/fstab to verify the changes have been made.
Reboot the appliance and hopefully, the VCSA should now boot as expected.