Prepare a Virtual Machine to be a Development PC – Azure

This is step 1 of 6 of Hands-On Project 2 for Azure. In this step, you prepare a virtual machine that is suitable to be a development computer in the cloud.

Back to Project

New VM, or Upgrade?

Later in this project, we will be installing and running a graphical desktop (Ubuntu Desktop) on our cloud personal computer. Very small instances (like the B1s series) do not have enough CPU and memory to effectively run a desktop UI. To get a VM that will actually work, you can either provision a brand new virtual machine that has enough power, or upgrade one of your existing instances by changing the VM size.

If you have been using an Azure for Students account, you probably didn’t have the option to select a VM size that wouldn’t work for this project. If your VM has at least 2 vCPUs and 4GB RAM, that will be enough to complete this step. In that case, you’re already good to go.

If your VM is not big enough, the trade-off between a new one and is straightforward: If you can spare an existing VM, it is certainly easier to change the size. That way, you take advantage of your key pair work, software installations, etc. If you continue to have a separate need for all your existing VMs and/or the software installed on the ones you have is incompatible with having a desktop UI and development software, then you’ll need to create a brand new instance.

New Virtual Machine

If you need a new VM, follow the process of VM setup, including SSH key pairs, etc. For this project, you will want to select an instance type with at least 2 CPUs and 4GB of memory.

Change the Virtual Machine Size

If you have a VM you can spare, changing the instance type is simple and efficient. I think this video sets a new record for how fast an Azure VM can be resized:

To prepare your VM for this project, change your VM to a size which has at least 2 CPUs and 4GB memory. Just to reiterate the steps:

  1. From the Azure , please complete the following:
  2. From the Azure Portal, navigate to Home –> Virtual Machines, and select the VM you want to resize.
  3. Optionally, stop your virtual machine at this point. When you resize the virtual machine it will rstart itself automatically, but you can stop it now to make sure no work gets lost.
  4. On the left side under Settings, click on Size. This will display a list of available sizes, with the current size highlighted.
  5. Select the new size and click the Resize button. This will trigger the resize and restart.
  6. Afterwards, to verify that the change was as intended, connect to the updated instance with SSH and run lscpu (to check the number of CPUs) and free -h –si (to check the amount of installed memory).