Introduction to Compute Resources
In Microsoft Azure's cloud platform, compute resources are the fundamental building blocks that provide the processing power for your applications and workloads. These resources are provided to you in varying ways, including "serverless" where your request is distributed across the server network and virtual machines (VMs), which are singular instances of compute power with an operating system dedicated to your one task.
Azure Compute Shapes
In Azure, different compute resources with varying characteristics are called "Sizes", sometimes referred to as "shapes" else where. Each shape provides different combinations of CPU/GPU, memory, storage, and networking capacity to match your workload requirements.
Understanding Virtual Machines
VMs are created by running a hypervisor (virtualiser) on a bare metal servers (the whole compute power in the hardware). This technology splits the physical server into smaller, isolated components that function as independent computers.
How Virtual Machines Work
The hypervisor manages and allocates physical resources from the bare metal host to create multiple VMs. While the underlying hardware is physically shared between different tenant workloads, each VM is virtually isolated from others, providing security and performance boundaries.
This approach allows you to access powerful computing resources without needing to purchase and maintain entire physical servers, making it a more cost-effective solution when you don't require the full capacity of a bare metal server.
What You Get with a VM Shape
When you select a specific VM shape in Azure, you receive a predefined combination of resources:
Included with Every VM Shape
CPU and/or GPU: Processing power according to the selected shape specifications
Memory (RAM): System memory as specified by the chosen VM size
Important Note
VM shapes only provide compute and memory resources. Storage, networking, and operating systems must be provisioned and connected separately during the VM creation process.
Recipe for VM Creation
In subsequent sections we'll run through creating a VM within the Azure platform UI. However, here we'll go over the general flow for creating a VM. Creating a virtual machine requires several components working together. Here's what you need to provision:
Select Compute Shape
Choose the VM size that provides the right balance of CPU, memory, and other resources for your workload requirements.
Configure Networking
Select a Virtual Network and subnet where your VM will be deployed, establishing its network connectivity and security boundaries. - This part may sound daunting if you are not tech savy, but for standard uses in Azure the default settings are secrure and fit for purpose.
Attach Storage
Provision a managed disk or storage account that will serve as the boot volume for the operating system and provide persistent storage. - Azure VMs come with their own disk space for data and can be attached to Azure blob storage.
Choose an Image
Select an operating system image that will be deployed to your VM, which can include pre-installed software and configurations.
Configure Authentication
Set up SSH keys (for Linux VMs) or administrator credentials (for Windows VMs) to enable secure access to your virtual machine.
Understanding VM Images
VM images are essential templates that define what software and configuration your virtual machine will have when it starts up.
What are VM Images?
Images are complete descriptions of a virtual hard drive for VM instances. They primarily contain the operating system but can also include additional software, configurations, and packages that will be available immediately when the VM starts.
Custom Image Workflow
Azure enables you to create and reuse custom images for consistent deployments:
Start with Base Image
Begin by deploying a VM using a base image provided by Microsoft (such as Ubuntu, Windows Server, or CentOS).
Customise Your VM
Install your required software, apply configurations, security settings, and customize the environment to meet your specific needs.
Create Custom Image
Capture your customised VM as a new image, preserving all your installations and configurations for future use.
Deploy Consistent Instances
Use your custom image to create multiple VM instances with identical configurations, but differing compute, scaling as needed in a reporducable manner.
The Result
After completing the VM provisioning process with all necessary components, you'll have access to what is effectively your own remote workstation or server. This VM will meet whatever hardware and software requirements you've specified, providing a powerful and flexible computing environment in the cloud.