Table of contents
This guide provides step-by-step instructions on how to create a virtual machine in Azure. It covers all the necessary details, from navigating the Azure portal to configuring the virtual machine settings. Following this guide will allow someone to easily create a virtual machine in Azure for their specific needs.
Step by Step instructions-
After registration navigate to https://portal.azure.com/
Click on Create a new Resource.
(any "entity" or service is a resource in Azure, for ex a VM is a resource, a Database will be a resource, a domain name is a resource etc)
-
Search or select "Virtual Machine"
-
Click on "Create" to create a VM.
-
Select your subscription (appears by default)
-
Create a new Resource Group, let's call it "testResource"
(a resource group as the name signifies is a group of resources combined to deploy an application for ex- a vm+database+ip+domain together make ashutosh7i.dev, so they can be put together in ashutosh7iResource group for easier management)
-
Enter the Virtual Machine Name, I name it "testVM"
-
You can choose other Availability options and zones, (i'll choose East Asia)
-
Here comes the main part, Select your preferred linux distro, for this tutorial we will go with Ubuntu.
-
Select vm size, for a simple vm, we wont need higher resources, so lets choose the cheapest.
-
Now we have to set Authentication type or say how would we connect to our vm after deployment,
for a new machine there are two ways-
1. Cloud shell, a shell inside browser, used for emergency cases.
2. SSH, the recommended way.In SSH there are two methods, we will go with 2nd method that uses much simpler username and password to connect to our vm.
-
Enter username and Password. (write down or copy somewhere too)
-
Click "Allow selected ports" and select HTTP, HTTPS & SSH ports, this will save us time during connection web server installation.
-
Click "Next : Disks >" (now most of the configuration should be left as it is)
-
Click "Next : Networking >"
-
Click "Next : Management >"
-
Disable Auto-Shutdown, Click "Next: Monitoring>".
-
Click "Next : Tags >"
-
Click "Next : Review + create >"
-
Here you can verify your resources and hourly cost
Click Create when upon verifying details.
After some time your deployment will be complete, go to Resource.
Congratulations your VM is deployed successfully.๐๐
ok now how to connect?
Now, let's learn how to connect to your new VM:
To Connect use this IP , username and your password.
Open any shell.
Enter command-
ssh username@serverIp {press enter} password: {enter password} {press enter}
Example-
On Windows, press Win+R, type "cmd," and press Enter. Then, enter the command as above.
Now, you have the power of Linux at your fingertips. Try out some Linux commands and explore your new virtual machine! ๐ง๐ป
Summary:
In this step-by-step guide, you've learned how to create a virtual machine in Azure, from signing up and configuring settings to connecting to your new VM. Now it's time to explore your virtual machine.
for any issues you can always reach me out on Linkedin
Happy Hacking! โ๏ธ๐