How to create Linux Virtual machine on Microsoft Azure

How to create Linux Virtual machine on Microsoft Azure

Introduction

Microsoft Azure, a powerful cloud computing platform, offers a seamless way to create and manage virtual machines. This guide will walk you through the steps of setting up a Windows 10 virtual machine on Azure. By leveraging Azure's robust infrastructure, you can easily deploy and manage your Windows 10 environment, whether it's for development, testing, or production purposes.

Prerequisites:

  • An active Azure account with a subscription. If you don't have one, you can sign up for a free trial.

  • An active resource group, which can be created using this link: How to create a Virtual machine on Microsoft Azure.

    Create a Virtual Machine:

    • In the Azure portal search bar, type "Virtual Machines" and select "Virtual machines".

    • Click "Create".

  • On the "Basics" tab:

    • Select your subscription and the resource group you created.

    • Enter a name for your virtual machine (e.g., "myLinuxVM").

    • Choose a region for your VM (e.g., "(Europe) UK South").

  • Select an image for your VM (e.g., "Ubuntu Server 22.04 LTS -64 Gen2").

  • Choose a size for your VM (e.g., "Standard_B1s - 1").

  • Select an authentication type (e.g., "SSH public key").

  • Upload your SSH public key or generate a new key pair.

  • Click "Next: Disks".

  • Review the disk configuration and click "Next: Networking".

  • Configure the network settings (e.g., virtual network, subnet, public IP address).

  • Click "Review + create".

  • Review the configuration and click "Create".

  • Download the generated private key to complete deployment

  • Connect to your VM:

    • Once the VM is created, you can connect to it using SSH.

    • You'll need the public IP address of your VM and your downloaded SSH private key.

    • Open a terminal or command prompt and use the following command: ssh -i your_private_key.pem username@public_ip_address

      Replace your_private_key.pem with the path to your private key and username with the username you specified during VM creation.