Quantcast
Channel: The Ravello Blog
Viewing all articles
Browse latest Browse all 333

How to create ESXi 5.5 & 6.0 image on Ravello?

$
0
0

ESXi

We at Ravello have been working on some really cool technology for the last couple of months. We have implemented a CPU virtualization extension called VT-I for Intel or SVM for AMD in our HVX hypervisor. These extensions allow running other hypervisors such as KVM or VMWare’s ESXi on top of Ravello in addition to running regular VMs.

In this blog we are going to walk through installing and configuring ESXi on a public cloud - extremely useful for running ESXi enabled virtual labs. We will go over how to create your own VMWare ESXi image, and save it in the library to easily add additional ESXi hosts for your Ravello application later. Broadly speaking, we will undertake the following steps:

  1. Download ESXi ISO from VMware
  2. Upload ESXi ISO to Ravello
  3. Install ESXi on Ravello
  4. Configure ESXi to run on Ravello
  5. Save ESXi to VM library

Prerequisite - A Ravello account. If you don’t already have one, you can open one here.

1. Download ESXi OVA from VMWare

Download the ESXi version 5.5 or 6.0. You will be required to login/register as a VMware user. The ISO file is ~300 MB and may take a few minutes to download.

2. Upload ESXi ISO to Ravello

Once the ESXi ISO is downloaded, the next step is to upload it to Ravello. Here are the instructions on how to upload ISO image to Ravello.

3. Install ESXi on Ravello

This step has two parts - a) Creating an empty ESXi application b) Installing ESXi on empty ESXi application

Creating an empty ESXi application

1. Create an application in Ravello and give it a name. Do not use a Blueprint Creat appliaction in Ravello
2. In the application, add “Empty ESX” from the VM library. “Empty ESX” is a special machine that has CPUID configured to enable nested virtualization in Ravello. Empty ESX VM
3. Change the image of the ‘cdrom’ to use the ESXi ISO uploaded earlier (Disks > Browse and select your ISO and save) ESXi ISO
4. Publish the application and wait (~5 minutes) until the application is published. Publish ESX application

Installing ESXi on empty ESXi application

1. Once application is published, you will see a green play icon Running ESXi application
2. Next click on the ‘Console’ to get console access to the ESXi application Console access to ESXi
3. Click “Next/Enter/Accept/Continue” to install ESXi. You will be prompted to set password for root. Steps on installing ESXi captured here. Install ESXi
4. Once installation completes, eject the ISO, save & update the ESXi application. Please note it is extremely important to eject the ISO before the reboot Eject ISOUpdate ESXi application

4. Configuring ESXi to work on Ravello

  1. Enable SSH
    1. From the Direct Console User Interface, press F2 to access the System Customization menu.
    2. Select Troubleshooting Options and press Enter.
      Troubleshooting
    3. From the Troubleshooting Mode Options menu, select Enable SSH.
      Enable SSH
    4. Press Enter to enable the service.
    5. Next, go to the Ravello’s UI and assign “Public IP” to the network interface, check “Even without external services”, and create SSH service on Ravello (screenshots below). Now, update the application
      Public IP Ravello Create SSH service

    Next few steps are required to be able to add more than one ESXi to the same cluster/data center in the vCenter server later.

  2. Un-mount local datastore –
    1. Login to SSH using username root and the password you have chosen when you installed your ESXi.
    2. Run ‘esxcli storage filesystem unmount -l datastore1
    3. Get the local datastore device name and partition by running ‘esxcli storage vmfs extent list
    4. Use the local datastore device name (mpx.vmhba1:C0:T0:L0 in my case) and partition (3 in my case)from previous step to run the following after making appropriate adjustments ‘partedUtil delete "/vmfs/devices/disks/mpx.vmhba1:C0:T0:L0" 3
  3. Delete ESX UUID –
    1. Run “vi /etc/vmware/esx.conf
    2. Go to last line in the file where “/system/uuid” is defined. Delete the line and save the file.
  4. Set unique MAC addresses –
    1. In Ravello UI’s Network tab for the VM, ensure that “Auto MAC” is checked for both interfaces
      Auto MAC
    2. On ESXi run –‘esxcli system settings advanced set -o /Net/FollowHardwareMac -i 1
  5. Enable nested on all ESX guests –
    1. This is important to be able to power on VMs running on ESXi, and avoids the need to configure each of guests with the ‘vmx.allowNested’ flag.
    2. Run ‘vi /etc/vmware/config’.
    3. Add the following to the file ‘vmx.allowNested = "TRUE"’ and save.
  6. Ensure that DHCP client requests are acked by Ravello DHCP server -
    When ESXi starts, it expects to find the previous IP leased by the DHCP client. Since the Ravello DHCP is restarted every time the app is created, the restarted DHCP server doesn’t ‘remember’ the previously leased IP, and hence ESXi client needs to ask for a new IP. While ESXi asks for a new IP from the DHCP server, ESXi may start some services which don’t find an IP, and hence network activities at this time may fail.
    1. run ‘vi /etc/rc.local.d/local.sh
    2. add the following lines and save the file -
      1. /bin/kill $(cat /var/run/crond.pid)
      2. /bin/echo '* * * * * rm -rf /etc/dhclient*.leases' >>
        /var/spool/cron/crontabs/root
      3. /bin/crond
    3. run ‘rm -rf /etc/dhclient*.leases
  7. Ensure changes are saved –
    1. Run ‘/sbin/auto-backup.sh’. Ignore any warnings.
  8. Disable SSH –
    1. From the Direct Console User Interface, press F2 to access the System Customization menu.
    2. Select Troubleshooting Options and press Enter.
    3. From the Troubleshooting Mode Options menu, select Disable SSH.
    4. Press Enter to disable the service.
  9. 5. Saving ESXi to the library

    Once the ESXi is installed and configured, it is recommended to save it to Ravello’s library for future usage. Instructions on saving the ESXi VM to Ravello’s library.

    Known Limitations

    1. There are known issues with VMXNet3 as network interface for ESXi. Please use e1000.
    2. Disk controller support on ESXi is currently limited to “LSI Logic Parallel".

    The post How to create ESXi 5.5 & 6.0 image on Ravello? appeared first on The Ravello Blog.


Viewing all articles
Browse latest Browse all 333