Create a Windows virtual machine in the Azure portal
Faraaz Atta
Enabling technology leaders and business owners to achieve digital transformation success by providing them with expert guidance and digital readiness solutions.
Let's create an Azure Virtual Machine (Windows).
Azure virtual machines are one of several types of?on-demand, scalable computing resources?that Azure offers. Typically, you choose a virtual machine when you need more control over the computing environment than the other choices offer. You will learn about what you should consider before you create a virtual machine, how you make it, how you manage it, and how to attach an additional data disk.
In this article
An Azure virtual machine gives you the flexibility of virtualization without buying and maintaining the physical hardware that runs it. However, you still need to maintain the virtual machine by performing tasks, such as configuring, patching, and installing the software that runs on it.
What do you need to know before creating a virtual machine?
These aspects of a virtual machine are important to think about before you start:
Create an Azure virtual machine
Azure virtual machines (VMs) can be created through the Azure portal. This method provides a browser-based user interface to create VMs and their associated resources. This quickstart shows you how to use the Azure portal to deploy a virtual machine (VM) in Azure that runs Windows Server 2022. To see your VM in action, you then RDP to the VM.
If you don't have an Azure subscription, create a?free account?before you begin.
Step#1 Sign in to Azure
Sign in to the Azure portal at?https://portal.azure.com
Step#2 Select Azure virtual machine
Step#3 Project Details
Under?project details, select your subscription and resource group if you do not have an existing resource group click on Create new and create a new resource group first (An Azure subscription and a resource group are compulsory).
Step#4 Instance Details
Under?Instance details, enter?VM1?for the?Virtual machine name?and choose the required Image?(I am using Windows Server 2022 Datacenter - Gen 2). Choose a specific region and size of resources (In my case I am using 4 virtual CPUs and 16 GiB memory), and leave the other defaults.
Step#5 Provide Administrative Details
Under?the Administrator account, provide a username, such as?azureuser?and a password. The password must be at least 12 characters long and meet the?defined complexity requirements.
Under?Inbound port rules, choose?Allow selected ports?and then select?RDP (3389) (for a remote session)?and?HTTP (80)?(for web access) from the drop-down.
After Step#5 you can leave the remaining defaults and then select the?Review + create?button at the bottom of the page. After validation runs, select the?Create?button at the bottom of the page to create a Virtual Machine.
To configure custom advanced options follow the next steps.
Step#6 Attach OS Disk
Go to the Disks menu to attach OS Disk first. Under?the OS disk select an OS disk type that best suits your requirements, you can also check the Delete with VM option to delete this disk whenever you want to delete this VM.
A temporary disk will also be attached to this VM to store additional data but data in this disk will be lost if you restart or shut down the VM. For permanent data storage, you need to create a separate Data Disk.
Step#7 Create and attach a new Data disk
Under?the Data disks for VM1 click on Create and attach a new disk.
After clicking on Create and attach a new disk this window will open, set a name for the Data disk and select your required disk size and leave the other defaults.
A new Data disk will be created and get attached to your virtual machine.
Step#8 Create a virtual network
In the networking section, you can configure network connectivity for your virtual machine.
领英推荐
A Virtual network will be created by default but you can customize the Virtual network and subnet mask according to your requirements. Leave the other settings default.
In my case, I named the virtual network as MyVnet and selected the address range or network id 20.0.0.0/16. I have attached this virtual machine to Subnet 1 20.0.1.0/24 an IP address from this range will be assigned to this virtual machine.
Step#9 Set Management, Monitoring, Advanced and tags options
In the management section, you can configure management options or you can leave them default. Management options are additional settings like Auto-shutdown and Azure AD login.
In the monitoring section, you can configure monitoring options as per your requirements or leave them default. In monitoring options, you can set Alerts for your virtual machine and other Diagnostics settings.
In the Advanced section, you can configure advanced settings according to your requirements or leave them default. For example, if you want to install IIS (webserver) with VM installation you will use the Extensions option. If you're going to install VM applications during VM deployment you can use the VM applications option.
You can set some tags to your virtual machine and other resources associated with the VM for recognition in the Tags section.
Step#10 Validation, Review + create
Leave the remaining defaults and then select the?Review + create?button at the bottom of the page. After validation runs, select the?Create?button at the bottom of the page. At this stage, if you successfully received the Validation passed notification you can check an overview of all your settings and configuration of your virtual machine. If something is missing you can go back using the previous button or click on a specific section to edit settings.
Step#11 Go to resource to find and connect the virtual machine.
After the successful deployment of the virtual machine, you will receive a Deployment succeeded notification. To access the VM you can click on Go to resource or you can find it in the Virtual Machines option and also in your Resource group.
Connect to the virtual machine
Step#12 Connect to the virtual machine
After opening your virtual machine you will see a Connect option in the navigation pane. Create a remote desktop connection to the virtual machine. These directions tell you how to connect to your VM from a Windows computer. On a Mac, you need an RDP client such as this?Remote Desktop Client?from the Mac App Store.
On the overview page for your virtual machine, select Connect?>?RDP.
In the?Connect with RDP?tab, keep the default options to connect by IP address, over port 3389, and click?Download RDP file.
Open the downloaded RDP file and click?Connect?when prompted.
In the?Windows Security?window, select?More choices?and then?Use a different account. Type the username as?localhost\username, enter the password you created for the virtual machine, and then click?OK.
You may receive a certificate warning during the sign-in process. Click?Yes?or?Continue?to create the connection.
Finally, a connection will be established successfully.
Create and attach a new data disk
I have attached a separate disk to store data but in the previous screenshot of the virtual machine Windows explorer, you can see the disk is not listed. We have to format the disk first, to do this we have to access disk management. We can access disk management by simply searching disk management in the Windows search bar.
Right-click on the unallocated disk and click on New Simple Volume.
Write the disk name in the Volume label e.g: Data Disk and follow the next steps to format the disk.
You can access the data disk now.
I hope you liked this tutorial, do not forget to share your feedback and also share this Article with your connections who might be interested in it.
Sales Coordinator at Arabian International Company | AIC Translift | Heavy Equipment |
1 年Is there any possibilites to create virtual machine without adding credit or debit card?