Creating a Virtual Machine (VM) in Azure is an essential task for any Azure Administrator. It’s part of both daily-functioning and the cornerstone of the AZ-104: Microsoft Azure Administrator certification exam.

Table of Contents

Understanding Virtual Machines in Azure

Azure Virtual Machines (VM) is a service that provides on-demand, high-scale, secure, and customizable computing resources. They are an essential component of any cloud-based infrastructure service.

VMs help you move your servers and apps to Azure without investing in hardware. With Azure VMs, you can:

  • Build or deploy any type of apps with high availability and security.
  • Scale your applications across many high-performance computing units.
  • Create Linux and Windows VMs in seconds.

Azure VMs support a variety of operating systems, including Linux, Windows Server, SQL Server, Oracle, IBM, and SAP.

Steps to Create a Virtual Machine

1. Log in to the Azure Portal

First, log into the Azure portal. Make sure that you have the necessary permissions and subscriptions.

2. Create a VM

Navigate to the Virtual Machines section. Click on the “Add” button and select “Virtual machine” from the dropdown menu.

3. Configure the VM

You will need to supply certain details to configure the VM, such as:

  • Subscription: Choose the Azure subscription in which the VM should be created.
  • Resource group: A resource group is a way to group Azure resources. You can either create a new one or use an existing one.
  • Virtual machine name: Assign a name to the VM.
  • Region: Select the Azure region closest to your users for best performance.
  • Availability options: These settings help ensure that your VM remains accessible during outages and maintenance events.
  • Image: This is the OS that the VM will use.
  • Size: This specifies the power of the VM in terms of CPU, RAM, and data disk size.

The following table provides a sample filling of the above fields:

Field Value
Subscription Free Trial
Resource Group TestResourceGroup
Virtual Machine Name TestVM
Region Central US
Availability options No infrastructure redundancy required
Image Windows Server 2019 Datacenter
Size Standard D2 v3

4. Admin Account and Ports

In this step, you create an administrative account for the VM and configure inbound ports.

5. Disks

Choose the type of storage disk. You can choose between SSD (Solid State Drive) for high-performance and HDD (Hard Disk Drive) if you want to economize.

6. Networking

Configure the virtual network, subnet, public IP, and Network Security Group (NSG) according to your needs.

7. Management, Advanced, and Tags

These sections allow you to further configure monitoring, auto-shutdown, and to tag the VM for better resource organization.

8. Review and Create

Review your configurations and click on “Create” to create the VM if everything seems alright.

The Azure portal will then begin the VM creation process. The process will take a few minutes. Once it’s complete, your new VM will be ready for use.

Conclusion

Azure VMs provide a flexible, powerful, and easy means to create and manage virtualized infrastructure for a wide variety of applications. Understanding how to create and configure a VM is a fundamental skill for any Azure Administrator preparing for the AZ-104 exam. Remember to familiarize yourself with the different configuration options for VMs to maximize their efficiency and effectiveness.

Practice Test

(True/False) You can select your own specific IP address for a new VM in Azure.

  • True
  • False

Answer: False.

Explanation: Azure automatically assigns a public IP address to a new VM.

Which of the following is a mandatory step while creating a VM?

  • a) Adding public inbound port
  • b) Defining the size of the virtual machine
  • c) Joining Azure AD
  • d) Installing Microsoft Teams

Answer: b) Defining the size of the virtual machine

Explanation: Defining the size/capacity of the VM is mandatory step to allocate resources to it.

(True/False) A newly created Azure VM is always associated with a storage account.

  • True
  • False

Answer: True.

Explanation: Azure always associates a new VM with a storage account for Virtual Hard Disk (VHD).

In Azure, a VM can only be created in ___________.

  • a) Subscriptions
  • b) Resource Groups
  • c) VNet
  • d) Availability Set

Answer: b) Resource Groups

Explanation: Azure requires that all VMs be created in a resource group.

(True/False) Azure VM gives the flexibility to select an operating system.

  • True
  • False

Answer: True.

Explanation: Azure VMs gives you the flexibility to choose different operating systems like Windows, Linux, etc.

Which of the following is Azure’s Single Core VM size?

  • a) Standard_B1s
  • b) Standard_D2s_v3
  • c) Standard_DS2_v2
  • d) Standard_B2ms

