Tutorial: Setup NetScaler VPX on Microsoft Windows Server 2012 R2 / Hyper-V
At the moment I’m wasting my time setting up a personal lab environment on Microsoft Windows Server 2012 R2 (Hyper-V ofcourse). One of my missions was to setup a NetScaler ADC Developer edition. I had however some strange problems setting up, so it looked like a good idea to share them.
First of all a little about the NetScaler Developer VPX. It’s a fully functional 1MB Platinum edition. Great for testing purposes and maybe even a (very) small XenApp/XenDesktop environment. You can use all features with a maximum of 5 NetScaler Gateway users. Thanks Citrix, great VPX! Now the setup.
You can download the VPX and the VPX license from this location. You do need a MyCitrix account. In my case I ofcourse downloaded the NetScaler VPX for Hyper-V 9.2 Build 48.6015.e. You can download the license from the same location, but we’ll cover that later. Now the fun part.
The first thing you will encounter is that you cannot import the machine in Hyper-V. I at least was not able to do it and I tried (I think) everything. How I solved this was to extract the Virtual Disk (.vhd file) from the archive you downloaded. Just copy the file into the folder you use for your Virtual Disks. Now fire up Hyper-V and create a new VM.
Connect to your virtual switch
Configure 4096MB memory (else your NetScaler VPX will not start)
Configure the copied vDisk. Then fire up your NetScaler and get a fatal error that makes you scratch your head.
Fatal trap 30: reserved (uknonwn) fault while in kernel mode
cupid = 0; apic id = 00
Stopped ad write_kbd_command+0x31: movl $0x1,%rdx
This strange error occurs because of a packaging problem (if I must believe what I’ve read online). Because you cannot succesfully import your Virtual Machine into Hyper-V the VM settings are not properly configured.
You did set the memory in the steps before. You did not configure your vCPU’s. You need to shutdown your VPX. Configure the vCPU’s to 2 and then start your NetScaler VPX. The error will be gone. Now you can actually start configuring.
Configure your initial IP data and reboot your VPX. The rest of the steps can be easily done through the GUI.
For your developer license you need to determine your hostid.
Aquire a license key in the download section of the NetScaler Developer again on this page. Copy the key and continue to your MyCitrix account. Click Activate and Allocate. Then select the link that you don’t see the product. Enter your license key and make sure you allocate the license file with the hostid (case sensitive). Download the license file. You can also download the latest nCore firmware release.
Just use the upgrade wizard to setup wizard to install your license and use the upgrade wizard to upgrade your NetScaler VPX.
NetScaler SFTP Error
The last strange error I encountered was a SFTP Error: Network Communication error uploading the license file. During troubleshooting I noticed the NetScaler wasn’t listening on port 22/SSH. When trying to start the SSH Daemon with the /usr/sbin/sshd -f /etc/sshd_config command I got strange errors saying: Could not load host key: /nsconfig/ssh/ssh_host_rsa_key | Could not load host key: /nsconfig/ssh/ssh_host_dsa_key. I tried re-generating the files with ssh-keygen. Checked permissions. In the end I just emptied the /nsconfig/ssh directory and rebooted my VPX. Then the problem was solved and I could upload my license too. I could not reproduce this error in my second deployment so it can be a one time thingy.
Mark, had the same issue (sshd not starting) and the steps you listed worked for build 11, thanks.