PfSense + Hyper-V + VLANs + Reboot = No
-
I've been running pfSense with the VLANs configured for about 2 years and it works well - except for one issue.
When I reboot my VM (not the host, just the pfSense VM,) it drops the VLANs that are connected using a shared NIC.
I have about 12 VLANs and 8 NICs, so some of them have dedicated NICs (and vSwitches,) but I needed to consolidate some, so some are on a Trunked vSwitch which shares 3-4 VLANs. This is the one that stops working - all the dedicated vSwitches keep working.
The solution is easy, I simply connect to the VM Host and run the following Powershell cmd:
Get-VMNetworkAdapter -vmname pfsenserouter | ? SwitchName -eq "TrunkedVLANs" | Set-VMNetworkAdaptervlan -Trunk -AllowedVlanIdList "1-1000" -NativeVlanId 1
As soon as I do this, it comes back online. But, why?
It seems obvious that it's a Hyper-V specific issue, but why does a reboot require me to make a host level change - or more importantly just re-issue the same settings?
Does pfSense (root OS) need a refresh, or is Hyper-V dropping the setting on VM reboot?
I'm thinking it's an MS bug, but hoping someone else has encountered this and found a solution.
-
@emcstravick The vSwitch is not trunked, the vNIC in pfSense is, at least this is how I understand it.
Take a look here, it has worked for me without any problems (I use NativeVlanId 0).