Virtual Machine with Azure Portal
Tags: virtualmachine, azure, infrastructureascode, 100daysofcloud
Published: 2024-01-21 03:23:05

A Virtual Machine (VM) is a software-based emulation of a physical computer. It operates as an independent instance with its own virtualized hardware, allowing it to run an operating system and applications. VMs provide flexibility, scalability, and resource optimization in cloud computing environments.


![Virtual Machine](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hievs3a0p7jt687ktfbl.png)



*Significance - Gaming Perspective:*
In the gaming world, think of a Virtual Machine as a gaming console within your computer. It creates a virtual gaming environment where different games (applications) can run simultaneously. Each VM is like a dedicated gaming system, enabling diverse gaming experiences without the need for separate physical hardware. This abstraction of computing resources enhances efficiency and allows for the deployment of various gaming scenarios on a single machine.

**Azure VM with Preset Configuration**

An Azure Virtual Machine (VM) with a preset configuration refers to a pre-defined and standardized set of specifications, settings, and software configurations provided by Azure. 


![VM with Different Configs](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wmt6kmfuen1oxglnyvp1.png)



**Azure Arc**

Azure Arc is a service from Microsoft that extends Azure's management capabilities to resources outside of the Azure cloud, including on-premises servers and VMs, and even resources in other cloud providers. An Azure Arc VM, in particular, is a virtual machine running outside of Azure (on-premises, in another cloud provider, or at the edge) that is connected to and managed by Azure.

**Azure VMware Solution Virtual Machine**

An Azure VMware Solution (AVS) virtual machine (VM) is a virtualized computing instance created and managed within the Azure VMware Solution offering. Azure VMware Solution enables organizations to run VMware workloads natively on Azure infrastructure, providing a consistent and familiar environment for VMware-based applications.



![Create VM](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qfp5o3ittqwqo8tjx5gg.png)

**Let's Start Creating VM now ....................**

**Subscription**

It represents an agreement with Microsoft to use Azure services and is associated with a unique billing account. Subscriptions help organize and manage access to resources, and they serve as a unit of billing for Azure services.


![Subscription](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1vzlpjxbug43t19dihk3.png)



**Significance - Gaming Perspective:**
Think of a subscription as acquiring a membership to a gaming platform. When you subscribe to a gaming service, you gain access to a variety of games and features. Similarly, an Azure subscription grants access to a range of Azure services, and just like subscribing to a gaming platform gives you certain privileges and benefits, an Azure subscription allows you to leverage various resources and capabilities within the Azure ecosystem.

**Resource Group**

A resource group in Azure is a logical container used to hold and manage related resources. Resources within a group share the same lifecycle, policies, and access permissions. 

![Subscription](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1vzlpjxbug43t19dihk3.png)

**Significance - Gaming Perspective:**
Consider a resource group as a gaming clan or guild within the gaming platform. Members of the same clan share resources, coordinate strategies, and have a unified purpose. Similarly, resources within an Azure resource group are interconnected and managed together, ensuring a cohesive approach to deploying, monitoring, and maintaining those resources.

### Virtual Machine Name: 


![VM Name](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vtklg0z38tyv7afbzjnp.png)



Think of a VM Name as the username or gamer tag associated with a player's character in an online game. 

### Region of a VM

The Region of a VM in Azure refers to the geographical location where the virtual machine's resources are physically hosted. Azure data centers are distributed globally, and each region represents a specific geographic area with multiple data centers. Choosing a region for a VM determines the physical location of the underlying infrastructure.


![VM Region](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h9q1knpt08khfraqz4d4.png)


**Significance - Gaming Perspective:**
Imagine the Region of a VM as the in-game server or game world where a player's character exists. When you choose a specific region for your VM, you are essentially deciding the physical location of the server infrastructure hosting your virtual machine. This choice can impact factors like latency (similar to how a player might experience lag in different game servers) and compliance with regional data residency requirements.

### Availability Options in Azure:


![Availability Options](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b4uqzttik5f56jgr39li.png)


*Availability Zone:*

**Definition:**
An Availability Zone in Azure is a unique physical location within an Azure region, made up of one or more data centers equipped with independent power, cooling, and networking. Azure ensures that these zones are separate from each other to protect applications and data from data center failures. Deploying resources across Availability Zones increases application resiliency and availability


