Tuesday, February 16, 2021

How to create Ubuntu 18.0.4 Virtual Machine (VM) in Azure? | Create Ubuntu 18.0.4 VM in Azure

How to Create Virtual Machines(VM) in Azure portal? Creating Virtual Machine is easy and straight forward. Let us see how to do that. 

Steps to create Virtual Machine in Azure

 
1. Login to Azure portal, go to https://portal.azure.com/
2. Click on Virtal Machines.

3. Click on Add virtual machine.

 


4. Now enter the details as below or give values per your subscription and requirements. Select Ubuntu 18.0.4 VM


5. choose authentication type as SSH public key, enter azureuser as user name, enter key pair name.
This step will eventually create SSH keys and allow you to download in your machine.



6. Under Networking


Go with Allow selected ports - SSH port 22
And also select Delete public IP and NIC when VM is deleted option


7. Click on Review, it may take a few mins to finish the validations. If all good, it should pass the validations. Click on Create.

8.  Now download the SSH keys and save it locally.
 

9. Once created, Click on virtual machines.

10. You should see the new VM is running like below:


How to connect to Azure VM?

11. Now select that instance, click on connect


Then choose SSH 


12. Copy the value as it shows below in your local terminal(iTerm for Apple laptop) or Git bash for Windows laptop.

13. Make sure your SSH keys is not accessible by others, by executing the below command:

chmod 400 myUbuntuVM_key.pem
14. Now ssh into VM from your local machine using the key

ssh -i myUbuntuVM_key.pem azureuser@your_ip_address


Now it should show you that you are connected to Azure.

1 comment:

What is GitHub Advanced Security for Azure DevOps | Configure GitHub Advanced Security for Azure DevOps

GitHub Advanced Security for Azure DevOps brings the  secret scanning, dependency scanning  and  CodeQL code scanning  solutions already ava...