Background: We had a SAS disk fail that was part of a RAID 10 array. Unfortunately, when it failed, it also kicked its mirrored pair in the SPAN offline as well, meaning the whole array was unrecoverable. We have backups, so no major problems there. We bought a couple of new disks, rebuilt the array and installed Hyper V Server from scratch ready to import the backed up VMS.
The server in question has two NICs. When I initially set up the server, I assigned an IP address to NIC 1, and, crucially, I also ran the command set-netadapter -name Nic1 -VlanID 100
since it's connected to a trunk port on the switch. I'm sure that this is where the problem originates, however, at this point everything was working fine.
I was able to connect Hyper V Manager using the IP address I'd assigned to NIC 1 and imported my first VM. Since this VM is is particularly bandwidth-heavy, I created a new external switch using NIC 2. This NIC is plugged into an untagged access port on the switch, and I didn't allow the management OS to use this virtual switch since I want it to be dedicated to the VM. Still no problem here - the new VM is spun up and I've got connectivity.
I then proceeded to create a new virtual switch using NIC 1. I checked the option for allowing the management OS to use this network adapter and clicked "OK". This is the point that I lost connectivity.
I have access to the physical server, and can use powershell to see the network adapters and run ipconfig /all
etc. The IP settings are correct as far as I can see, and the network adapters are showing as connected.
I'm sure this has something to do with the fact that I set the VlanID of the underlying network adapter before I created the virtual switch. However, I'm having a hard time getting my head around the powershell commands that I would need to undo this action and since this is a production machine, I'd rather not do this by trial and error.
I don't want to even touch NIC2 since it's connected to our most important VM and that is currently working fine.
Any help with this would be greatly appreciated.