**Significance - Gaming Perspective:**
Think of Availability Zones as different gaming realms or worlds. Each zone represents a distinct environment where game servers are hosted. By deploying game servers across multiple Availability Zones, game developers ensure that if one zone encounters issues (similar to server downtime), players can seamlessly switch to another zone, maintaining uninterrupted gameplay.

*VM Scale Set:*

**Definition:**
A Virtual Machine Scale Set (VMSS) in Azure allows for the deployment and management of a set of identical, auto-scaling VMs. VMSS automatically increases or decreases the number of VM instances based on demand or defined rules. It's an ideal solution for applications with varying workloads.

![Availability Options](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b4uqzttik5f56jgr39li.png)

**Significance - Gaming Perspective:**
In gaming terms, a VM Scale Set is like having an auto-scaling feature for the number of game servers. When there's a surge in player activity, additional game servers (VM instances) are automatically spun up to handle the load. Conversely, during low activity periods, the number of servers scales down to optimize resources.

*Availability Set:*

**Definition:**
An Availability Set in Azure is a logical grouping of VMs within a data center to ensure high availability. VMs in an Availability Set are placed in separate fault domains and update domains, minimizing the impact of hardware failures and planned maintenance events.

![Availability Options](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b4uqzttik5f56jgr39li.png)

**Significance - Gaming Perspective:**
Consider an Availability Set as forming a gaming party with friends. Each VM in the set is like a player in the party. By distributing party members across different fault domains, the group ensures that if one domain faces challenges (like a technical glitch), the overall gaming experience remains stable, as not all party members are affected simultaneously.


### Availability Zones in Azure:

**Availability Zone:**

An Availability Zone in Azure is a distinct physical location within an Azure region, consisting of one or more data centers that are equipped with independent power, cooling, and networking. Azure has multiple Availability Zones in most regions to ensure resilience and high availability of applications and data.

Imagine Availability Zones as separate levels or stages within a gaming environment. Each zone, represented by Zone 1, Zone 2, and Zone 3, is like a unique gaming arena. If one arena encounters challenges, the game seamlessly continues in another, providing players with a consistent and reliable gaming experience. This setup safeguards against downtime or disruptions in specific zones.

**Zone 1, Zone 2, Zone 3:**

These are individual components of an Azure Availability Zone. Each zone is essentially a data center with its own set of infrastructure, resources, and networking capabilities. The zones within a region are designed to be isolated from one another.


![Availability Zone](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fc0dxnrjv9p3qs0evu38.png)



In the gaming world, Zone 1, Zone 2, and Zone 3 are akin to different game levels or maps. Each zone functions independently, allowing game developers to strategically distribute game resources and servers across these zones. This distribution ensures that if an issue arises in one zone, the gameplay seamlessly transitions to another, providing players with a reliable and uninterrupted gaming experience.


### Security Types in Azure Virtual Machines:

**Standard Security:**

Standard security for Azure Virtual Machines involves implementing fundamental security measures to protect the virtual machine and its associated resources. This includes configuring network security groups, firewalls, and other standard security practices.


![Security in VM](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fypgrismmquvjdqs89nb.png)


In a gaming environment, standard security is comparable to basic player protection mechanisms. It involves implementing standard security features to prevent unauthorized access, ensuring fair play, and maintaining the integrity of the gaming environment.

**Trusted Launch VM:**

Trusted Launch VM is an advanced security feature that ensures the integrity of the virtual machine's boot process. It provides a secured environment during the startup of the VM by protecting against firmware-level attacks and verifying the trustworthiness of the boot process.
![Security in VM](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fypgrismmquvjdqs89nb.png)

In gaming, Trusted Launch VM is like a secure game launch protocol. It ensures that the game starts in a secure and untampered environment, preventing any malicious attempts to compromise the game's fundamental processes.

**Confidential VM:**

Confidential VMs in Azure use hardware-based trusted execution environments (TEEs) to protect the confidentiality and integrity of virtual machines' data during runtime. It provides additional security layers, especially suitable for sensitive workloads.
![Security in VM](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fypgrismmquvjdqs89nb.png)

In the gaming world, Confidential VMs are comparable to a secure gaming server environment for handling highly sensitive information. This ensures that critical gaming data, such as user identities and in-game transactions, is processed in a confidential and secure manner.


### Images in Azure Virtual Machines:

In Azure Virtual Machines, an "Image" refers to a pre-configured and customized snapshot or template of a virtual machine. These images serve as the foundation for creating new VM instances, allowing users to replicate configurations, applications, and system settings across multiple virtual machines.


