Create temporary VM to host disk

To create a Microsoft Azure virtual machine to the purposes of creating a disk.

  1. Sign in or return to the Microsoft Azure Portal.
  2. From the menu, select All Services and search for Virtual Machines.
    Alternatively, select Virtual Machines from the favorites list.
  3. Click Add.
  4. On the Create a virtual machine page:
    • Select a resource group from the Resource group drop-down box.
    • In the Virtual machine name field, enter a name for the new VM, such as Upload-OAG-VHD.
    • In the Region field, select the region containing the managed disk created earlier.
    • From the Image drop-down box, select Ubunto Server 18.04 LTS.
    • For Size, select Standard D2s V3.
    • In the Administrator Account section, select:
      • Authentication Type: Password
      • Username: okta
      • Password: AlwaysOn@123
      • Confirm Password: AlwaysOn@123


      The username and password mentioned are for illustration purposes only.

  5. Scroll to the Inbound Port rules section and ensure that Select inbound ports field is set to ssh(22).
  6. Click Next: Disks > .
  7. Click Create and attach a new disk.
  8. Click Change disk size and select 512gb.
  9. Leave all other fields unchanged and click Ok.
  10. Click Next: Networking > .
  11. Ensure that Select inbound ports is set to ssh(22).
  12. Click Create and review and wait for the validation process to complete.
  13. Click Create.
  14. Once Deployment is Complete is displayed, click Goto Resource.
  15. Examine the new VM and note its external IP address.


  1. Create a VM using the az vm create command:
    az vm create --name <name> --resource-group <resource-group> --location <region> \
         --image "ubuntults" --size "Standard_D2s_v3" --data-disk-sizes-gb 500 \
         --authentication-type "password" --admin-username "okta" --admin-password "AlwaysOn@123"

    • <name> is an appropriate name
    • <region> is the region to hold the VM
    • <name-of-vm> is an name for the VM
    • <virtual-disk> is the name of the virtual disk to associate with the VM
    • <resource-group> is the name of the previously created resource group to house the VM


    For example:

    az vm create --name "Upload-OAG-VHD" \
        --resource-group "AccessGateway" --location "eastus" --image "ubuntults" \
        --size "Standard_D2s_v3" --data-disk-sizes-gb 500 \
        --authentication-type "password" --admin-username "okta" --admin-password "AlwaysOn@123


    Which will produce results similar to:

    . . . {- Finished .. "fqdns": "", "id": "/subscriptions/. . . /resourceGroups/AccessGateway/providers/Microsoft.Compute/virtualMachines/Upload-OAG-VHD", "location": "eastus2", "macAddress": "00-0D-3A-E4-AB-31", "powerState": "VM running", "privateIpAddress": "", "publicIpAddress": "", "resourceGroup": "AccessGateway", "zones": "" }


    Examine the result and note its external IP address.