X

Move your VMware and KVM applications to the cloud without making any changes

  • April 14, 2015

How to create VMware ESXi 5.5 & 6.0 image on Ravello?

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 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. Optional - DHCP special tweak
  6. Optional - Save ESXi to VM library

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

We recently held a webinar discussing how to build ESXi labs on AWS/ Google Cloud. Enjoy the webcast and slides...

[video url="https://www.youtube.com/watch?v=h9byjFw5omQ"]

[slideshare id=48986275&doc=20150602esxiwebinar-150604114506-lva1-app6891]

1. Download ESXi ISO 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
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.
3. Change the image of the ‘cdrom’ to use the ESXi ISO uploaded earlier (Disks > Browse and select your ISO and save)
4. Publish the application and wait (~5 minutes) until the application is published.

Installing ESXi on empty ESXi application

1. Once application is published, you will see a green play icon
2. Next click on the ‘Console’ to get console access to the ESXi application
3. Click “Next/Enter/Accept/Continue” to install ESXi. You will be prompted to set password for root. Steps on installing ESXi captured here.
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

4. Configuring ESXi to work on Ravello

5. Optional: DHCP special tweak

In case you will use your ESXi with DHCP configuration and you will use NFS datastore for the ESXi using the datastore's hostname (rather than its IP), you must perform the follow step:
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 (like NFS) which don’t find an IP, and hence network activities at this time may fail.

6. Optional: 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

VMware product names, logos, brands, and other trademarks featured or referred to in the ravellosystems domain are the property of VMware. VMware is not affiliated with Ravello Systems or any of Ravello System's employees or representatives. VMware does not sponsor or endorse the contents, materials, or processes discussed on the site.

Note: If your application includes multiple ESXi servers, please make sure you start them separately, one by one, and not all at the same time.

  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.
    3. From the Troubleshooting Mode Options menu, select 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 click on ‘Update’ on the Ravello UI to update the application
       

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

  2. Set unique MAC addresses –
    1. In Ravello UI’s Network tab for the VM, ensure that “Auto MAC” is checked for both interfaces
    2. On ESXi run –‘esxcli system settings advanced set -o /Net/FollowHardwareMac -i 1
  3. 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.
  4. Ensure changes are saved –
    1. Run ‘/sbin/auto-backup.sh’. Ignore any warnings.
  5. 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.
    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
    1. Enable SSH if disabled (as written above)
    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 the line in the file where “/system/uuid” is defined. Delete the line and save the file.
    4. Ensure changes are saved –
      1. Run ‘/sbin/auto-backup.sh’. Ignore any warnings.
    5. Disable SSH (as written above)
    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".

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.Captcha