![Images in VMs](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v69xa6wgppw2mh7p7wy6.png)



**Significance - Gaming Perspective:**
From a gaming standpoint, an image in VM is comparable to a saved game state. It represents a specific point in the game's progress with all achievements, character attributes, and settings intact. Just as an image helps recreate a consistent gaming experience, an Azure VM image ensures the consistent deployment of virtual machines with the desired configurations.

**Usage Scenario:**
Consider a game developer who has configured a virtual machine with all the necessary development tools, libraries, and dependencies. Instead of manually replicating this setup for every developer, the developer can create an image of the VM. Other developers can then use this image to spin up VM instances with the same development environment, streamlining the game development process.


### VM Architecture in Azure:

![VM Architecture in Azure](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pf3ekhb0znm0tpz5bwet.png)



**ARM 64 (Advanced RISC Machines 64-bit):**

**Definition:**
ARM 64 is a type of processor architecture based on the ARM (Advanced RISC Machines) design that uses a 64-bit instruction set. In Azure VMs, ARM 64 architecture is utilized for virtual machines powered by ARM-based processors. These processors are known for their efficiency and are commonly used in mobile devices, IoT devices, and certain server workloads.

**Significance:**
ARM 64 architecture in VMs is significant for specific workloads that benefit from the performance and power efficiency of ARM-based processors. It provides an alternative to the more traditional x64 architecture, allowing users to choose the architecture that best suits their application requirements and performance considerations.

**x64 (64-bit x86):**

**Definition:**
x64, also known as 64-bit x86, is a processor architecture that extends the x86 instruction set to 64 bits. In Azure VMs, x64 architecture is employed for virtual machines powered by x86-based processors. This architecture is widely used in desktops, laptops, and servers, supporting a broad range of applications and workloads.
![VM Architecture in Azure](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pf3ekhb0znm0tpz5bwet.png)

**Significance:**
x64 architecture is the standard for many general-purpose computing tasks, offering compatibility with a vast array of software and applications. It provides ample processing power and memory addressing capabilities, making it suitable for a wide range of enterprise applications, including database servers, web servers, and more.

**Usage Scenario:**
Imagine an organization running a web application that has been optimized for ARM 64 architecture to achieve better energy efficiency. They might choose ARM 64-based VMs for specific parts of their infrastructure where this architecture offers advantages. On the other hand, x64 architecture might be preferred for VMs handling general-purpose workloads, ensuring compatibility with a diverse set of software. The ability to choose between ARM 64 and x64 architectures allows organizations to tailor their VM configurations based on specific performance and compatibility requirements.


**Azure Spot Discount:**

![Azure Spot Discount](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/738brag0x0ugwidhhxac.png)



Azure Spot Discount refers to the pricing model offered by Microsoft Azure for utilizing spare or excess capacity in its data centers. Azure Spot VMs (Virtual Machines) provide access to unused capacity at a significantly lower cost compared to regular on-demand VMs. However, these Spot VMs are subject to interruptions, as Azure may reclaim the capacity if needed. The pricing for Azure Spot VMs can vary based on the current supply and demand for resources.

Azure Spot Discount is significant for workloads that are fault-tolerant and can handle interruptions. Organizations can leverage this pricing model to achieve cost savings for non-critical, scalable, or batch processing workloads. By using Azure Spot VMs, users can access cloud resources at a reduced cost while understanding and accommodating the possibility of interruptions.

**Usage Scenario:**
Consider a data analytics workload that involves processing a large dataset periodically. This workload is designed to handle interruptions gracefully and can be distributed across multiple instances. By utilizing Azure Spot VMs, the organization can significantly reduce the costs associated with data processing, making it a cost-effective solution for workloads that don't require continuous, uninterrupted operation.

**Hibernation of VM:**

Hibernation of VM (Virtual Machine) in Azure refers to a state where the VM's current state, including memory contents and running processes, is saved to disk before shutting down. This allows the VM to be quickly resumed from the exact point where it was hibernated, reducing the time required to restart the VM compared to a cold start. Hibernation is a power-saving feature that retains the VM's state while consuming minimal resources during the hibernated state.

![Azure Spot Discount](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/738brag0x0ugwidhhxac.png)

Hibernation is significant for scenarios where VMs need to be temporarily stopped or paused without losing the current state. It is useful for conserving resources and reducing costs when the VM is not actively in use but needs to be quickly resumed when required.


