Team Leader - Nutanix Technology Champion - Nutanix NTC Storyteller

Julien DUMUR
Infrastructure in a Nutshell
Deploying a nested hypervisor on Nutanix AHV

As part of setting up labs on a Nutanix infrastructure, you may be required to deploy a hypervisor (ESXi, Promox, Hyper-V, etc.) on the AHV hypervisor (Inception!).

You will then be confronted with this type of error message when installing ESXi for example (the form differs for other hypervisors, but the substance remains the same):

Unsupported CPU error while installing a nested ESXi

The processor will not be detected as having virtualization capabilities and you will therefore not be able to deploy a hypervisor… But it is possible to bypass this restriction.

Nutanix AHV: bypass processor restriction

I assume that the virtual machine on which you want to deploy a hypervisor is already created.

To bypass the processor restriction, we must connect to one of the CVMs in our cluster and modify our virtual machine with the acli vm.update command and the “cpu_passthrough” parameter:

acli vm.update VM_NAME cpu_passthrough=true

You will get the following message:

nutanix@NTNX-a64e778d-A-CVM:192.168.2.241:~$ acli vm.update VM_NAME cpu_passthrough=true
VM_NAME: pending
VM_NAME: complete

Please note, this command will only work if your virtual machine is turned off.

Once the command is applied you can restart your installation… Except for ESXi which still requires a little subtlety!

Nutanix AHV: truncate NIC type to install ESXi

To install an ESXi nested on Nutanix AHV and have it be fully functional, you also need to modify the network adapters to make it think they are e1000 type.

To do this, with the virtual machine still off, connect to one of the CVMs, and type the following command:

acli vm.nic_create VM_NAME network=NETWORK_NAME model=e1000

Be sure to replace VM_NAME with the name of the virtual machine concerned, and NETWORK_NAME with one of the networks previously created on your Nutanix cluster. You will get the following message:

nutanix@NTNX-a64e778d-A-CVM:192.168.2.241:~$ acli vm.nic_create VM_NAME network=NETWORK_NAME model=e1000
NicCreate: pending
NicCreate: complete

You can now restart the installation of your hypervisor.

Read More
Deploying Nutanix Move on Nutanix AHV

Nutanix Move : Introduction

With the surge in prices for VMWare licenses linked to the company’s acquisition by Broadcom, many customers are looking for alternative solutions to ESXi in order to avoid a hefty bill.

Among the alternatives, there is obviously Nutanix among the alternatives but customers are quite cautious regarding the migration from VMWare ESXi to Nutanix AHV, a task which can be tedious if the VMs have to be migrated one by one.

This is where Nutanix Move comes in. Nutanix Move is a tool made available by Nutanix to facilitate the migration of virtual machines to any cloud.

Nutanix Move migration matrix between ESXi, Hyper-V, AWS, Azure, AHV and NC2

What will interest us is mainly a migration from ESXi or Hyper-V to Nutanix AHV.

Nutanix Move: virtual machine download

To retrieve the virtual machine image, you must connect to the Nutanix Support portal: https://portal.nutanix.com/ then go to the “Downloads” section:

Downloads section of the Nutanix Support portal

Click on “Move” and download on the “Move QCOW2 file for AHV” button:

Downloading the Move QCOW2 file for AHV

Direct link to download page: https://portal.nutanix.com/page/downloads?product=move

Deploying the Nutanix Move VM on AHV

Once the image has been downloaded, you must upload it to your cluster. To do this, I invite you to follow one of my previous articles: https://juliendumur.fr/en/nutanix-ahv-upload-image-to-your-cluster/

To deploy the Nutanix Move virtual machine, go to VMs, click on “Create VM” and complete the virtual machine creation form:

Create VM form for the NTNX-Move virtual machine
vCPU, memory and boot settings of the Nutanix Move VM

In the Disks section, add a disk of type “DISK”, in operation select “Clone from Image Service” and select the previously downloaded image:

Disk cloned from the Nutanix Move image in Image Service

Click on “Add” then add a network interface, the virtual machine is deployed.

Access to Nutanix Move

Nutanix Move is accessible via http via the IP assigned to it:

Nutanix Move web login page

The first step is to change the access password:

Changing the Nutanix Move access password

Nutanix Move is now deployed, we will see in a future article how to add target environments.

Nutanix Move home page with the Add Environment button

Official documentation

Nutanix Move Official Documentation: https://portal.nutanix.com/page/documents/details?targetId=Nutanix-Move-v5_1:Nutanix-Move-v5_1

Read More
Anti-affinity between virtual machines on Nutanix AHV

For a customer case, I had to configure the anti-affinity between 2 virtual machines.

Anti-affinity: what is it?

First, I’ll give some context so the foundations are laid. For one of our clients, I am deploying 2 Palo Alto virtual machines to set up a cluster which will manage flows between its different networks.

In order to ensure maximum redundancy in the event of any failure, it is essential that the virtual machines be hosted on different hosts. Indeed, if they were hosted on a single host, in the event of a host failure, the Palo Alto cluster would be out of service.

