Tuesday, January 26, 2016

Converting ESXi to Acropolis Hypervisor - Part 3 - Importing VMware Virtual Machines

In my previous posts we destroyed a Nutanix cluster running ESXi and installed Acropolis Hypervisor (AHV) using the Foundation 3.0 process, which is now built directly into each Nutanix Controller Virtual Machine (CVM).

Now it's time to pull some VMs from your legacy ESXi environment into AHV. Keep in mind that if you're already a Nutanix customer with an ESXi hypervisor cluster, this process will be automated in a future release (as shown during the general session at the .NEXT conference in Miami).

Before proceeding, you might want to take a quick look at my other post on using the Image Service and creating a virtual network for your VMs as a quick primer, as I won't go into great detail on either of these here.

If you're not already running ESXi on your Nutanix cluster and are starting from scratch with AHV, you can use these steps to import VMware VMs into Acropolis. This can be done through a few different methods, but if you've got a set of VMware templates that you use all the time, it would make sense to import those into the Acropolis Mobility Fabric (AMF) Image Service so that you can clone them easily.

The AMF Image Service supports a variety of formats, including raw, vhd, vmdk, vdi, iso, qcow2. This means you won't need to convert an ESXi vmdk to a different format in order to use it with AHV. If you're using Windows, the VirtIO drivers need to be installed before bringing the VM over to AHV. Think of VirtIO as Nutanix Guest Tools, or the equivalent of VMware Tools. You need the virtual SCSI driver in order to boot the VM.

In my example I am going to take an existing Windows Server 2012 R2 template in ESXi and prepare it for migration into AHV.

To start, I am going to deploy a new VM from the existing template so that I can install the VirtIO drivers on it without changing the original template. 

Next I will install the VirtIO drivers. These are available from the Nutanix portal as both an ISO image as well as an MSI executable.

Once the VirtIO drivers are installed, uninstall VMware Tools. 

Now power off the VM. Make sure there are no VMware vCenter-based snapshots for the VM. Make a mental note of where the VM's vmdk file resides. 

Make sure you download the VM's "flat" vmdk file. You should see the word 'flat' in the name, and it will be much larger than the other VMDK file.



This could take some time depending on the size of the VM. Once the download is complete, login to Prism, click the gear icon, and select Image Configuration.


If you read my previous post on getting started with the Image Service, these steps should be familiar. 

Click the 'Upload Image' button and fill in the details.


Click Save to begin uploading the VMDK file.

Once the image creation is complete, close the Image Configuration window and go to the Prism VM view.

We're now going to create a new VM based on the VMDK file that we pulled over from our old ESXi environment.

Click 'Create VM' and give the new VM a name, vCPU, and memory.

Click 'New Disk', change the Operation drop down to 'CLONE FROM IMAGE SERVICE', and select the Image that you created in the previous section.



Click Add and give the VM a NIC if you prefer. Once complete, click Save.

Since this is a clone operation, it will happen very fast.

Click the Table view and select the new VM. Click 'Power On' (underneath the table) and then Launch Console once it becomes available. You should see the VM boot into Windows as you normally would. 


You only need to bring your template VMs from ESXi into the Acropolis Image Service once. From there you can clone as many times as needed directly from Prism, or from acli, the AHV command line.

You may be curious about how the devices appear to Windows once moved to AHV. You can login to Windows and look at Device Manager. 



No comments:

Post a Comment