### Size of a VM:

**Definition:**
The size of a Virtual Machine (VM) in Azure refers to the specific configuration and capacity allocated to the virtualized computing resources. In Azure, VM sizes encompass various combinations of CPU, memory, storage, and network capacity, providing users with flexibility to choose the appropriate configuration based on their workload requirements. Each VM size is designed to meet different performance levels, accommodating diverse use cases from basic computing to high-performance computing (HPC) and specialized workloads.


![size of a vm](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/35kk8e9c9gjwobbymi1p.png)



**Significance:**
The size of a VM is crucial as it determines the computational power, memory capacity, and storage throughput available to the virtualized environment. Selecting the right VM size is essential to ensure optimal performance, cost-efficiency, and resource utilization for the specific workload or application running on the VM.

**Usage Scenario:**
Consider an e-commerce website experiencing varying traffic throughout the day. During peak hours, a larger VM size with more CPU and memory resources might be required to handle increased user interactions and transactions efficiently. During off-peak hours, a smaller VM size can be chosen to conserve costs while still meeting the lower demand. Azure provides a range of VM sizes, such as Standard_D2s_v3 or Standard_DS1_v2, allowing users to tailor their virtualized environment to the demands of their applications.

### Setting up the Administrator Account:


![Setting up the Administrator Account](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c1699fb4lsu8bxm37z5q.png)



Setting up the administrator account in the context of Azure refers to the process of configuring the initial user account with administrative privileges when creating a Virtual Machine (VM) or other Azure resources. The administrator account holds elevated permissions to manage, configure, and control the Azure resources within a subscription or resource group.


### Inbound Port Rules:


![Inbound Port Rules](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fzib9766y3e7l9tkdkhc.png)


**Public Inbound Ports:**
- **Definition:** Public inbound ports refer to the specific network ports on a Virtual Machine (VM) or an Azure resource that are accessible from the internet. These ports allow external communication, enabling services hosted on the VM to be reached from the public network.


![Public Inbound Ports](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/84g02ne99no3iet7bdcx.png)


- **Significance:** Configuring public inbound ports is essential when hosting services or applications that need to be accessed from the internet. These ports act as entry points for incoming traffic, facilitating communication between the Azure resource and external clients.

**HTTPS (Hypertext Transfer Protocol Secure):**
- **Definition:** HTTPS is a secure communication protocol over a computer network, commonly used for secure data transmission over the internet. In the context of inbound port rules, it represents port 443, which is dedicated to encrypted HTTP communication.


![Hypertext Transfer Protocol Secure](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kf8igcr2t9fcswu9aw3r.png)


- **Significance:** Enabling HTTPS ensures secure and encrypted communication between clients and the hosted services, adding a layer of data protection and integrity.

**HTTP (Hypertext Transfer Protocol):**
- **Definition:** HTTP is the foundation of data communication on the World Wide Web. In terms of inbound port rules, it corresponds to port 80, facilitating unencrypted communication between clients and the Azure resource.

![Hypertext Transfer Protocol](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kf8igcr2t9fcswu9aw3r.png)

- **Significance:** HTTP is crucial for hosting web services and websites that do not require the added security of HTTPS. It allows the exchange of data between clients and the Azure resource over a standard, unencrypted connection.

**RDP (Remote Desktop Protocol):**
- **Definition:** RDP is a proprietary protocol developed by Microsoft, providing a user with a graphical interface to connect to another computer over a network connection. In the context of inbound port rules, it corresponds to port 3389.

![Remote Desktop Protocol](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kf8igcr2t9fcswu9aw3r.png)
- **Significance:** Enabling RDP allows remote desktop access to the VM, enabling users to connect to the graphical user interface of the Windows-based VM. This is valuable for administrative tasks and managing the VM remotely.

**Configuration:**
- In Azure, configuring inbound port rules involves specifying which ports should be open to incoming traffic.
- Rules can be defined based on the service requirements, such as allowing traffic on ports 80 and 443 for web services or opening port 3389 for RDP access.

**Security Considerations:**
- While opening inbound ports is necessary for certain services, it's crucial to implement proper security measures, including Network Security Groups (NSGs) and firewalls, to control and secure incoming traffic effectively.

### VM Tab

![VM Tab](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ci92twftwgdz7z78pg4s.png)

This is it for today, rest will cover tomorrow.............Thanks for reading the blog.