Virtual Network

Virtual Network

Create a virtual network using the Azure portal

This quickstart guides you through creating a virtual network using the Azure portal. You'll then set up two virtual machines (VMs) within the network, deploy Azure Bastion for secure internet-based VM access, and enable private communication between the VMs.

Prerequisites: - An active Azure subscription. If you don't have one, you can create a free account.

Sign in to Azure: - Use your Azure account to access the Azure portal.

Create a Virtual Network and Azure Bastion Host          
Follow these steps to set up a virtual network with a resource subnet, an Azure Bastion subnet, and a Bastion host:

1. In the Azure portal, search for and select Virtual networks.

2. On the Virtual Networks page, click + Create.

3. In the Basics tab of the Create Virtual Network page, enter or select the required details.

4. Click Next to proceed to the Security tab.

5. In the Azure Bastion section, enable Azure Bastion by selecting Enable Azure Bastion.

6. Enter or select the necessary information for Azure Bastion

7. click Next to the IP Addresses tab.

8. choose the default subnet in the address space box under Subnets.

9. In the Edit subnet window, provide the required information and click Save.

10. Select Review + Create at the bottom of the page. Once the validation is successful, click Create.

Create Virtual Machines          
Follow these steps to create two virtual machines, named vm-1 and vm-2, within the virtual network:

1. In the Azure portal, search for and select Virtual machines.

2. On the Virtual Machines page, click + Create, then select Azure virtual machine.

3. In the Basics tab of the Create a Virtual Machine page, enter or select the necessary details.

4. Move to the Networking tab and provide the required information.

5. Leave the remaining settings as defaults, and click Review + Create.

6. Review the settings, and select Create.

7. Once the first virtual machine is deployed, repeat these steps to create a second virtual machine with the same settings.

Connect to a Virtual Machine          
Follow these steps to connect to vm-1:

1. In the Azure portal, search for and select Virtual machines.

2. On the Virtual Machines page, choose vm-1.

3. In the Overview section of vm-1, click Connect.

4. On the Connect to Virtual Machine page, go to the Bastion tab.

5. Select Use Bastion.

6. Enter the username and password you set when creating the VM, then click Connect.


Create a virtual network using PowerShell

Use New-AzVirtualNetwork to create a virtual network.

Create a Virtual Network Using the Azure CLI

Use the az network vnet create command to create a virtual network.
Delete a Virtual Network          

You can only delete a virtual network if no resources are connected to it. If there are resources linked to any subnet within the virtual network, you must first remove those resources. The steps for deleting a resource depend on its type. To learn how to delete resources connected to subnets, refer to the documentation for each specific resource type you wish to remove. Here’s how to delete a virtual network:

Delete a Virtual Network Using the Azure Portal

1. In the search box at the top of the portal, type Virtual Networks and select it from the search results.

2. From the list of virtual networks, choose the one you want to delete.

3. Verify that there are no connected devices by selecting Connected devices under Settings. If any devices are connected, you must delete them before proceeding with the virtual network deletion. If there are no connected devices, go to the Overview tab.

4. Click Delete.

5. To confirm the deletion of the virtual network, select Yes.

Delete a virtual network using PowerShell

Use Remove-AzVirtualNetwork to delete a virtual network

Delete a virtual network using the Azure CLI

Use az network vnet delete to delete a virtual network.


要查看或添加评论,请登录

Ankit Ranjan (DevOps Engineer)的更多文章

  • What is Azure Pipelines?

    What is Azure Pipelines?

    Azure Pipelines Benefits of Azure Pipelines Azure Pipelines offers a fast, reliable, and secure way to automate the…

  • Installing Docker on Windows 11 using WSL 2: A Step-by-Step Guide

    Installing Docker on Windows 11 using WSL 2: A Step-by-Step Guide

    Docker has become a crucial tool for developers, enabling seamless and portable application deployment. Prerequisites…

  • Safeguard Your Azure Route Server with Azure DDoS Protection

    Safeguard Your Azure Route Server with Azure DDoS Protection

    This guide walks you through securing your Azure Route Server by integrating it with Azure DDoS Protection in a virtual…

  • Protect your public load balancer with Azure DDoS Protection

    Protect your public load balancer with Azure DDoS Protection

    Azure DDoS Protection provides advanced mitigation features like adaptive tuning, attack alert notifications, and…

  • Create a public load balancer with an IP-based backend

    Create a public load balancer with an IP-based backend

    This Edition will teach us how to create a public load balancer with an IP-based backend pool. Traditionally, an Azure…

  • Load Balancer and its Different Types

    Load Balancer and its Different Types

    Global Load Balancer The Azure Standard Load Balancer enables cross-region load balancing, providing geo-redundant high…

  • Inbound NAT Rule

    Inbound NAT Rule

    Inbound NAT rules enable connections to virtual machines (VMs) in an Azure virtual network using a public IP address…

  • Azure Availability Set

    Azure Availability Set

    As part of a high-availability deployment, virtual machines are typically organized into multiple availability sets to…

    8 条评论
  • Azure Load Balancer (Part 2)

    Azure Load Balancer (Part 2)

    What is Azure Front Door Azure Front Door helps you deliver content, files, apps, and APIs with better availability…

  • Azure Load Balancer (Part-1)

    Azure Load Balancer (Part-1)

    Load balancing involves the efficient distribution of incoming network traffic across multiple backend servers or…

社区洞察

其他会员也浏览了