Microsoft Azure is a public cloud computing platform.
As with most cloud service providers, Azure offers a pay-as-you-use pricing policy , including a number of free services.
This guide is to help you get started with Virtual Machines , using Arm-based VMs available in Azure. Microsoft Azure offers two generations of Arm-based VMs. The latest generation is based on Azure Cobalt 100 processors . The previous generation VMs are based on Ampere processors. This is a general-purpose compute platform, essentially your own personal computer in the cloud.
Full documentation and quickstart guides are available.
Before you begin, create an account. For a personal account, click on Free account
or Try Azure for free
on the
Azure homepage
, and follow the on-screen instructions to log in or register as a new user. You can use an existing Microsoft account if you have one.
If using an organization’s account, you will likely need to consult with your internal administrator.
Once logged in, you will be presented with the Azure portal .
Locate
Virtual Machines
from the list of Azure Services
, then click Create
> Azure virtual machine
.
You will be presented with the Create a virtual machine
dialog.
This section is used to separate instances, usually for internal budgeting or access permissions.
If a Resource group
to contain your VMs does not yet exist, click on Create new
. If you do not create a group, a new one will automatically be created based on your first VM name.
This section defines key configuration details of the virtual machine.
Give your virtual machine (VM) a meaningful, but arbitrary name. This is especially useful if you intend to create multiple VMs.
This is the location of the server where your VM will reside. While it is generally recommended to select a region closest to your location, not all regions may support Arm-based servers. You may need to change region to get access to such a server.
These are reliability and security settings. They can generally be left as default.
This is the operating system that will run on your VM. Select the appropriate one from the pull-down. Some will have additional pricing associated with them.
You can then select a particular version of your preferred OS from the Select
pull-down of that OS tab.
Note that if a Windows
operating system is selected, the user must have an appropriate license. See the
Azure documentation
for information.
If not enabled automatically based on the above image, select Arm64
for an Arm-based operating system. This will update the Size
pull-down (see below) to present Arm-based servers.
This is a low-cost pricing option. See Azure documentation for details. This does not affect the deployment of the virtual machine.
Select an appropriate size for your compute needs from the pull-down.
This section defines how users connect to the VM instance.
SSH public key
is the most common and recommended choice.
Create an appropriate username. The default username is azureuser
. Windows VMs will also require a password to be set.
Use an existing key pair or generate a new one, as defined by Key pair name
. If Generate new key pair
is selected, your private key will be generated during the
Create
step.
These settings can be used to limit access to your VM. See the documentation for more info. This can generally be left as default. You can connect to Linux machines using SSH. You can connect to Windows machines using Remote Desktop Protocol (RDP).
Tick the box to confirm you have an appropriate license to deploy a Windows virtual machine. See the Azure documentation for information.
There are other tabs defining many advanced settings. They can generally be left as default.
When the VM settings are to your liking, click on Review + create
. Your settings will be validated by Azure. If valid, click on Create
to create your VM instance.
After a short time, the VM will be created. Click on Go to resource
to see various parameters, particularly the Public IP address
.
These instructions are for Linux-based virtual machines. If you are using a Windows-based virtual machine, please jump to the Windows section .
You can connect to the instance with your preferred SSH client. For example, if using the default username azureuser
:
ssh -i <private_key> azureuser@<public_ip_address>
Replace <private_key>
with the private key on your local machine and <public_ip_address>
with the public IP of the target VM.
You will also see this command under the Connect
> SSH
tab.
Terminal applications such as PuTTY , MobaXterm and similar can be used.
Once connected, you are now ready to use your instance.
Use the uname utility to verify that you are using an Arm-based server. For example:
uname -m
will identify the host machine as aarch64
.
Install the gcc
compiler. If you are using Ubuntu
, use the following commands. If not, refer to the
GNU compiler install guide
:
sudo apt-get update
sudo apt install -y gcc
Using a text editor of your choice, create a file named hello.c
with the contents below:
#include <stdio.h>
int main(){
printf("hello world\n");
return 0;
}
Build and run the application:
gcc hello.c -o hello
./hello
The output is shown below:
hello world
These instructions are for Windows-based virtual machines. If you are using a Linux-based virtual machine, please jump to the Linux section .
On your local host PC, launch the Remote Desktop Connection
application.
Enter the Public IP Address
of the Windows VM as the Computer
to be connected to. Username can also be specified.
You will be prompted for the user password (set earlier), and you will connect. Once connected, you are now ready to use your instance. You can interact with the VM in the same way as you would a local desktop.
Open Control Panel
> System
and verify that Device
> System Type
identifies as an Arm-based processor.
Cloud infrastructure deployment is typically done via Infrastructure as code (IaC) automation tools. There are Cloud Service Provider specific tools like Azure Resource Manager and the open source tool Bicep .
There are also Cloud Service Provider agnostic tools like Terraform . There is a deploying Arm instances on Azure using Terraform learning path that should be reviewed next.