Listen to this Post
Deploying virtual machines (VMs) in Microsoft Azure is a fundamental skill for cloud professionals. This hands-on project demonstrates how to deploy Ubuntu and Windows Server 2019 VMs while configuring networking and security.
What You Need:
- An Azure account (free tier available)
- Basic knowledge of cloud computing and networking
Steps to Deploy VMs in Azure:
1. Create a Virtual Network (VNet) and Subnets
az network vnet create --name MyVNet --resource-group MyResourceGroup --location eastus --address-prefix 10.0.0.0/16 az network vnet subnet create --name MySubnet --vnet-name MyVNet --resource-group MyResourceGroup --address-prefix 10.0.1.0/24
2. Deploy an Ubuntu VM with SSH Access
az vm create \ --resource-group MyResourceGroup \ --name UbuntuVM \ --image UbuntuLTS \ --vnet-name MyVNet \ --subnet MySubnet \ --admin-username azureuser \ --generate-ssh-keys
3. Deploy a Windows Server 2019 VM with RDP Access
az vm create \ --resource-group MyResourceGroup \ --name WinServerVM \ --image Win2019Datacenter \ --vnet-name MyVNet \ --subnet MySubnet \ --admin-username adminuser \ --admin-password YourSecurePassword123!
#### **4. Configure Network Security Groups (NSG)**
az network nsg rule create \ --resource-group MyResourceGroup \ --nsg-name MyNSG \ --name AllowSSH \ --protocol Tcp \ --priority 100 \ --destination-port-range 22 \ --access Allow az network nsg rule create \ --resource-group MyResourceGroup \ --nsg-name MyNSG \ --name AllowRDP \ --protocol Tcp \ --priority 110 \ --destination-port-range 3389 \ --access Allow
### **You Should Know:**
- SSH into Ubuntu VM:
ssh azureuser@<Public-IP>
- RDP into Windows VM:
Use Remote Desktop Connection and enter the VM’s public IP. - Verify Connectivity:
ping <Private-IP-of-other-VM>
### **What Undercode Say:**
Deploying VMs in Azure is just the beginning. Mastering cloud networking, security policies, and automation (using Terraform or ARM templates) is crucial. Here are some additional commands to enhance your Azure skills:
- List all VMs:
az vm list --output table
- Stop a VM:
az vm stop --name UbuntuVM --resource-group MyResourceGroup
- Delete a Resource Group (Caution: Irreversible):
az group delete --name MyResourceGroup --yes
- Check Azure Disk Performance:
az disk list --query "[].{Name:name, IOPS:diskIopsReadWrite, Throughput:diskMBpsReadWrite}"
### **Expected Output:**
A fully functional Azure environment with secure, interconnected Linux and Windows VMs ready for further cloud experimentation.
**Further Reading:**
References:
Reported By: Maaouiaadem Deploying – Hackers Feeds
Extra Hub: Undercode MoN
Basic Verification: Pass ✅



