Obtaining and preparing disk images for Azure deployments

Pexip publishes Azure-optimized disk images for the Management Node and for Conferencing Nodes. This topic includes a PowerShell script that copies and prepares your disk images, and instructions for running the script via a Windows client.

Preparing disk images for use

Before you can use the published Pexip Infinity disk images, you must copy them into your Azure environment. This guide refers to a disk image copied into your Azure environment as a prepared disk image. All deployment operations use prepared disk images.

The following PowerShell script copies both of the published VHDs (for a Management Node and for a Conferencing Node) to your storage account (into a storage container called vm-images) and then creates an image from those VHDs so that they may be used to deploy VM instances. Note that these images can be stored in your shared resource group (whereas we recommend that each VM instance created from these images is deployed in its own resource group).

You must edit the variables in the script to provide the name of the:

  • Azure subscription ($subscriptionName)
  • region (location) to use ($regionName)
  • resource group ($resourceGroupName)
  • storage account ($storageAccountName)
  • Pexip Infinity version-build number to use ($version — currently 25-4-0-59565-0-0 for v25.4 software). If you are running an older version of Pexip Infinity software, see Version information for previous Pexip Infinity releases.
Copy to clipboard
# Name of your Azure subscription
$subscriptionName = ""
# Name of the Azure region (location) to use
$regionName = ""
# Name of the resource group to use
$resourceGroupName = ""
# Name of the storage account to copy the disk images into
$storageAccountName = ""
# Name of the container within the storage account to copy the disk images into
$containerName = "vm-images"
# Version of Pexip Infinity to copy
$version = "25-4-0-59565-0-0"

# Add your Azure account to the PowerShell environment
Import-Module Az -MinimumVersion 4.7.0
Connect-AzAccount

# Set the current subscription
Get-AzSubscription -SubscriptionName $subscriptionName | Select-AzSubscription

# Obtain the access key for the storage account
$storageAccountKey = Get-AzStorageAccountKey -ResourceGroupName $resourceGroupName -Name $storageAccountName
If($storageAccountKey.GetType().Name -eq "StorageAccountKeys") {
    # Az.Storage < 1.1.0
    $storageAccountKey = $storageAccountKey.Key1
} Else {
    # Az.Storage 1.1.0
    $storageAccountKey = $storageAccountKey[0].Value
}            

# Create the storage access context
$ctx = New-AzStorageContext -StorageAccountName $storageAccountName -StorageAccountKey $storageAccountKey

# Create the container
New-AzStorageContainer -Name $containerName -Context $ctx

# Start copying the Management Node image
$mgmt = Start-AzStorageBlobCopy -AbsoluteUri "https://pexipas.blob.core.windows.net/infinity/$version/management-node.vhd" -DestContainer $containerName -DestBlob "pexip-infinity-$version-management-node.vhd" -DestContext $ctx

# Start copying the Conferencing Node image
$cnfc = Start-AzStorageBlobCopy -AbsoluteUri "https://pexipas.blob.core.windows.net/infinity/$version/conferencing-node.vhd" -DestContainer $containerName -DestBlob "pexip-infinity-$version-conferencing-node.vhd" -DestContext $ctx

# Wait for the Management Node image to finish copying
$status = Get-AzStorageBlobCopyState -Blob $mgmt.Name -Container $containerName -Context $ctx
While($status.Status -eq "Pending") {
    $status
    $status = Get-AzStorageBlobCopyState -Blob $mgmt.Name -Container $containerName -Context $ctx
    Start-Sleep 10
}
$status

# Wait for the Conferencing Node image to finish copying
$status = Get-AzStorageBlobCopyState -Blob $cnfc.Name -Container $containerName -Context $ctx
While($status.Status -eq "Pending") {
    $status
    $status = Get-AzStorageBlobCopyState -Blob $cnfc.Name -Container $containerName -Context $ctx
    Start-Sleep 10
}
$status

# Create Azure images from the vhd files
$imageConfigMgmt = New-AzImageConfig -Location $regionName
$osDiskVhdUriMgmt = $mgmt.ICloudBlob.Uri.AbsoluteUri
Set-AzImageOsDisk -Image $imageConfigMgmt -OsType "Linux" -OsState "Generalized" -StorageAccountType "Premium_LRS" -BlobUri $osDiskVhdUriMgmt
$imageMgmt = New-AzImage -Image $imageConfigMgmt -ImageName "pexip-infinity-$version-management-node-image" -ResourceGroupName $resourceGroupName

