Aug 08, 2018 19:39
Set-VMNetworkAdapterVlan doesn't save (loses) settings for a VM adapter when used in trunk mode (with -trunk switch) upon shutdown or restart. If you give again "Set-VMNetworkAdapterVlan -VMName vmname -trunk -allowedvlanidlist 3 -nativevlanid 0" after the guest is started then it works again but until the next restart only.
The only workaround is not to do the network adapter sharing in the guest. Add one more network adapter to the VM and assign it to VLAN ID=3 and configure it in the guest VM.