Creating a VM
Before you start creating your VM, you need to plan for what Resource Group
TODO: Finish creating the VM. Skipping for now to save time.
- Virtual machines in Azure have two distinct names:
- virtual machine name used as the Azure resource identifier,
- and in guest host name.
- When you create a VM in the portal, the same name is used for both the virtual machine name and the host name.
- The virtual machine name cannot be changed after the VM is created.
- You can change the host name when you log into the virtual machine.
- VMs are susceptible to 3 types of events:
- Planned Maintenance
- Microsoft updates on the HOST machine where the VM lives.
- Unplanned Maintenance
- Azure might have an unhealthy HOST that your VM lives on. Azure will automatically migrate it. But, in order to migrate it, the VM must be paused.
- Unexpected Downtime
- If a VM migration fails for any reason you will experience downtime.
- Planned Maintenance
Fault Domains (FD)
A Fault Domain is a server cabinet (aka rack)
Update Domain (UD)
Update Domains are designed to protect you from an unexpected reboots of the host where you VM lives.
When you create an Availability Set, Azure will create 5 Update Domains (UD) by default. So if Azure needs to reboot a host, it will do so where it only affects 1 UD at a time. Then waits 30 minutes (so it can recover) before moving onto the next one.
Update Domains are not tied to any particular Fault Domain (FD)
It’s a best practice to separate your workloads into separate Availability Sets
Disadvantages of Availability Sets
- Every VM in an Availability Set explicitly created including OS, Applications, configurations, etc.
- You will need a load balancer in front of the VMs to get traffic to them
- Paying for more VMs that normal
- Not compatible with Availability Zones (AZ) since it’s only using racks (FDs & UDs) in a single data center.
Microsoft offers a 99.95% SLA for multi-VM deployment. However, you can use a single-VM with premium storage and get a 99.99% SLA.
TODO: according to the study guide, Premium storage just uses SSDs on the SAME PHYSICAL HOST. That to me seems like a single point of failure and the SLA should’ve decreases.
Advantages of Scale Sets
- Solves the disadvantages of Availability Sets
- Tell Azure what OS and how many (up to 1000)
- Still may need a load balancer, gateway, etc. depending on what your applications is doing.
- Scale Sets are deployed in Availability Sets automatically
- VMs in a Scale Set are also spread out over Availability Zones (AZ) where Availability Sets are stuck in a single data center
- Auto-scaling, only pay for what the load is. Unused/unneeded VMs are scaled down
To Use a Scale Set
- The default set of templates only contain an OS, so you need to make a golden image (aka Custom VM Image) and use that as the basis for the Scale Set.