$imageConfigCnfc = New-AzImageConfig -Location $regionName
$osDiskVhdUriCnfc = $cnfc.ICloudBlob.Uri.AbsoluteUri
Set-AzImageOsDisk -Image $imageConfigCnfc -OsType "Linux" -OsState "Generalized" -StorageAccountType "Premium_LRS" -BlobUri $osDiskVhdUriCnfc
$imageCnfc = New-AzImage -Image $imageConfigCnfc -ImageName "pexip-infinity-$version-conferencing-node-image" -ResourceGroupName $resourceGroupName

# Print out the prepared disk image resource IDs for later use
"Management Node disk image resource ID:   " + $imageMgmt.Id
"Conferencing Node disk image resource ID: " + $imageCnfc.Id

Running the script via your Windows client

To run the PowerShell script from your Windows PC, you need to connect your local machine to Azure:

  1. From your PC, run PowerShell ISE as Administrator by right-clicking on it and selecting Run as Administrator.

  2. When in PowerShell run the following two commands:

    1. Install-Module -Name Az -MinimumVersion 4.7.0 -AllowClobber -Scope AllUsers

      This installs the Azure Resource Manager modules from the PowerShell Gallery.

    2. Install-Module Azure

      This installs the Azure Service Management module from the PowerShell Gallery.

    If you get any prompts while running these commands, select Y for Yes.

    See https://docs.microsoft.com/en-gb/powershell/azure/ for more information about Azure PowerShell.

  3. Copy and paste the PowerShell script from above into a text editor and add in your Subscription Name, Region Name, Resource Group Name and Storage Account name (where shown below), and then save the file as a .ps1 file.

  4. Run the script:

    1. Close the file, right-click on it and select Run with PowerShell.
    2. You are prompted to login, so enter your Azure login credentials.
    3. The script will run and copy the images over to your Azure environment. This takes approximately 10 minutes
  5. You can use the Azure portal to confirm when the VHD files have been copied across and the images have been created. From the Azure portal go to your Azure dashboard and select your Resource Group used for shared resources. You will see the Pexip Management Node and Conferencing Node prepared disk images.

Now that you have your prepared disk images in your Azure environment, you can use them to create the VM instances in Azure in which you can deploy the Pexip Infinity Management Node and Conferencing Nodes.

Version information for previous Pexip Infinity releases

If you are running an older version of Pexip Infinity software, and you want to deploy a new Conferencing Node, you must use a published Pexip Infinity disk image version that corresponds to the software version running on your Management Node. This includes dot releases — so for example, for a v21.2 Management Node you must install a v21.2 Conferencing Node rather than a v21 Conferencing Node. Similarly, if your system has been upgraded since you first installed the Management Node and some Conferencing Nodes, you will need to obtain and prepare the appropriate Conferencing Node image corresponding to the software version you are currently running.

To obtain the published disk images for older software versions (for both the Management Node and for a Conferencing Node) you need to use the appropriate software version number in the PowerShell scripts supplied above.

You must replace the current version number (25-4-0-59565-0-0) with the relevant older version as given in the table below:

Pexip Infinity release Version number to use in script
v25.3 25-3-0-59550-0-0
v25.2 25-2-0-59509-0-0
v25.1 25-1-0-59484-0-0
v25 25-0-0-59437-0-0
v24.3 24-3-0-55796-0-0
v24.2 24-2-0-55786-0-0
v24.1 24-1-0-55723-0-0
v24 24-0-0-55691-0-0
v23.4 23-4-0-53067-0-0
v23.3 23-3-0-53045-0-0
v23.2 23-2-0-53012-0-0
v23.1 23-1-0-52969-0-0
v23 23-0-0-52924-0-0
v22.3 22-3-0-50323-0-0
v22.2 22-2-0-50309-0-0
v22.1 22-1-0-50295-0-0
v22 22-0-0-50285-0-0
v21.2 21-2-0-48377-0-0
v21.1 21-1-0-48372-0-0
v21 21-0-0-48340-0-0
v20.1 20-1-0-45433-0-0
v20 20-0-0-45400-0-0
v19 19-0-0-43079-0-0
v18 18-0-0-42462-0-0