In this article, we will follow the practical steps to creating a Linux Windows virtual machine using the Azure portal and communicating with youur virtual machine using the Powershell command line.
Pre-requisite
You must have an active Azure account
You must have an existing PC to create a virtual Machine(VM)
Creating a Linux Virtual Machine
Sign in to the Azure portal https://portal.azure.com using your registered email address and password.
How to locate where to create your virtual machine
Search "virtual machine" from the search bar or pick from the services
Click "Create" from the interface as shown below
Click "create" and pick the Azure virtual machine hosted by Azure
Creating a Virtual Machine (Basic)
On landing on the "Create a virtual machine page", it will land you on the Basic page. Go ahead and create a resource group if you don't have one already
Provide the necessary information required for the "Basic" field
Create a "Resource Group"
Create the "Virtual Machine name"
Choose a "Region" you want your VM to be deployed
Choose "Availability Option" if needed
Choose "image" which determines the type of VM needed
For this Blog we are choosing a Linux VM for the image property
Creating a Linux VM
On landing on the "Create a virtual machine page", it will land you on the Basic page. Go ahead with the "Basic" Page
Provide the necessary information required
In this blog we are using the "Password" option for our Linux VM
Add your "username" and "password" and "confirm password"
Make sure you choose "select inbound port" to be "ssh (22)"
Creating a Virtual Machine (Disks)
After inputting the necessary information on the "Basic" page, click next to the "Disks" Page.
Fill in the information needed. Here you decide the disk type you want. Either HDD or SDD Disk VM
Creating a Virtual Machine (Networking)
After inputting the necessary information on the "Disks" page, click next to the "Networking" Page.
If you have an existing Virtual network, you can set it up here, otherwise, leave it as default as it will be created for you automatically.
Creating a Virtual Machine (Management)
After proper edits to the "Networking" page, click next to the "Management" Page.
Here you can activate the Auto-shutdown option to maximize cost, so your Linux VM won't be running on a 24/7
Creating a Virtual Machine (Monitoring)
After checking through the "Management" page, click next to the "Monitoring" Page.
Here it is advisable you active "Disable" for your "Boot diagnostics"
Creating a Virtual Machine (Advanced)
After proper edits of the "Monitoring" page, click next to the "Advanced" Page.
Creating a Virtual Machine (Tags)
Next is "Tags"
You can Add your desired Tags for Easy Search and proper Naming
Creating a Virtual Machine (Validation) Review+Create
Validation must be passed to proceed to create Your Linux Virtual Machine
Creating a Virtual Machine (Deployment)
You should see "Deployment in Progress"
Your VM will be created and deployment details will be passed and created
Creating a Virtual Machine (Connect)
Creating a Virtual Machine (Connect)
For this Article, we will be connecting via the Local machine(Native SSH)
Run Powershell on your Local Machine (Run as Administrator)
use the command line "az login" to log into your Azure portal on the interface to connect your Powershell to your Azure portal.
Take note of the below interface to confirm been logged in successfully
Take note of the details below to confirm synchronize
The below interface shows the successful creation of your Linux virtual machine
NB. When adding your password, it will be invincible to you but the system can identify if typed correctly as created on the Azure portal on the "Basic" interface