Archives

kienhG

Apply configuration to virtual machine each time it starts up

Hi people! I need your experience.

I have a VM that I need to apply a configuration to in case it restarts. The problem is because HyperV Server 2012 R2 overwrites the configuration of my vNICs and I lose certain configurations.
These are as follows:
Get-VMNetworkAdapter -VMName firewall01 | Where-Object -Property MacAddress -eq "00155D08CD00" | Set-VMNetworkAdapterVlan -Trunk -AllowedVlanIdList 0-600 -NativeVlanId 0

and another vNIC:

Get-VMNetworkAdapter -VMName firewall01 | Where-Object -Property MacAddress -eq "00155D08CD01" | Set-VMNetworkAdapterVlan -Trunk -AllowedVlanIdList 0-600 -NativeVlanId 0

That’s why I’m looking for some way to apply these settings to my VM in case it restarts, otherwise I lose network connectivity. 
If there is a better way to do this, I greatly appreciate your advice.

Thank you very much for your help and experience.

Best regards

Gabriel

Read full post . . . .

Go Que Newsroom

Categories