create VM with virtual network settings

remoteUser1 101 Reputation points
2020-09-21T06:11:53.647+00:00

Hello,
I followed the link below to create VM to join azure domain.
https://learn.microsoft.com/en-us/azure/active-directory-domain-services/join-windows-vm

I have two questions when creating VM.

  1. the documentation said: Your VM must connect to an Azure virtual network subnet that can communicate with the subnet your managed domain is deployed into. my azure virtual network where domain runs is in the sbunet 10.0.0.0/24. I clicked manage network subnet trying to create a new subnet such as 10.0.2.0/24, it complains: Your subnet is not contained within the address space for this virtual network: 10.0.0.0/24. eventually, I have to use the 10.0.0.0/24, which is the same subnet as azure virtual network.
    but the documentation said Don't deploy your VM in the same subnet as your managed domain.

2) I have created host pool and application group before, how can I apply them to this new VM?

thanks

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
6,979 questions
Azure Virtual Network
Azure Virtual Network
An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
2,088 questions
{count} votes

Accepted answer
  1. GitaraniSharma-MSFT 46,261 Reputation points Microsoft Employee
    2020-09-21T15:14:00.763+00:00

    @remoteUser1 , In your case, please refer to steps 8,9,10 & 11 of this article.

    1) Since, your existing virtual network is created with a single address space of 10.0.0.0/24, which is used by the default subnet, you need to add an additional IP address range to the virtual network. The size of this address range and the actual IP address range to use depends on other network resources already deployed. The IP address range shouldn't overlap with any existing address ranges in your Azure or on-premises environment. Make sure that you size the IP address range large enough for the number of VMs you expect to deploy into the subnet.

    So basically, you would need to add a new address range to your Virtual Network address spaces and create a subnet out of that range.
    Please refer : https://learn.microsoft.com/en-us/azure/virtual-network/manage-virtual-network#add-or-remove-an-address-range

    2) How to add a VM to a host pool:
    https://learn.microsoft.com/en-us/azure/virtual-desktop/expand-existing-host-pool#add-virtual-machines-with-the-azure-portal

    How to add Application security group to your VM:
    https://learn.microsoft.com/en-us/azure/virtual-network/tutorial-filter-network-traffic#associate-network-interfaces-to-an-asg

    Kindly let us know if the above helps or you need further assistance on this issue.


    Please don’t forget to close the thread by clicking "Accept the answer" wherever the information provided helps you, as this can be beneficial to other community members.


1 additional answer

Sort by: Most helpful
  1. Sam Cogan 10,077 Reputation points MVP
    2020-09-21T08:44:58.11+00:00

    By the sounds of the error, your virtual network has been created as 10.0.0.0/24 with a single subnet filling that whole address space, so you cannot create another subnet. You will need to expand your virtual network size to add more space, to allow for a second subnet.

    0 comments No comments