|
| 1 | +--- |
| 2 | +title: Create zonal VMs with the Azure portal |
| 3 | +description: Create VMs in an availability zone with the Azure portal |
| 4 | +author: mimckitt |
| 5 | +ms.service: virtual-machines |
| 6 | +ms.topic: how-to |
| 7 | +ms.date: 03/14/2022 |
| 8 | +ms.author: mimckitt |
| 9 | +ms.reviewer: cynthn |
| 10 | +ms.custom: |
| 11 | +--- |
| 12 | + |
| 13 | +# Create virtual machines in an availability zone using the Azure portal |
| 14 | + |
| 15 | +**Applies to:** :heavy_check_mark: Linux VMs :heavy_check_mark: Windows VMs |
| 16 | + |
| 17 | +This article steps through using the Azure portal to create highly resilient virtual machines in [availability zones](../availability-zones/az-overview.md). Azure availability zones are physically separate locations within each Azure region that are tolerant to local failures. Use availability zones to protect your applications and data against unlikely datacenter failures. |
| 18 | + |
| 19 | +To use availability zones, create your virtual machines in a [supported Azure region](../availability-zones/az-region.md). |
| 20 | + |
| 21 | +Some users will now see the option to create VMs in multiple zones. If you see the following message, please use the **Preview** tab below. |
| 22 | + |
| 23 | +:::image type="content" source="media/create-portal-availability-zone/preview.png" alt-text="Screenshot showing that you have the option to create virtual machines in multiple availability zones."::: |
| 24 | + |
| 25 | +### [Standard](#tab/standard) |
| 26 | + |
| 27 | +1. Sign in to the Azure portal at https://portal.azure.com. |
| 28 | + |
| 29 | +1. Click **Create a resource** > **Compute** > **Virtual machine**. |
| 30 | + |
| 31 | +3. Enter the virtual machine information. The user name and password or SSH key is used to sign in to the virtual machine. |
| 32 | + |
| 33 | +4. Choose a region such as East US 2 that supports availability zones. |
| 34 | + |
| 35 | +5. Under **Availability options**, select **Availability zone** dropdown. |
| 36 | + |
| 37 | +1. Under **Availability zone**, select a zone from the drop-down list. |
| 38 | + |
| 39 | +4. Choose a size for the VM. Select a recommended size, or filter based on features. Confirm the size is available in the zone you want to use. |
| 40 | + |
| 41 | +6. Finish filling in the information for your VM. When you are done, select **Review + create**. |
| 42 | + |
| 43 | +7. Once the information is verified, select **Create**. |
| 44 | + |
| 45 | +1. After the VM is created, you can see the availability zone listed in the **Essentials section** on the page for the VM. |
| 46 | + |
| 47 | + |
| 48 | +### [Preview](#tab/preview) |
| 49 | + |
| 50 | +1. Sign in to the Azure portal at https://portal.azure.com. |
| 51 | + |
| 52 | +1. Click **Create a resource** > **Compute** > **Virtual machine**. |
| 53 | + |
| 54 | +1. In the **Virtual machines** page, select **Create** and then **Virtual machine**. The **Create a virtual machine** page opens. |
| 55 | + |
| 56 | +1. In the **Basics** tab, under **Project details**, make sure the correct subscription is selected and then choose a resource group or create a new one. |
| 57 | + |
| 58 | +1. Under **Instance details**, type a name for the **Virtual machine name**. |
| 59 | +1. For **Availability options**, leave the default of **Availability zone**. |
| 60 | +1. For **Availability zone**, the drop-down defaults to *Zone 1*. If you choose multiple zones, a new VM will be created in each zone. For example, if you select all three zones, then three VMs will be created. The VM names are the original name you entered, with **-1**, **-2**, and **-3** appended to the name based on number of zones selected. If you want, you can edit each of the default VM names. |
| 61 | + |
| 62 | + :::image type="content" source="media/zones/3-vm-names.png" alt-text="Screenshot showing that there are now 3 virtual machines that will be created."::: |
| 63 | + |
| 64 | +1. Complete the rest of the page as usual. If you want to create a load balancer, go to the **Networking** tab > **Load Balancing** > **Load balancing options**. You can choose either an Azure load balancer or an Application gateway. |
| 65 | + |
| 66 | + For a **Azure load balancer**: |
| 67 | + |
| 68 | + 1. You can select an existing load balancer or select **Create a load balancer**. |
| 69 | + 2. To create a new load balancer, for **Load balancer name** type a load balancer name. |
| 70 | + 3. Select the **Type** of load balancer, either Public or Internal. |
| 71 | + 4. Select the **Protocol**, either **TCP** or **UDP**. |
| 72 | + 5. You can leave the default **Port** and **Backend port**, or change them if needed. The backend port you select will be opened up on the Network Security Group (NSG) of the VM. |
| 73 | + 6. When you are done, select **Create**. |
| 74 | + |
| 75 | + For an **Application Gateway**: |
| 76 | + |
| 77 | + 1. Select either an existing application gateway or **Create an application gateway**. |
| 78 | + 2. To create a new gateway, type the name for the application gateway. The Application Gateway can load balance multiple applications. Consider naming the Application Gateway according to the workloads you wish to load balance, rather than specific to the virtual machine name. |
| 79 | + 3. In **Routing rule**, type a rule name. The rule name should describe the workload you are load balancing. |
| 80 | + 4. For HTTP load balancing, you can leave the defaults and then select **Create**. For HTTPS load balancing, you have two options: |
| 81 | + |
| 82 | + - Upload a certificate and add the password (application gateway will manage certificate storage). For certificate name, type a friendly name for the certificate. |
| 83 | + - Use a key vault (application gateway will pull a defined certificate from a defined key vault). Select your **Managed identity**, **Key Vault**, and **Certificate**. |
| 84 | + |
| 85 | + > [!IMPORTANT] |
| 86 | + > After the VMs and application gateway are deployed, log in to the VMs to ensure that either the application gateway certificate is uploaded onto the VMs or the domain name of the VM certificate matches with the domain name of the application gateway. |
| 87 | +
|
| 88 | + > [!NOTE] |
| 89 | + > A separate subnet will be defined for Application Gateway upon creation. For more information, see [Application Gateway infrastructure configuration](../application-gateway/configuration-infrastructure.md). |
| 90 | +
|
| 91 | +1. Leave the remaining defaults and then select the **Review + create** button at the bottom of the page. |
| 92 | + |
| 93 | +1. On the **Create a virtual machine** page, you can see the details about the VM you are about to create. When you are ready, select **Create**. |
| 94 | + |
| 95 | +1. If you are creating a Linux VM and the **Generate new key pair** window opens, select **Download private key and create resource**. Your key file will be download as **myKey.pem**. |
| 96 | + |
| 97 | +1. When the deployment is finished, select **Go to resource**. |
| 98 | +--- |
| 99 | + |
| 100 | + |
| 101 | +**Next steps** |
| 102 | + |
| 103 | +In this article, you learned how to create a VM in an availability zone. Learn more about [availability](availability.md) for Azure VMs. |
0 commit comments