DEV Community

Cover image for πŸ–₯️ Step-by-Step Guide: Creating & Connecting to an Azure Virtual Machine
OTTAH CHUKWUEBUKA
OTTAH CHUKWUEBUKA

Posted on

πŸ–₯️ Step-by-Step Guide: Creating & Connecting to an Azure Virtual Machine

INTRODUCTION

πŸ”Ή

In this guide, we’ll walk through how to create a Virtual Machine (VM) in Microsoft Azure using a Free Trial Account with $200 in credits.
Follow these easy steps to set up, configure, and connect to your Azure VM like a pro. πŸš€


πŸ“ 1. Create an Azure Free Trial Account

  • Sign up for a free trial at Azure Free Trial.
  • Get $200 in credits to explore and deploy Azure services.

πŸ” 2. Log in to Azure Portal

  • Navigate to portal.azure.com.
  • Enter your username and password to access the dashboard.

πŸ”Ž 3. Search for "Virtual Machines"

  • In the search bar, type β€œVirtual Machines”.
  • Alternatively, click the ☰ (hamburger menu) β†’ Create a Resource β†’ Virtual Machine.

βœ… 4. Select Virtual Machine from the Search Results

  • Click on Virtual Machine from the search results.


πŸ–₯️ 5. Click on "Create"

  • Click Create β†’ Azure Virtual Machine.
  • Choose β€œVirtual Machine hosted by Azure.”


πŸ“‚ 6. Enter Project Details

  • Select the appropriate Subscription.
  • Click Create Resource Group β†’ Enter a descriptive name (e.g., MyVMGroup).


βš™οΈ 7. Configure Virtual Machine Details

Enter the following details:

  • VM Name: MyAzureVM
  • Operating System: Ubuntu Server 20.04 or Windows Server Datacenter – x64 G2
  • VM Size: Keep the default (e.g., Standard_B1s for free-tier use)


πŸ”‘ 8. Set Up Administrator Account

  • Authentication Type: Password
  • Username: azureuser
  • Password: password123* (⚠️ Change this for security)


πŸ”“ 9. Configure Inbound Port Rules

  • Select SSH (22) for Linux or RDP (3389) for Windows.


βœ… 10. Accept Licensing Terms

  • Check the box to accept the license agreement.

πŸ“‰ 11. Disable Boot Diagnostics

  • Click Next β†’ Monitoring tab
  • Disable Boot Diagnostics to save costs.


πŸš€ 12. Review & Deploy the Virtual Machine

  • Click Review + Create.

  • Ensure validation passes.
  • Click Create to deploy.

πŸ“Œ Deployment usually takes 3–5 minutes.


πŸ“Š 13. Check VM Status

  • Once the status is Running, your VM is ready! πŸŽ‰

πŸ”Œ 14. Connect to the Virtual Machine

  • Click Connect in the Azure VM blade.


πŸ“₯ 15. Download & Open RDP File (Windows VM Only)

  • Click Native RDP β†’ Download the .rdp file.
  • Open it on your computer.


πŸ”‘ 16. Enter Admin Credentials

  • Enter the Username & Password you created earlier.
  • Click Connect.


βœ… 17. Complete Connection

  • Follow the prompts and click Continue if security warnings appear.

πŸ”„ 18. Wait for Configuration

  • The remote desktop will configure in a few seconds.

🎯 19. Success! Start Using Your VM

πŸŽ‰ You are now connected to your Azure Virtual Machine!
You can install apps, configure services, and begin exploring Azure.


πŸ’‘ Pro Tip: Connecting to Linux VM via SSH

If you created a Linux VM, connect via SSH instead:

ssh azureuser@<Public_IP>
Enter fullscreen mode Exit fullscreen mode

You can find your Public IP address under the VM Overview section in Azure.


βœ… Final Thoughts

By following these steps, you’ve successfully created, deployed, and connected to an Azure Virtual Machine.
You now have your own environment to test, build, and explore the vast Azure ecosystem. ☁️

Top comments (0)