Two Palo Alto VMs running on the same host

This is where anti-affinity comes into play and will allow me to ensure that the 2 virtual machines are never found on the same host.

Setting up anti-affinity

The implementation of the anti-affinity is to be carried out in command lines directly from one of the CVMs of the cluster and takes place in several stages:

  • Create a group: connect via SSH then type the following command:
nutanix@cvm$ acli vm_group.create group_name
  • Add the virtual machines to the group:
nutanix@cvm$ acli vm_group.add_vms group_name vm_list=vm_name1,vm_name2
  • Enable anti-affinity:
nutanix@cvm$ acli vm_group.antiaffinity_set group_name

After a while, virtual machines that were previously on the same host will then be spread across 2 different hosts.

Palo Alto VMs spread across two different hosts

In the event of failure of a host hosting one of the 2 virtual machines, the machine concerned will be restarted on one of the hosts in compliance with the anti-affinity rule.

Be careful, however, if you manually migrate a virtual machine or as part of the host being put under maintenance, the anti-affinity rule may not apply.

Official documentation

The official Nutanix documentation: https://portal.nutanix.com/page/documents/details?targetId=AHV-Admin-Guide-v6_7:ahv-vm-anti-affinity-t.html

Read More
Adding a subnet to a Nutanix AHV cluster

To be able to deploy a virtual machine on your Nutanix cluster and have it reachable on your network, you will need to start by configuring the network(s) on your cluster.

Creating a network using Prism Element

Under Prism Element, in the “Settings > Network Configuration” menu is the list of all existing networks on the cluster, click on “Create Subnet”:

Then enter your network information, namely the name and vlan ID:

Create Subnet form with name, virtual switch and VLAN ID

If you do not have a DHCP server, you can let Nutanix manage the addressing of the network created using the “Enable IP address management” option:

Enable IP address management option

You will then need to complete all the options that would normally have been delivered by a traditional DHCP server:

Subnet DHCP settings and IP address pools

Click “Save” once the settings are correct. Repeat for each VLAN you need on your infrastructure.

Creating a network using Prism Central

In Prism Central, network management is carried out in “Network & Security > Subnets”:

Subnets list in Prism Central Network and Security

To add a new network, click “Create Subnet”:

Create Subnet form in Prism Central

It is then a form similar to that of Prism Element that must be completed by activating, or not, the “IP Address Management” option if you wish to leave the management of your addressing to Nutanix.

Official Nutanix documentation

Link to official documentation: https://portal.nutanix.com/page/documents/solutions/details?targetId=BP-2071-AHV-Networking:bp-ahv-network-management.html

Read More
Uploading an image to a Nutanix AHV cluster

To be able to deploy virtual machines on your cluster, you will need images that are available to launch your installations and here is the procedure to follow.

Before you start

An image uploaded via Prism Element can be imported to Prism Central. The reverse is not possible.

An image uploaded or imported via Prism Central is visible but not editable on Prism Element.

An image uploaded via Prism Element can only be used by the cluster to which it was uploaded.

An image downloaded via Prism Central can be used by all clusters managed by this Prism Central

Nutanix provides compatibility with images in the following formats:

  • RAW
  • VHD
  • VHDX
  • VMDK
  • VDI
  • OVA
  • ISO
  • QCOW2

Download via Prism Element

To upload an image via Prism Element, connect to the web interface using your credentials, then navigate to the “Settings > Image Configuration” menu:

Image Configuration menu in Prism Element settings

Click Upload Image:

Upload Image button in Image Configuration

Complete the “Name”, “Image Type”, “Storage Container” fields, select the image you wish to transfer then click on “Save”:

Image list in Prism Element Image Configuration

Wait during the transfer and then while your image is processed by the cluster. Its status must be “ACTIVE” for it to be operational:

VirtIO 1.2.3 image being processed, still inactive
VirtIO 1.2.3 image now active

Download via Prism Central

The process for transferring an image through Prism Central is essentially identical to that of Prism Element.

Connect to the web interface then navigate to “Compute & Storage > Images” and click on “Add Image”:

Add Image button in the Prism Central Images menu

Click on “Add File”, select the image you want to transfer, fill in the description then click on “Next”:

Adding the image file in Prism Central

On the next screen, select the image placement mode based on your environment. In most cases, the default method “Place image directly on clusters” will do the trick, click “Next”:

Image placement method and cluster selection

Wait while the cluster transfers and processes the image.

Import images from Prism Element to Prism Central

On the image management page on Prism Central, click “Import Images”:

Import Images button in the Prism Central Images menu

Then select the transfer method that suits you:

Import Images window: all images or images on a cluster

“All images” will repatriate all the images from all the clusters managed by Prism Central

“Images on a cluster” will allow you to select the cluster(s) and source image(s) on a case-by-case basis.

Official Nutanix documentation

Link to official documentation: https://portal.nutanix.com/page/documents/details?targetId=Web-Console-Guide-Prism-v6_7:wc-image-configure-acropolis-wc-t.html

Read More