A virtual machine (VM) is an individual operating system that works like a physical computer but is created with software that builds an abstraction layer over existing physical hardware. Microsoft Azure gives organizations the ability to create VMs through their Azure Infrastructure as a Service (IaaS) platform. There several different ways IT shops can leverage Azure IaaS to create new VM instances as needed to support business goals.
All paths to creating an Azure VM start with logging into the Azure portal. The browser-based interface gives users the ability to quickly get Azure VMs up and running along with any necessary resources.
Create a Virtual Machine in Azure for Windows
- Type the words “virtual machine” into the search bar in the Azure portal.
- Look for Services, then select Virtual machines.
- Click the Add button on the Virtual machines page.
- Look for the Basics tab, then look under project details and confirm that it reflects the right subscription. Change the option if it is not correct. Once you have confirmed everything is correct, select Create new to start building a new Azure VM instance.
- Type “myVM” by Virtual machine name in the Instance details panel. Make sure the Region reflects the correct geographical location. For the image, select “Windows Server 2019 Datacenter.” The rest of the details should be left on their default selections.
- Move to the Administrator account panel. Enter a unique username and password by the associated textboxes. Users must enter a password that is a minimum of 12 characters and complies with Microsoft’s Azure VM complexity requirements.
- In the Inbound port rules panel, select the Allow selected ports option, then choose (HTTP 80) DP (3389) from the available dropdown.
- The rest of the options on the screen can be left at their defaults. Select the Review + create button at the bottom of the page after confirming the rest of the details are correct.
Create a Virtual Machine in Azure for Linux
Microsoft Azure IaaS provides users with the option of creating VMs using the Linux operating system.
- Type the words “virtual machine” into the search bar for the Azure portal.
- Select Virtual machines under the Services panel.
- Once the Virtual machines page appears, select Add. That should prompt the appearance of the Create a virtual machine page.
- After locating the Basics tab, look under project details to verify that it reflects the correct subscription. Select the option to Create new resource group. Type the words “myResourceGroup” as a name.
- Move on to the instance details panel. Type “myVm” in the textbox labeled “Virtual machine name.” Use the Region dropdown to select the correct geographical location for the Azure VM, then use the Image dropdown to choose the option “Ubuntu 18.04 LTS.”
- Leave the other default details on the page in place. Move on to Administrator account and select the option SSH public key.
- Enter the words “azure user” in the Username textbox.
- Leave the dropdown for SSH public key source at the default selection of Generate new key pair.
- Type the words “myKey” into the Key pair name textbox.
- Under the Inbound port rules panel, select the option to Allow selected ports. In the Select Inbound ports dropdown, select (HTTP 80) SSH (22).
- Make no changes to the rest of the defaults on the page. Review the entered details, then click Review + create if they are correct.
- The Generate new key pair window should appear. Select the option to Download private key and create resource.
- Once the deployment completes, select Go to resource. That should prompt the appearance of a page for the new Azure VM.
- Copy the public IP address to your clipboard.
Create a Virtual Machine in Azure From a VHD
Microsoft Azure provides the option to create Azure VMs using a VHD. Keep in mind that using a specialized disk to create a new Azure VM will retain the name of the original computer. Make sure the VM contains all computer-specific information needed to run applications. The number of concurrent deployments should be limited to 20 VMs from one VHD.
The first step in using a VHD to create VMs is to copy the disk to have the original VHD in case something goes wrong.
- Select All services from the Azure portal.
- Enter “disks” into the search box, then choose Disks to view the list of available disks.
- Select the disk to use. That should prompt the appearance of its specific Disk page.
- Go to the top menu and select Create snapshot.
- Type in a name for the snapshot, then choose a Resource group. Use an existing resource group or create a new one.
- Look for Account type. Select either Standard (HDD) or Premium (SSD) storage.
- Select Create to build the snapshot.
- Navigate to the left menu and select Managed Disks from the available list.
- Choose the Create option, then enter a Name for the disk.
- Select a Resource group for the disk by using an existing one or creating a new one.
- Choose Standard (HDD) or Premium (HDD) storage.
- Look at Source type and make sure that Snapshot is the selected option.
- Select the correct snapshot from the Source snapshot dropdown.
- Select Create to create the managed disk VHD.
Next, you can create the Azure VM from the VHD.
- Select All services from the Azure portal.
- Enter “disks” into the search box, then choose Disks to view the list of available disks.
- Select the disk to use. That should prompt the appearance of its specific Disk page.
- Select the disk to use for creating the Azure VM.
- On the Overview page, make sure the DISK STATE is shown as Unattached.
- Go to the menu at the top of the page and select Create VM.
- Enter a new Virtual machine name on the Basics page for the new Azure VM, then choose a Resource group.
- Pick a VM size row, then choose Select.
- On the Networking page, create new resources or use an existing Virtual network and Network security group.
- Change relevant monitoring options on the Management page.
- Add any necessary extensions on the Guest config page.
- Select Review + create. If the Azure VM passes validation, select Create to begin deployment.
How to Connect to a Virtual Machine in Azure
The following instructions apply to connecting to an Azure VM from a Windows computer. Mac users will need to download an RDP client from the Mac App Store.
- Select the Connect button from the Azure VM’s overview page.
- Leave all default options alone on the Connect to virtual machine page.
- Click Download RDP file.
- Select More choices in the Windows Security window, then choose Use a different account. Enter localhost\username and the password created for the Azure VM. Select OK, then click Yes or Continue to create the connection.
Reap the Benefits of Azure VMs with Azure Managed Services
Internet eBusiness Solutions (IES) partners with organizations to help them with the complexities of managing Microsoft Azure cloud solutions. Learn more about how we can help by setting up a consultation.