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
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
6. Under Networking
13. Make sure your SSH keys is not accessible by others, by executing the below command:
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.
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.
Awesome tutorial. Works flawlessly.
ReplyDelete