Deploy a NetScaler virtual machine from a Gen1 VHD in Azure
You can deploy a NetScaler virtual machine in Azure from a Gen1 virtual hard disk (VHD) in two ways: with the Azure CLI or through the Azure portal. If you want fewer steps, use the portal as it lets you create the image directly from the VHD, without requiring to create an intermediate managed disk.
Throughout this document, replace the placeholders:
-
<resource-group-name>– Name of the Azure resource group in which to create the resources. -
<managed-disk-name>– Name of the managed disk. -
<image-name>– Name of the custom Azure image. -
<storage-account-name>– Name of the Azure Storage account that holds the uploaded VHD. -
<container-name>– Name of the Blob container that holds the uploaded VHD. -
<vhd-file-name>– Name of the uploaded Gen1 VHD file.
Option 1: Azure CLI workflow
Note:
Sign in to Azure before you run the Azure CLI commands.
Step 1. Create a managed disk from the VHD.
Upload the Gen1 VHD file to a Blob container in an Azure Storage account. Then create a managed disk that uses the VHD Uniform Resource Identifier (URI) as the source.
az disk create \
--resource-group <resource-group-name> \
--name <managed-disk-name> \
--source https://<storage-account-name>.blob.core.windows.net/<container-name>/<vhd-file-name>.vhd \
--hyper-v-generation V1
Example:
az disk create \
--resource-group NetScalerResourceGroup \
--name NetScalerGen1ManagedDisk \
--source https://netscalerstorage.blob.core.windows.net/vhds/netscaler-gen1.vhd \
--hyper-v-generation V1
Step 2. Create an Azure image from the managed disk.
Create a custom Azure image by using the managed disk created in Step 1 as the source.
az image create \
--resource-group <resource-group-name> \
--name <image-name> \
--source <managed-disk-name> \
--os-type Linux \
--hyper-v-generation V1
Example:
az image create \
--resource-group NetScalerResourceGroup \
--name NetScalerGen1Image \
--source NetScalerGen1ManagedDisk \
--os-type Linux \
--hyper-v-generation V1
Step 3. Create a virtual machine from the image.
In the Azure portal, create a virtual machine and select the custom image created in Step 2 as the source image. Configure your virtual machine size, networking, storage, and other deployment settings as needed, and then create the virtual machine.
Option 2: Azure portal workflow
You can create the Azure image directly from the uploaded VHD by using the Azure portal. This workflow does not require you to explicitly create an intermediate managed disk.
-
Sign in to the Azure portal.
-
Navigate to Images and select Create.
-
Configure the image settings:
-
Resource group: Select or create a resource group.
-
Image name: Enter a name for the image.
-
Region: Select the Azure region.
-
OS type: Select Linux.
-
VM generation: Select Gen 1.
-
-
Under Source, select Storage blob.
-
Browse to and select the uploaded NetScaler Gen1 VHD file from the Azure Storage account.
-
Select Review + Create, and then select Create.
-
After the image is created, open the image and select Create VM to deploy the NetScaler instance.
Verify the deployment
In the Azure portal, open the virtual machine and confirm that its status shows Running. Then sign in to the NetScaler management IP address to confirm that the instance is reachable.
Workflow summary
-
Azure CLI workflow: Start with the VHD, create a managed disk, create an Azure image, and then create a virtual machine.
-
Azure portal workflow: Start with the VHD, create an Azure image, and then create a virtual machine.