Tuesday, August 22, 2023

How to create Red Hat Linux Virtual Machine (VM) in Azure? | Create Red Hat Linux VM in Azure | How to connect to Azure VM from your local machine

How to Create Red Hat Linux Virtual Machines(VM) in Azure Cloud? 

Creating Virtual Machine is easy and straight forward in Azure Cloud. Let us see how to do that in Azure portal. 

Watch Steps in YouTube channel:

Pre-requisites:

  • Azure account subscription, click here if you don't have one.
  • SSH client such as Git bash, putty or iTerm(mac os)
Steps to create Red Hat Linux Virtual Machine in Azure
 
1. Login to Azure portal, go to https://portal.azure.com/
2. Click on Virtual Machines.

3. Click on Add/Create virtual machine. 

 

Enter resource group name, select region.



4. Select security type as Standard
5. Now enter the details as below or give values per your subscription and requirements. Select Red Hat Enterprise Linux 8.x VM from the drop down.


6. 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.



7. Under Networking



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


8. Under Monitoring, disable Boot diagnostics

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

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

11. Once created, Click on virtual machines.

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


How to connect to Azure VM from your local machine?



1. Now select that instance, click on connect


2.Then choose SSH 


3. Enter ssh key name in private key path 
4. Copy the value as it shows below in your local terminal(iTerm for Apple laptop) or Git bash for Windows laptop.

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

chmod 400 myUbuntuVM_key.pem
6. 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.

No comments:

Post a Comment

DevSecOps Bootcamp Dec 2024 Schedule | DevSecOps & AWS Azure Cloud Coaching by Coach AK | DevSecOps and Cloud Computing Online Classes

Lot of new topics covered like GitHub Actions, GitHub Advanced Security, Helm, Prometheus and Grafana..) The DevOps requirements in the IT m...