Migrate

The Nutanix software story

The recent announcement and release of Nutanix’s Community Edition, aka Nutanix CE, as a general availability download is a clear indication that the company is a software company. Yes, hardware is available to purchase but this is more to show that on a stable known platform the software can deliver. Much like Apple’s hardware and operating system, as in there are specific validated models for their OS X to run. Consider Microsoft’s polar opposite releases of operating systems and the need to obtain drivers to support a myriad of hardware collections and combinations with countless instabilities. Last year’s announcement by Dell of the Nutanix OEM relationship and dedicating a specific hardware platform is also bolstering the story and messaging of Nutanix, the software company.

Let’s begin

I’m assuming you’ve signed up, downloaded and installed CE? No? Read my previous post here. I’ll wait why you do this…

Got it? Good, let’s continue.

At the time of writing this blog post it’s quite clear that I’m documenting a manual process and this will be replaced with a migration tool. When? I’m not sure (and can’t really say) but I don’t imagine it’ll be too long. Until then, here’s how to migrate a VMware vSphere VM into Nutanix CE – I’ll document other hypervisors when I have time. (For my colleagues that are reading this it’s taken from one of my Yak Shaving guides originally circulated in June 2015)

Preparation

  • The IP subnet where the VMware ESXi server(s) reside needs to be whitelisted in the KVM cluster
  • The VMware ESXi server(s) need to be able to reach the KVM cluster over the network
  • The virtual machine(s) to be migrated will need to be powered down
  • You will need elevated access credentials when using the VMware vSphere Client to mount the KVM NFS storage on an ESXi host
  • The virtual machine will be network isolated on KVM until the drivers are installed into the VM; make sure you have a local account available to login and install the drivers
  • The Virtio drivers ISO will need to be downloaded and copied into a Container in the KVM cluster (https://fedoraproject.org/wiki/Windows_Virtio_Drivers)

Mounting the NFS file system

Using the VMware vSphere Client log in to an ESXi host or vCenter server with credentials sufficient to add storage and migrate VM(s).

  • Select the ESXi host:
  1. Click the Configuration tab
  2. Click Storage
  3. Click Add Storage…

01

 

  • Select Network File System

02

  1. Type in the IP address of a CVM in the KVM Nutanix cluster
  2. Type in the name of the Container, remember to use the ‘/’ and the Container name is CaSe SenSitivE
  3. Name the Datastore something meaningful

03

  • Review the summary and click Finish

04

  • The new Datastore will appear in the Storage list

05

  • Highlight the Datastore where the virtual machine to be migrated is located
  • Right-click and Browse Datastore…
  • You will see the virtual machine, in this example Win7-Demo-Copy
  • Click the Folder to highlight it

06

  • With this Folder highlighted click the Move icon (paper with a green arrow)

07

08

  • Note this warning message. In this guide I am not using a vCenter Server so the virtual machine will be moved and not copied to the Datastore you select. When using vCenter a copy operation can be completed.
  1. Select the Datastore you created earlier, in this example KVM-Datastore
  2. Click the ‘/
  3. Click the Move button

09

  • The copy time will depend on the size of the virtual disks and network bandwidth
  • Once complete, browse the KVM Datastore and you should notice the virtual machine folder now resides on it
  • You’ll notice the virtual machine will still appear in the ESXi inventory, you may want to remove this

10

Importing the VM

  • Log into Prism
  1. Select the VM menu from the dropdown
  2. Click + Create VM

11

  • Create a new VM with the same virtual hardware as the one copied to the Container
  1. Name the VM
  2. Allocate the vCPU(s)
  3. Type in the memory size, note this is in Mb
  4. Click +New Disk

12

  1. Choose CLONE FROM NDFS FILE
  2. Change the bus type to IDE

> Note, for virtual machines already using SCSI device drivers for their boot drive leave the option at SCSI, i.e. MS Windows 2003

  1. Click in the path field, press the ‘/’ key and the path options will be presented. Locate the VM and select the –flat.vmdk file
  • Click Add

13

  • Back at the VM virtual hardware box click the pencil for the CDROM
  1. Choose CLONE FROM NDFS FILE
  2. Click in the path field, press the ‘/’ key and the path options will be presented. Locate the Virtio ISO file you previously stored in a container
  3. Click Update

14

  • Click + New NIC and apply networking to the VM(this won’t be discussed in this document)
  • Click Save

15

 

Configuring the VM

  1. Locate the VM in the inventory
  2. Click Power On

16

  • The VM will boot up
  • Log in with local credentials

17

  • Launch Device Manager
  • You’ll see there are some unknown devices listed

18

  • Right-click the Ethernet Controller
  • Select Update Driver Software…

19

  • Choose Browse my computer for driver software

20

  • Browse to the CD drive, the Virtio ISO file you mounted earlier will appear here, click OK

21

  • The CD will be scanned and a network driver located
  1. Tick the Always trust software… box
  2. Click Install

22

  • Repeat this process for the other two devices shown with the yellow ‘!’ next to them.

23

24

 

 Converting the disk format

The final stage is to convert the disk format from IDE to SCSI. (Only do this if the drive type defined in Section 4 was IDE)

  • Open an SSH session to a CVM in the KVM Nutanix Cluster using the nutanix & nutanix/4u  credentials
  1. Type in acli
  2. Type in vm.disk_get vm_name

(vm_name is the name in the inventory)

  1. Locate the vmdisk_uuid of the .vmdk file
  2. Type vm.disk_create vm_name clone_from_vmdisk=vmdisk_uuid bus=scsi

(vmdisk_uuid is the name in the inventory)

See the screenshot below using the example virtual machine from the screenshots above.

Note, the vmdisk_uuid can be copied / paste if you’re using PuTTy and Apple’s Terminal program.

25

  • Switch back to the Prism console
  1. Locate the VM in the inventory
  2. Click Update

26

  • The virtual hardware now lists another disk
  • Locate the IDE disk by reading the description when hovering the mouse over the entries
  • Click the X to delete it

27

  • Click  Yes

28

  • Notice the message at the top of the screen
  • Click Save

29

  • Now power the machine on

30

You’re set to go.

 

2 Responses to “Import vSphere VM in Nutanix CE (Community Edition)”

  1. krishnagummadapu says:

    Hi,
    I am new to Nutanix. we are currently using VMware and moving to Nutanix. New hardware has been ordered with Nutanix. So for the first step I installed Nutanix CE in my test environment (a custom box which supports Virtualization) and trying to move one old server (server 2003) to it.

    I followed your process above up to power on VM in the Nutanix inventory. Then I lunch the console and see the VM is rebooting giving windows logo and then BSOD.

    I tried this with Windows 10 PC as well and getting same BSOD.

    Not sure where I am making mistake.

    The only difference I see here is I don’t have NDFS when selecting CDROM or Disk. I got ADSF.

  2. Hi Krish.
    Since writing this post I too discovered this process doesn’t always work, literally found out 3 weeks ago. From what I can gather it’s since the final KVM to AHV transition and its deeper integration into the Acropolis layer. My work around was to install the App Mobility tools (available in the Support Portal, in Downloads) into the virtual machine before migrating. After this the VM will power on, may need to be booted into Safe Mode to discover new hardware drivers. There’s no need to run the acli commands now either.

    Let me know how you get on.

    Thanks, dawoo.

Leave a Reply