Tutorial / Cram Notes
Before creating a VM, you should have:
- An Azure subscription.
- Azure role assignments with permissions to create VMs.
Steps to Create a VM using the Azure Portal:
Step 1: Choose your Azure VM
Navigate to the Azure portal and select “Create a resource”. Under the ‘Compute’ category, choose ‘Virtual Machine’. You will be taken to the ‘Basics’ tab where you will start configuring your VM.
Step 2: Configure Basics
Fill out the details in the ‘Basics’ tab such as:
- Subscription: Select the Azure subscription you would like to use.
- Resource Group: Create a new resource group or use an existing one.
- Virtual machine name: Choose a name for your VM.
- Region: Select the Azure region where your VM will be hosted.
- Availability options: Choose availability sets, zones, or none based on your availability requirements.
- Image: Select an OS image. (e.g., Windows Server 2019 Datacenter, Ubuntu Server 18.04 LTS)
- Size: Choose the VM size based on your workload. You can use the ‘Size’ link to help you pick one.
- Administrator account: Set the username and password or SSH public key for logging in to your VM.
- Inbound port rules: Configure these to control access. Commonly, you might allow SSH (port 22) or RDP (port 3389).
Step 3: Disks
Switch to the ‘Disks’ tab. Here you can configure:
- OS disk type: Select between standard HDD, standard SSD, and premium SSD based on performance needs.
- Encryption: You can leave the default encryption setting, or choose your encryption type.
You can also attach additional data disks here, if needed.
Step 4: Networking
In the ‘Networking’ tab, you’ll setup:
- Virtual network/subnet: Set up or select an existing virtual network and subnet for the VM.
- Public IP: Decide whether to assign a public IP.
- NIC network security group: Choose to have basic security rules (allowing RDP/SSH) or a specific network security group.
- Accelerated networking: Enable this if supported by the VM size you’ve chosen, and if you seek improved networking performance.
Step 5: Management, Advanced, and Tags
These tabs allow further configurations such as:
- Management: Enable monitoring, auto-shutdown, and other management features.
- Advanced: Set up extensions, proximity placement group, and other advanced settings.
- Tags: Add metadata tags to organize and manage resources in your Azure environment.
Step 6: Review + Create
Finally, review your settings to make sure they’re correct. Azure will validate your configuration. Once everything is set, click ‘Create’ to deploy your VM.
Step 7: Connect to the VM
After the deployment is complete, navigate to the VM’s page in the Azure portal. Click on ‘Connect’ and choose the method you wish to use (RDP, SSH, or Bastion) and follow the given instructions to log in to your VM.
VM Sizing Comparison
Azure offers different series of VMs that cater to various workloads. Here is a brief comparison for some common types:
Series | Use-case | CPU-to-Memory Ratio | Specialty |
---|---|---|---|
A | Entry-level economical | Balanced | General testing |
B | Cost-effectiveness | Flexible | Bursting workloads |
D | General purpose | Balanced | Broad workloads |
E | Memory optimized | High memory | In-memory analytics |
F | Compute optimized | High CPU | Compute-intensive workloads |
G | Memory and storage | High memory | Large databases |
Conclusion
By following these steps, you can effectively set up a virtual machine in Azure that suits your workload requirements. Remember, selecting the correct VM size, region, and configuring the settings appropriately are crucial for deploying a reliable and efficient VM in the Azure environment. Your understanding of VM creation and management is critical for the AZ-104 Microsoft Azure Administrator exam and practical Azure administration.
Practice Test with Explanation
True or False: In Azure, you can create a VM only through the Azure portal.
- A) True
- B) False
Answer: B) False
Explanation: Azure VMs can be created through various methods, including the Azure portal, Azure CLI, Azure PowerShell, and ARM templates.
When creating a VM, which of the following items are required? (Select all that apply)
- A) Resource group
- B) Virtual network
- C) Public IP address
- D) Storage account
Answer: A) Resource group, B) Virtual network, D) Storage account
Explanation: Resource group, virtual network, and storage account are required when creating a VM. A public IP address is optional and only needed if the VM should be accessible from the internet.
True or False: You must create a new virtual network for each VM you deploy in Azure.
- A) True
- B) False
Answer: B) False
Explanation: Multiple VMs can be connected to the same virtual network. You do not need to create a new one for each VM unless specifically required.
What is the purpose of the Azure Marketplace when creating a new VM?
- A) To purchase additional storage
- B) To choose a VM size
- C) To provide pre-configured VM images
- D) To manage virtual network settings
Answer: C) To provide pre-configured VM images
Explanation: The Azure Marketplace provides a variety of pre-configured VM images from Microsoft and other vendors which can be used to create new VMs with specific software or configurations.
True or False: Azure always automatically assigns a public IP address to new VMs.
- A) True
- B) False
Answer: B) False
Explanation: Assigning a public IP address to a new VM is optional and based on the requirements of the deployment. By default, Azure does not automatically assign a public IP.
Which Azure service provides in-depth monitoring for VMs?
- A) Azure Monitor
- B) Azure Policies
- C) Azure Advisor
- D) Azure Service Health
Answer: A) Azure Monitor
Explanation: Azure Monitor provides in-depth monitoring services for various Azure resources including VMs, allowing you to collect, analyze, and act on telemetry data.
True or False: You need to manually install the Azure VM Agent on Windows VMs created in Azure.
- A) True
- B) False
Answer: B) False
Explanation: The Azure VM Agent is installed by default on Windows VMs created from the Azure Marketplace images.
When configuring an Azure VM, what is the role of an Availability Set?
- A) Defines the region where the VM will be located
- B) Provides high availability for VMs by distributing them across multiple physical servers
- C) Monitors the performance of the VMs
- D) Assigns a public IP to the VM
Answer: B) Provides high availability for VMs by distributing them across multiple physical servers
Explanation: Availability Sets are used to provide high availability for VMs in Azure by distributing them across multiple physical servers and fault domains.
Which of the following VM sizes would you recommend for a compute-intensive workload?
- A) B-series
- B) D-series
- C) E-series
- D) F-series
Answer: D) F-series
Explanation: F-series VMs are optimized for compute-intensive workloads, with a high CPU-to-memory ratio.
True or False: It is mandatory to attach at least one data disk to an Azure VM upon creation.
- A) True
- B) False
Answer: B) False
Explanation: While you can attach data disks to an Azure VM, it is not mandatory to do so upon creation. VMs can be created with just an OS disk.
In Azure, what is the Azure Resource Manager (ARM)?
- A) A deployment model for managing VMs and other resources
- B) A specific type of VM for resource management tasks
- C) A monitoring tool
- D) A command-line interface for managing resources
Answer: A) A deployment model for managing VMs and other resources
Explanation: Azure Resource Manager is the deployment and management service for Azure. It provides a management layer that enables you to create, update, and delete resources in your Azure account.
True or False: When you create an Azure VM, you are able to select different operating systems including Linux-based distributions.
- A) True
- B) False
Answer: A) True
Explanation: Azure provides a wide range of available operating system images for VMs, including various Linux distributions and Windows Server versions.
Interview Questions
What is a Virtual Machine (VM)?
A VM is a software-based representation of a physical computer that can run an operating system and applications.
What is the Azure portal?
The Azure portal is a web-based console for managing Azure resources.
How do I create a VM in Azure?
To create a VM in Azure, log in to the Azure portal, click on the “Create a resource” button, and follow the on-screen instructions.
What information do I need to provide when creating a VM in Azure?
When creating a VM in Azure, you will need to provide information such as the image to use, the region where the VM will be located, the size of the VM, and the administrator account to use.
What is a resource group in Azure?
A resource group is a container for resources in Azure that share the same lifecycle, permissions, and policies.
What is a virtual network in Azure?
A virtual network in Azure is a logical representation of a network that is isolated from other networks.
What is load balancing in Azure?
Load balancing in Azure is a way to distribute network traffic across multiple servers to improve performance and availability.
How do I troubleshoot issues with my Azure VM?
To troubleshoot issues with your Azure VM, you can use Azure diagnostics logs and the Azure support portal.
What is a node failure in Azure?
A node failure in Azure occurs when the physical machine that hosts your VM experiences a hardware or software failure.
How do I redeploy my Azure VM to a new node?
To redeploy your Azure VM to a new node, navigate to your VM in the Azure portal and click on the “Redeploy” button in the toolbar.
What happens when I redeploy my Azure VM to a new node?
When you redeploy your Azure VM to a new node, the VM is moved to a new physical machine, which can help resolve issues related to node failures or other types of downtime.
Can I redeploy my Azure VM to a different region?
No, you cannot redeploy your Azure VM to a different region.
What should I do if redeploying my Azure VM does not resolve the issue?
If redeploying your Azure VM does not resolve the issue, you may need to troubleshoot the issue further using Azure diagnostics logs or by contacting Azure support.
Can I automate the redeployment of my Azure VM?
Yes, you can automate the redeployment of your Azure VM using Azure Resource Manager templates or the Azure CLI.
What other types of troubleshooting can I perform on my Azure VM?
Other types of troubleshooting you can perform on your Azure VM include checking for and resolving network issues, monitoring performance metrics, and checking for software updates.
Thanks for the insightful post!
I followed the steps to create a VM but I’m stuck at the networking part. Anyone else faced this issue?
Excellent guide on VM creation. Helped me a lot!
Can anyone explain the difference between a managed and unmanaged disk while creating a VM?
Great content, really helped me pass the AZ-104 exam!
How does the VM pricing model work in Azure? It seems a bit complex to me.
I’ve found that the GUI approach to creating a VM is much simpler for beginners than using PowerShell or CLI.
The section on troubleshooting VM extensions was particularly helpful. Thanks!