Create temporary VM to host disk

To create a Microsoft Azure virtual machine and use it to create 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.
    • Region should be pre-populated, if required select the region containing the resource group created in the prior task.
    • From the Image drop-down box, select Ubunto Server 18.04 LTS. Note, Microsoft frequently changes resource names. Select a version Ubunto 18.04 image.
    • 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 virtual machine and note its external IP address.
  1. Create a virtual machine 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

    Here is an example of running the az vm create command with parameters populated with values:

    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

    Running the az vm create command produces the following results:

    --running . . . {- 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": "10.0.0.4", "publicIpAddress": "40.79.32.220", "resourceGroup": "AccessGateway", "zones": "" }

    Examine the result and note the external IP address.