Tag Archives: Windows

P2V Windows to AHV using Disk2VHD

Generally a better idea to build virtual machines from scratch when doing a migration to the datacenter.  However, in some scenarios it might make sense to P2V a machine.   This includes if you need to preserve the exact configuration of an existing machine, or if you don’t have the installation media for programs that are installed on that machine.

Before you begin the P2V process, you need to install the Nutanix VirtIO drivers for the virtual hardware that will be presented to the VM.

Login to the Nutanix support portal, click Downloads, Tools & Firmware, and search for “virtio” to find the drivers.  Download the appropriate .MSI for your version of Windows.
image

Double click the .msi to install it, and just click next and accept all the defaults.
image

Microsoft has a tool called Disk2vhd that you can download for free to accomplish P2V migrations.

Download disk2vhd from Microsoft

Disk2vhd is a simple .exe file.  Double click on the .exe to run it.

If you want the .vhd file to be bootable you need to select the System volume as well as C:\

I recommend saving the .vhd to a volume other than C:\ such as a usb key, or network mounted drive.

image

If the .VHD is relatively small, you can upload it through the PRISM Image Configuration Service.

image

However, if it is fairly large the browser will probably timeout before the .VHD completes the upload.

The Image Configuration Service will also upload a file from a http source.  You can easily create a http server using Microsoft IIS.  In Windows Features, click the following options to install the IIS role:

image

Open IIS Manager, right click Default Web Site, and click Add Virtual Directory.
image

You will also need to add .VHD as a MIME type to be able to download the file.
image

You can then browse to the folder via HTTP, right click the file link, and copy the link to the Image Configuration Service.

image

image

After the Image create tasks reaches 100% you can create a VM with the uploaded vdisk.
image

When adding a new disk to the VM, select:
Operation: Clone from Image Service
Bus Type: SCSI

image

Power on the VM and enjoy your success.

image

Booting from UEFI partions:

If the machine you imaged is booting from a UEFI boot partition the VM will be stuck with the message: Booting from Hard Disk…

image

To enable UEFI booting:

SSH to a CVM
run acli
vm.update [vm name] uefi_boot=true

image

Power off the VM and power it back on.  Happy UEFI booting!

image

Mount Nutanix Container using NFS on Windows 10

Mounting a Nutanix container in Windows can be useful for transferring virtual disks and ISOs to/from a Nutanix cluster.

You must first add your Windows 10 system to the container or filesystem whitelist.

image

Then you need to open Control Panel, Programs, Programs and Features and install Services for NFS, Administrative Tools, and Client for NFS.

image

By default Windows 10 will try to use ports 1-1024 to try to restrict a normal user from posing as a root user.  However, the Nutanix cluster will try to connect back with a much higher port.  To disable this setting open a Command Prompt as Administrator and run:

nfsadmin client localhost config UseReservedPorts=no

image

You can then mount the Nutanix container using Map Network Drive.

image

image