Goal
Create a small Linux VM, run a web page on it, control network access, then stop billing and clean up.
Step 1: Create the Group and VM
The output shows the public IP address. Copy it.
Standard_B1s is not available in your region or subscription, pick another small size with az vm list-sizes --location centralindia -o table.
Step 2: Install a Web Server
Step 3: Try the Site (It Should Fail)
Open http://PUBLIC_IP in a browser. It does not load because the NSG blocks port 80 by default.
Step 4: Open Port 80
Refresh the page. You should see the nginx welcome page.
Step 5: Look at the NSG Rule
- In the portal open rg-lab2, then the Network security group
- Under Inbound security rules find the rule for port 80 with priority 900
- Notice the default DenyAllInbound rule at the bottom
Step 6: Stop the Billing
The status should say VM deallocated. Compute charges stop. Disk and IP may still cost a little.
Step 7: Clean Up
Questions
- Why did the page fail before Step 4?
- What is the difference between stopping and deallocating?
- Which command removes everything at the end?
Conclusion
You deployed a VM, installed a web server, opened a port through the NSG, deallocated to stop compute billing and cleaned up.

