Summary
Some ISP or multi-tenant environments require the ability to automatically install multiple copies of NetScaler VPX on XenServer, each with a unique NSIP address. This article describes how to set the NSIP, netmask, and default gateway for each NetScaler VPX instance by setting XenServer virtual machine attributes before the initial boot using XenServer local shell.
Background
In ISP and multi-tenant scenarios, it is not desirable to use a “golden” HDD image or ghost CD containing both XenServer and NetScaler VPX virtual appliance because each VPX instance requires a unique NSIP address for management. It is also not desirable to expose the XenServer console to the tenant/enterprise administrator; the administrator is only allowed access to the VPX Console Utility (GUI). In addition, while the PXE boot utility allows automatic installation of XenServer, it is not applicable for automatic installation of NetScaler VPX instances.
Procedure
The following procedure is an alternative method for automatically provisioning the initial NSIP configuration for VPX through scripting on the XenServer console.
- Install XenServer on the host server.
- There are two ways to access the XenServer console.Install XenCenter on a workstation. From the XenCenter console, select Server > Add, and input the IP address of the XenServer host along with server administrative credentials or If you choose to access the XenServer console directly, open an SSH session to the IP address of the XenServer host through PuTTY, Hyperterminal or a similar utility. Log in with the server administrative credentials.
- Import the NetScaler VPX package (.xva) to the XenServer host.
Note: Auto-provisioning of NetScaler VPX on XenServer hosts is supported starting with NetScaler release 9.2.
From XenCenter, select File > Import and browse to the .xva location. Be sure to deselect Start VM after import before finishing importing.

- Or -
From an SSH console, type the following command:
# xe vm-import filename=nsvpx-9.2-50.4_nc.xva
where the filename of the NetScaler VPX virtual machine depends on the release and build that you wish to install
4. The UUID for the NetScaler VPX virtual machine is created when it is imported. From the XenServer console tab in XenCenter or through an SSH session console, view the list of UUID’s for each of the NetScaler VPX virtual machines by typing:
# xe vm-list The UUID of the NetScaler Virtual Appliance will be returned.
[root@SJXENMARIBEA02 ~]# xe vm-list
uuid ( RO ): b3ab09dc-c0a2-3579-1078-c30313372e5e
name-label ( RW): NetScaler Virtual Appliance
power-state ( RO): halted
Also check to see that the NetScaler Virtual Appliance is not started, that is: halted.
5. From the SSH session console, type:
# xe vm-param-add uuid=<vm uuid> param-name=xenstore-data vm-data/ip=<ip address>
# xe vm-param-add uuid=<vm uuid> param-name=xenstore-data vm-data/netmask=<netmask>
# xe vm-param-add uuid=<vm uuid> param-name=xenstore-data vm-data/gateway=<gateway> In this example, we will use IP address 10.217.147.145, with a netmask of 255.255.254.0 and a default gateway of 10.217.146.1.
[root@SJXENMARIBEA02 ~]# xe vm-param-add uuid=
b3ab09dc-c0a2-3579-1078-c30313372e5e param- name=xenstore-data vm-data/ip=
10.217.147.145 [root@SJXENMARIBEA02 ~]# xe vm-param-add uuid=b3ab09dc-c0a2-3579-1078-c30313372e5e param- name=xenstore-data vm-data/netmask=255.255.254.0
[root@SJXENMARIBEA02 ~]# xe vm-param-add uuid=b3ab09dc-c0a2-3579-1078-c30313372e5e param- name=xenstore-data vm-data/gateway=10.217.146.1
6.Start the NetScaler VPX virtual machine by typing:
# xe vm-start vm=NetScaler\ Virtual\ Appliance Type xe vm-start vm= and then press the tab key to see a full list of virtual machine names with backslashes preceding special characters. You can copy and paste directly in the console session.
7. When the NetScaler VPX virtual machine starts, it look for a ns.conf file, and if the file does not exist it looks for the vm-data parameters. If the vm-data parameters are not set, then the NetScaler VPX enters the initial configuration script on the virtual machine console, accessible through XenCenter.
8. Following NetScaler VPX virtual machine power up, verify that the NetScaler IP properties are as expected.
From XenCenter, select the NetScaler Virtual Appliance VM and open the Console tab. From the NetScaler CLI, type the following command
> sh ns ip
Ipaddress Type Mode Arp Icmp Vserver State
---- ------- ------
1) 10.217.147.145 NetScaler IP Active Enabled Enabled NA Enabled
Done
- - Or -
Open an SSH session to the NetScaler VPX NSIP with default credentials nsroot / nsroot. If the session connection is successful, the NSIP was successfully changed.