Deploying a VHD to Azure

Overview

Uploading VHD to Azure

Creating an image

Configuration file

Updating password and domain name

Creating the Virtual Machine

Network security rules

Accessing Login Enterprise

Video tutorial

Overview

This article outlines the steps you need to follow to deploy the Login Enterprise Virtual Appliance to Azure.

If you haven't done so already, download the VHD from our Downloads page. Make sure to select the Microsoft Azure download option.

Uploading VHD to Azure

You need to upload the VHD to Azure using Microsoft Azure Storage Explorer. You can download it by clicking the link below. Note that this will start the download immediately.

Download Microsoft Azure Storage Explorer

Once downloaded and logged in, navigate to the subscription where you want to upload the disk. Click on the “Disks” submenu, then select the correct resource group. Click the upload button and complete the form that appears, ensuring the OS type is set to Linux.

While the VHD is compressed in a ZIP file, it remains a large file. For the best results, initiate the download from an Azure VM with sufficient bandwidth for a fast and reliable transfer. The Azure VM is also an excellent option for the upload in the next step.

Frame 614.png

Once uploaded, log in to shell.azure.com using your browser. You may be prompted to create a new file share for uploading files to the shell. This file share will be necessary for uploading the azure.yml config file later. For more information about Azure file shares, see Persist files in Azure Cloud Shell.

Creating an image

Once you’re in the shell, you need to convert the uploaded VHD to an image. You can use the following command as an example:

az image create --resource-group Research-Development --name AZ-VA-LoginEnterprise-nightly-Thursday --source AZ-VA-LoginEnterprise-nightly-Thursday --storage-sku Premium_LRS --os-type linux

Configuration file

Once you have created the image successfully, upload the configuration file for the Appliance. You can find the config file at the bottom of this article. Click Upload File to proceed.

Frame 613.png

Updating password and domain name

Once uploaded, you need to change the password in the configuration file. To open the file in the editor, click Open Editor. Select the azure.yml file and enter a new base64-encoded password.

Frame 612.png

To change a password to base64, use the following command:

[System.convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes("mypassword"))

Paste the resulting string in the content section, as shown in the original file. Next, update the domain name to match the correct location (location.cloudapp.azure.com), for example, westeurope.cloudapp.azure.com.

To view all available regions, use the following command:

az account list-locations

After making these changes, save and close the editor.

Creating the Virtual Machine

Next, create a Virtual Machine (VM) based on the image you created earlier, using the azure.yml file. This process will automatically set up the Virtual Appliance for you.

The default VM size is Standard_DS1_v2 (1vCPU/3.5GB RAM) unless the --size parameter is specified. We require a minimum of 4vCPU/ 8GB RAM for the VM. For example, Standard_F4s_v2.

Use the following command to get the available VM sizes:

az vm list-sizes

Specify the --size parameter in the az vm create command to choose your desired VM size.

For details on sizing, see the Linux Virtual Machine Pricing

You can use the following command to create a new Virtual Machine using the Login Enterprise image:

az vm create --resource-group "MYGROUP" --location "MYLOCATION" --name "MYNAME" --size Standard_F4s_v2 --image "AZ-VA-LoginEnterprise-4.11.2" --custom-data ./azure.yml --authentication-type password --admin-password AzurePassword!123 --admin-username azureadministrator --storage-sku Premium_LRS --public-ip-address-dns-name "MYNAME" --verbose

Replace the dummy variable values “MYGROUP,” “MYLOCATION,” and “MYNAME” with your desired values. Ensure that the image name matches the version you have downloaded.

The admin username and password are required by the cmdlet but are not used within Login Enterprise. You can provide dummy values. Additionally, ensure that the VM name and DNS name are in lowercase and adhere to standard computer name restrictions.

Network security rules

Once this is done, add rules to the firewall to allow incoming and outgoing traffic to the Appliance. For this, use the following command:

az network nsg rule create --resource-group "MYGROUP" --nsg-name "MYNAME" --name HTTPS --priority 1010 --access allow --destination-port-ranges 443 --protocol Tcp --direction inbound

Replace “MYGROUP” and “MYNAME” with their respective values. The --nsg-name should be the name of the VM you used, followed by "NSG" in capital letters.

Accessing Login Enterprise

The initial start and configuration of the Virtual Appliance will take approximately 10 minutes. After this, you can navigate to the Virtual Appliance at the configured URL, for example, https://az-loginenterprise1.westeurope.cloudapp.azure.com/

To access the console of the VM, go to the serial console option of the Virtual Machine.

Frame 611.png

Video tutorial