0
0
Azurecloud~15 mins

Creating a VM in Azure Portal - Mechanics & Internals

Choose your learning style9 modes available
Overview - Creating a VM in Azure Portal
What is it?
Creating a Virtual Machine (VM) in the Azure Portal means setting up a computer in the cloud that you can use just like a physical computer. This VM runs an operating system and can host applications or services. You use the Azure Portal, a web interface, to choose the VM's size, operating system, and other settings. This process lets you quickly get a computer ready without buying hardware.
Why it matters
Without the ability to create VMs easily, businesses would need to buy and maintain physical servers, which is costly and slow. Azure VMs let you start, stop, and scale computers on demand, saving money and time. This flexibility helps companies respond quickly to changes and run their software anywhere in the world.
Where it fits
Before creating a VM, you should understand basic cloud concepts like what a virtual machine is and how cloud resources work. After learning to create VMs, you can explore managing VM security, networking, and automation. This skill is a foundation for running applications and services in the cloud.
Mental Model
Core Idea
Creating a VM in Azure Portal is like ordering a custom computer online that arrives instantly and runs in the cloud for you to use anytime.
Think of it like...
Imagine going to a computer store website where you pick the parts you want—processor, memory, storage—and then the store builds and delivers the computer instantly to your home. Azure Portal does the same but for virtual computers in the cloud.
┌─────────────────────────────┐
│       Azure Portal          │
│  (Web Interface to create)  │
└─────────────┬───────────────┘
              │
              ▼
┌─────────────────────────────┐
│   Virtual Machine Setup      │
│ - Choose OS                 │
│ - Select Size               │
│ - Configure Network         │
│ - Set Storage               │
└─────────────┬───────────────┘
              │
              ▼
┌─────────────────────────────┐
│    Azure Cloud Infrastructure│
│  (VM runs here, accessible)  │
└─────────────────────────────┘
Build-Up - 7 Steps
1
FoundationUnderstanding Virtual Machines Basics
🤔
Concept: Learn what a virtual machine is and why it is useful.
A virtual machine is a software computer that runs inside a physical computer. It acts like a real computer with its own operating system and applications. This lets you run many computers on one physical machine, saving space and cost.
Result
You understand that a VM is a flexible, software-based computer you can control remotely.
Knowing what a VM is helps you see why creating one in the cloud is powerful and different from using a physical computer.
2
FoundationNavigating the Azure Portal Interface
🤔
Concept: Familiarize with the Azure Portal where you create and manage cloud resources.
Azure Portal is a website where you log in to see and control your cloud resources. It has menus, search bars, and forms to help you create VMs and other services. You can find the 'Virtual Machines' section to start creating a new VM.
Result
You can confidently open Azure Portal and locate where to create a VM.
Understanding the portal layout reduces confusion and speeds up your VM creation process.
3
IntermediateChoosing VM Size and Operating System
🤔Before reading on: Do you think VM size affects cost or performance more? Commit to your answer.
Concept: Learn how to select the right VM size and operating system for your needs.
When creating a VM, you pick a size that defines CPU power, memory, and storage speed. Larger sizes cost more but run faster. You also choose an operating system like Windows or Linux, which determines what software you can run.
Result
You can select a VM size and OS that balance cost and performance for your tasks.
Knowing how size and OS choices impact your VM helps avoid overspending or poor performance.
4
IntermediateConfiguring Networking and Security Settings
🤔Before reading on: Should a VM be open to the internet by default? Commit to your answer.
Concept: Understand how to set up network access and protect your VM.
You configure a virtual network and subnet to connect your VM to other resources. You also set firewall rules called Network Security Groups to control who can access your VM. By default, it's safer to limit access to only trusted IPs.
Result
Your VM is connected securely and only accessible to authorized users.
Proper network and security setup prevents unauthorized access and protects your data.
5
IntermediateUsing Storage Options for VM Disks
🤔
Concept: Learn about the types of storage disks and how to attach them to your VM.
Azure offers different disk types like Standard HDD, Standard SSD, and Premium SSD. Each has different speed and cost. You attach an OS disk to run the system and can add data disks for extra storage.
Result
You can choose storage that fits your performance needs and budget.
Selecting the right disk type affects how fast your VM runs and how much you pay.
6
AdvancedDeploying and Accessing Your VM
🤔Before reading on: Do you think you can access a VM immediately after creation? Commit to your answer.
Concept: Understand the deployment process and how to connect to your VM once ready.
After configuring, you click 'Create' to deploy the VM. Azure sets up the VM in the cloud, which takes a few minutes. Once running, you connect using Remote Desktop for Windows or SSH for Linux using the public IP address.
Result
You have a running VM you can log into and use like a real computer.
Knowing the deployment and access steps ensures you can start working on your VM without confusion.
7
ExpertOptimizing VM Creation with Templates and Automation
🤔Before reading on: Do you think manual VM creation is best for large-scale deployments? Commit to your answer.
Concept: Learn how to use Azure Resource Manager templates and automation to create VMs efficiently.
Instead of clicking through the portal every time, you can write a JSON template describing your VM setup. This template can be reused to create many identical VMs quickly. You can also automate creation using Azure CLI or PowerShell scripts.
Result
You can deploy multiple VMs consistently and save time in production environments.
Understanding automation and templates is key to managing cloud resources at scale and avoiding human errors.
Under the Hood
When you create a VM in Azure Portal, the portal sends your configuration to Azure's control plane. This control plane allocates physical hardware resources in data centers, sets up virtual networking, storage, and security according to your settings. It then boots the VM's operating system inside a hypervisor, which isolates it from other VMs on the same hardware. You access the VM over the internet or private network using assigned IP addresses.
Why designed this way?
Azure was designed to provide flexible, scalable computing without users managing physical servers. Using a control plane and hypervisor allows many VMs to share hardware securely and efficiently. The portal offers a user-friendly way to configure complex cloud resources without deep technical knowledge, making cloud computing accessible to everyone.
┌───────────────┐       ┌─────────────────────┐
│ Azure Portal  │──────▶│ Azure Control Plane  │
└───────────────┘       └─────────┬───────────┘
                                    │
                                    ▼
                      ┌─────────────────────────┐
                      │ Physical Servers &      │
                      │ Hypervisor Layer        │
                      └─────────────┬───────────┘
                                    │
                                    ▼
                      ┌─────────────────────────┐
                      │ Your Virtual Machine    │
                      │ (Isolated OS & Apps)    │
                      └─────────────────────────┘
