Lately, I set up quite a few NetScaler instances on my Windows 10 laptop. Usually my hypervisor of choice is VirtualBox. However, running both VirtualBox and Hyper-V is not possible on Windows 10. As, I needed Hyper-V for other reasons, I had to switch my NetScaler instances to it too.

In my last post about setting up NetScaler on VirtualBox, I described how NetScaler can be tricked into working on VirtualBox (which is not an hypervisor supported by Citrix!). This time, I did not need such hacks, Hyper-V is fully supported. There is even a cherry on top: on Hyper-V, the NSIP can be automatically provisioned, thus removing the need for manual input when the instance boots the first time :-)

But first things first. How do I move from a VPX Hyper-V package to a running virtual machine? The script will basically follow the same steps as previously (with auto-provisioning at the end):

  1. Unzip the package (download a VPX Hyper-V package here),
  2. Copy the disk image to the destination location,
  3. Setup the virtual machine (2Gb of RAM, 2 cores),
  4. Add a network interface with a fixed MAC address,
  5. Automatically provision the NSIP.

The last step, automated provisioning, can be done by following the instructions provided by Citrix. However, at the time, there was a typo that prevented the XML example from working. If you plan on rolling you own auto-provisioning, use this one instead:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Environment xmlns:oe=""
<Property oe:key="com.citrix.netscaler.ovf.version" oe:value="1.0"/>
<Property oe:key="com.citrix.netscaler.platform" oe:value="NS1000V"/>
<Property oe:key="com.citrix.netscaler.orch_env" oe:value="cisco-orch-env"/>
<Property oe:key="com.citrix.netscaler.mgmt.ip" oe:value=""/>
<Property oe:key="com.citrix.netscaler.mgmt.netmask" oe:value=""/>
<Property oe:key="com.citrix.netscaler.mgmt.gateway" oe:value=""/>

This XML has to be saved in a file named userdata. This file will then be packaged in an ISO9660 image that will be exposed as a CDROM to the NetScaler virtual machine. At first boot, NetScaler will read this file and automatically set up the NSIP, network mask and default gateway.

Generating an ISO file in PowerShell is possible thanks to this script by Chris Wu. I then cobbled together a script that provisions a Hyper-V NetScaler instance from a VPX ZIP file. The script is available in my GitHub repository as New-NSHyperVInstance.ps1. I hope it will be merged into the NetScaler PowerShell module soon.

The following command will create a new NetScaler Hyper-V VM named NSVPX-11-1 in directory c:\temp\NSVPX-11-1 from the given VPX ZIP package. It will also auto-provision it with NSIP and default gateway connected to the Labnet switch. If the VM already exists it will first be removed. The MAC address and netmask will respectively use default value 00155D7E3100 and

New-NSHyperVInstance.ps1 -Verbose -Package C:\temp\ `
    -VMName NSVPX-11-1 `
    -SwitchName Labnet `
    -NSIP -DefaultGateway `
    -Path C:\temp\NSVPX-11-1 `

Feel free to send me any remarks or improvement requests. The next post, in this NetScaler series, will be about automatic system setup with the NetScaler PowerShell module. Stay tuned!