Monday, January 25, 2016

Nutanix Acropolis Hypervisor - Getting Started with Virtual Machines

In the previous post, I showed you how to import an existing ISO file to the Nutanix Acropolis Mobility Fabric image service, as well as how to create a virtual machine network. Now it's time to get to the fun part...creating VMs.

Acropolis Hypervisor - Creating Virtual Machines

Login to Prism and click on the Home drop down menu at the top left side. Select VM from the menu.

If you've used Nutanix with other hypervisors in the past, you'll notice a new button with Acropolis Hypervisor (AHV). There is a "Create VM" button on the top right side. Click it to get started.


First, give the VM a name, along with come vCPU and memory resources.


Now let's add a virtual disk by clicking the "New Disk" button. This menu has a lot of different options which I plan to elaborate on later. For now, let's take the defaults and give it a modest amount of disk based on the Guest OS you intend to use. I'm using a minimal CentOS build in this example.

Click Add. Now you'll see two disks for this VM. One is a CDROM and the other is a standard virtual disk.

Click the pencil icon for the CDROM drive. Under the Operation drop down, select "CLONE FROM IMAGE SERVICE" and use the Image drop down to select the ISO file that you wish to use. If it's not there, go back to my previous post about using the Image Service and import it.


Click Update to save this configuration.

Now click on the "New NIC" button. This is one minor annoyance that I have with Acropolis so far in that it doesn't display the name that I gave to the network configuration when I created it. Instead it just shows vlan.0 and any other VLAN IDs that have been defined. It can be hard to remember VLAN IDs so displaying the network name (such as "VM Network") would be a bit more helpful, in my opinion. 

If you are using IP Management in Acropolis as previously discussed, there is no need to manually assign an IP address here. 


Click Add to complete. Review your settings and click Save to create your first Acropolis Hypervisor VM.

The VM will show up in either the VM Overview or VM Table views in Prism. If you've already created a bunch of VMs, you can use the 'search in table' box to find it. Once you click on it, you will see some options underneath the table to Power On, Take Snapshot, Clone, Update, or Delete. Power the VM on.

Once the VM is powered on you can Launch Console to interact with it. You should see the VM booted to the ISO file that you specified. 


If you're a Google Chrome fan, you'll see a prompt that the preferred browsers for the Launch Console are Firefox and Internet Explorer. I'm not sure what IE can do better than Chrome, but you may find some weird behavior if you insist on using Chrome. Personally I ran into some keyboard issues, particularly typing periods. It just didn't work with Chrome. 

One nice thing about building a Linux VM on AHV is that you don't need to load any special device drivers for the virtual machine's virtual SCSI adapter. If you're building a Windows VM, make sure you download the VirtIO drivers from the Nutanix portal and add it to the Image Service. 

I won't highlight the OS install process here as I assume if you've made it this far, this isn't your first rodeo. You'll notice the install is very fast thanks to the Image Service. It's not pulling it across the wire through an ISO mount process from your client or anything like that. It's pulling it directly from the same container that it's running on. Slick.

Remember to disconnect the ISO file from the VM's CDROM drive after all the binaries are copied and the install process is complete.

Consider this VM your base template if you will. All other VMs can be cloned from this one.

If you want to clone this VM once, you can easily do that from Prism by clicking on the VM name and then clicking the Clone link underneath the VM table.

However, if you want to clone this VM multiple times, you can use Acropolis CLI, or acli.

Login to any Controller VM (CVM) in your cluster and type acli and press enter.

At the acli prompt, issue a command similar to the following to clone the VM multiple times at once.


<acropolis> vm.clone testclone[1..10] clone_from_vm=TestVM

This command will create 10 virtual machines named testclone1 through testclone10, all cloned from the same TestVM virtual machine created in the previous steps. 

You can then use the vm.on command to boot them all simultaneously. For example:

<acropolis> vm.on testclone*





No comments:

Post a Comment