Myth Busters - 4 Common Misconceptions
Quick: Do you think creating a VM automatically makes it secure from internet threats? Commit yes or no.
Common Belief:Once a VM is created, it is safe and protected from outside attacks by default.
Tap to reveal reality
Reality:By default, VMs may have open ports or weak security settings. You must configure network security groups and firewalls to protect them.
Why it matters:Assuming default security is enough can lead to unauthorized access and data breaches.
Quick: Do you think VM size only affects speed, not cost? Commit yes or no.
Common Belief:Choosing a bigger VM size only makes the VM faster but does not increase the cost significantly.
Tap to reveal reality
Reality:Larger VM sizes cost more because they use more CPU, memory, and storage resources.
Why it matters:Ignoring cost implications can lead to unexpectedly high cloud bills.
Quick: Do you think you can instantly use a VM right after clicking create? Commit yes or no.
Common Belief:The VM is ready to use immediately after creation starts.
Tap to reveal reality
Reality:It takes several minutes for Azure to allocate resources and boot the VM before it is accessible.
Why it matters:Expecting instant availability can cause confusion and delays in workflows.
Quick: Do you think manual VM creation is best for managing many VMs? Commit yes or no.
Common Belief:Manually creating each VM through the portal is efficient even for large deployments.
Tap to reveal reality
Reality:Manual creation is slow and error-prone for many VMs; automation and templates are better.
Why it matters:Not using automation leads to inconsistent setups and wasted time in production.
Expert Zone
1
Azure VM sizes are grouped into families optimized for different workloads like compute, memory, or storage, which affects performance beyond just size.
2
The choice of storage type impacts not only speed but also durability and backup options, which are critical for production systems.
3
Network Security Groups can be layered and combined with Azure Firewall and other services for multi-level security, a detail often missed by beginners.
When NOT to use
Creating VMs manually in the portal is not ideal for large-scale or repeatable deployments; instead, use Infrastructure as Code tools like ARM templates, Terraform, or Azure CLI scripts for automation and consistency.
Production Patterns
In production, teams use VM scale sets to manage groups of identical VMs automatically, integrate VMs with load balancers for traffic distribution, and apply tagging for cost tracking and management.
Connections
Infrastructure as Code (IaC)
Builds-on
Understanding VM creation in the portal helps grasp how IaC tools automate and scale this process, making cloud management more efficient.
Network Security
Same pattern
Configuring VM network access connects directly to broader network security principles, showing how cloud and traditional security overlap.
Manufacturing Assembly Lines
Analogy in process optimization
Just like assembly lines automate building products efficiently, automating VM creation streamlines cloud resource deployment, highlighting universal efficiency principles.
Common Pitfalls
#1Leaving VM ports open to the internet without restrictions.
Wrong approach:Creating a VM and setting Network Security Group rules to allow all inbound traffic on port 3389 (RDP) from any IP.
Correct approach:Restricting inbound RDP access to specific trusted IP addresses only in Network Security Group rules.
Root cause:Misunderstanding default security settings and the need to limit access to reduce attack surface.
#2Choosing the largest VM size without assessing workload needs.
Wrong approach:Selecting a VM with 16 CPUs and 64 GB RAM for a simple web server that needs minimal resources.
Correct approach:Selecting a smaller VM size that matches the actual resource requirements to save cost.
Root cause:Assuming bigger is always better without considering cost-performance balance.
#3Trying to connect to the VM immediately after clicking create.
Wrong approach:Attempting SSH or RDP connection right after VM creation starts, expecting instant access.
Correct approach:Waiting for the VM status to show 'Running' and the public IP to be assigned before connecting.
Root cause:Not understanding the deployment process and time needed for VM provisioning.
Key Takeaways
Creating a VM in Azure Portal is like ordering a custom computer that runs instantly in the cloud, ready for your use.
Choosing the right VM size, operating system, and storage affects both performance and cost, so balance these carefully.
Security settings, especially network access rules, must be configured to protect your VM from unauthorized access.
Automation through templates and scripts is essential for managing many VMs efficiently and consistently.
Understanding the deployment process and Azure's control plane helps you troubleshoot and optimize VM creation.