I have to test the behavior of a SharePoint migration tool installed on my Azure VM when Internet connection is lost. I access to this VM by RDP. How can I cut off Internet connection of my VM and restore it later ?
Thanks in advance.
I have to test the behavior of a SharePoint migration tool installed on my Azure VM when Internet connection is lost. I access to this VM by RDP. How can I cut off Internet connection of my VM and restore it later ?
Thanks in advance.
Create a deny internet outgoing rule on the network security group and attach it to the VM network adapter.
You may have to create allow rules for Azure storage for outbound traffic for VM agent to work.
I second the suggestions posted by 4c74356b41, you could also disable the Network Adapter and then reset the Network adapter to restore the connection. If you wish to take this approach checkout these steps:
For VMs deployed in Resource group model
Delete the unavailable NICs After you can remote desktop to the machine, you must delete the old NICs to avoid the potential problem:
Ref: https://learn.microsoft.com/en-us/azure/virtual-machines/windows/reset-network-interface