Answer: a) Standard_B1s

Explanation: Standard_B1s is Azure’s Single Core VM size option.

(True/False) You can select the OS disk type while creating a VM.

  • True
  • False

Answer: True.

Explanation: During VM creation, you can select either Premium SSD, Standard SSD, or Standard HDD as the OS disk type.

Which of the following are the roles of Availability Node in Azure while creating VM?

  • a) Increase VM availability
  • b) Increase VM scalability
  • c) Decrease application failures
  • d) Reduce the need for application data replication

Answer: a) Increase VM availability, c) Decrease application failures and d) Reduce the need for application data replication.

Explanation: Availability Node plays crucial role in increasing the availability of VM, decrease the issue of application failures, and reduces the need of application data replication.

(True/False) It is possible to use Azure CLI, PowerShell, and Azure portal to create VM.

  • True
  • False

Answer: True.

Explanation: These three platforms – Azure CLI, PowerShell, and Azure portal, can be used to create VM.

Who is responsible for patching and maintaining Azure VM?

  • a) Microsoft
  • b) VM owner
  • c) Both
  • d) None

Answer: b) VM owner

Explanation: As a part of shared responsibility model, VM patching and maintenance is the responsibility of the VM owner.

Interview Questions

What is a VM in the context of Azure?

A VM, or Virtual Machine, in Azure is an on-demand, scalable computing resource deployed on Azure. It provides the flexibility of virtualization without the need to purchase and maintain the physical hardware that runs it.

What are the two main types of disks you can use with Azure VMs?

The two main types of disks are Managed and Unmanaged disks. Managed disks handle disk storage behind the scenes, while with Unmanaged disks, one has manual control over disk storage.

What is Scale Set in Azure VM?

A Scale Set is an Azure service that allows the configuration of a group of identical VMs. It allows for applications to be scaled out and in based on demand or on a defined schedule.

What are the steps to create a Virtual Machine in Azure?

To create a VM in Azure, first, you need to sign into Azure portal. Second, select ‘Virtual machines’ and then select ‘Add’. You then will need to select the subscription and a resource group. You specify the name and region for your VM, choose your desired image and size, and then set up administrator account. You also need to specify inbound port rules and select disks. Optionally, you can also select other options such as Networking, Management, Advanced and Tags. Finally, review and create.

What is an Azure policy used for?

An Azure policy is a service in Azure used to create, assign and manage policy definitions. It is used to enforce different rules and effects over your resources to ensure compliance with your corporate standards and service level agreements.

What are the networking components necessary for an Azure virtual machine?

The primary networking components necessary for an Azure virtual machine are an IP address, a Network Interface, a Virtual Network, and a Network Security Group.

Can you resize an Azure VM?

Yes, you can resize an Azure VM, however, the VM needs to be stopped and deallocated first before changing its size.

What is a VM scale set in Azure?

A VM scale set in Azure is an Azure Compute resource you can use to deploy and manage a set of identical VMs.

What is the maximum number of CPU cores you can have per subscription in Azure?

The default maximum number of CPU cores per subscription in Azure is 20, but you can request an increase from Azure support.

How can you connect to a running VM in Azure?

You can connect to a running VM in Azure via Secure Shell (SSH) for Linux VMs, or via Remote Desktop Protocol (RDP) for Windows VMs.

Where should you store data that must survive a reboot in Azure virtual machines?

Data that must survive a reboot should be stored on the data disk of an Azure virtual machine.

How do you add more storage to a virtual machine in Azure?

You can add disks to a VM, either during creation or after it has been created. When creating a VM, you can choose the OS disk type, and add optional data disks. If the VM is already created, you can attach a new disk to it.

What is Azure Disk Encryption?

Azure Disk Encryption helps protect and safeguard your data to meet your compliance commitment. It uses BitLocker feature of Windows and the dm-crypt feature of Linux to encrypt managed disks with customer-managed keys.

What are Spot VMs in Azure?

Spot VMs are an Azure offering that allows you to take advantage of unused Azure capacity at a significant cost savings.

What is VM Scale Sets Autoscale in Azure?

VM Scale Sets Autoscale in Azure allows your applications to automatically increase or decrease VM instances’ count in response to demand or a defined schedule, ensuring performance while minimizing cost.

Leave a Reply

Your email address will not be published. Required fields are marked *