I am trying to change the network security group in a VM, from azure portal. From azure portal and going to Networking, I can see the actual network security group ("mygroup1"). I want to change it to "mygroup2".
If I press the Network security group name I can navigate to the azure portal but I cannot see the way to change the actual Network security group from my VM to a new existing one.
EDIT: The VM is connected. I suspect to do this I also have to shut it down I guess.
Can anyone help?
CodePudding user response:
You cannot change the network security group in a VM, instead:
- You can associate a network security group to, or dissociate a network security group from a network interface. https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-network-interface#associate-or-dissociate-a-network-security-group
- In the search box at the top of the portal, enter network interfaces in the search box. When network interfaces appear in the search results, select it.
- Select the network interface in the list that you want to associate a network security group to, or dissociate a network security group from.
- Select Network security group under SETTINGS.
- Select Edit.
- Select Network security group and then select the network security group you want to associate to the network interface, or select None, to dissociate a network security group. Save
- You can Associate a network security group to, or dissociate a network security group from a subnet. https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-manage-subnet#change-subnet-settings
- Go to the Azure portal to view your virtual networks. Search for and select Virtual networks.
- Select the name of the virtual network containing the subnet you want to change.
- From Settings, select Subnets.
- In the list of subnets, select the subnet you want to change settings for.
- In the subnet page, change any of the following settings: Network security group
- Click Save