The process of creating a Linux Virtual Machine is slightly different from creating a Windows Virtual Machine. Although the processes are similar, there are some distinctions in configuration as well as deployment that will be of note in this step by step guide…
1. Sign in to the Azure Portal:
○ Access the Azure portal (portal.azure.com).
2. Create a Resource:
○ Click on "Create a resource"
○ Select "Virtual Machine."
3. Configure Basics:
○ Select subscription, resource group, and VM name. Also choose region and availability options.
○ Select the OS (Linux); Here, we’re using this Ubuntu Server.
4. Choose VM Size:
○ Pick a VM size based on the required CPU, memory, and storage.
5. Configure Settings:
○ Set up administrator account.
○ Configure networking, management, and monitoring options.
Click on SSH public key option.
Select Username (azureuser is the default username).
Pick “Generate new key pair“ from SSH public key source options.
Select SSH key type.
- A Key pair name is automatically generated.
○ Networking.
6. Review and Create:
○ Review the configuration and create.
○ You will be directed to review VM details.
○ Scroll down to create the VM after reviewing all details. Click on “Download Private Key and create resource“
○ You will be directed to the Deployment page.
○ Once deployed successfully, go to resource.
7. Accessing the Virtual Machine:
○ View the resource and save Public IP Address.
○ Open the Terminal or alternative Command-line Interface(CLI) on your computer.
○ Run the command : ssh -i {private key path} {adminusername}@{Public IP Address}
○ You will get a prompt ; type: yes
○ If you have logged in successfully, the terminal automatically develops the standard; {adminusername}@{virtualmachinename}:
7. Updates and Installations:
○ To update the package list on a Linux system, you can run: sudo apt-get -y update
○ To install Nginx on Ubuntu, you can run: sudo apt-get -y install Nginx
○ Finally, run the Public IP Address on your web browser.
Congratulations 👏 you have successfully created a Linux Virtual Machine on Azure.