Quantcast
Channel: Virtual Machine Manager – General forum
Viewing all articles
Browse latest Browse all 2770

Static IP assignment to Linux VM

$
0
0

Hi,

I am able to assign Static IP to Win 2012 R2 VM from Static IP pool but same doesn't work for Linux VMs.

Below is the powershell script that I am using to set the static IP from Static IP pool.

Regards,

Umesh

$vm

= Get-VM-ID'{4}'


$adapt

= Get-SCVirtualNetworkAdapter-VM$vm

$net

= Get-SCVMNetwork-ID'{5}'


$subnet

= Get-SCVMSubnet-Name'{6}'|Where{{$_.VMNetwork.ID -eq '{7}'}}


Set-SCVirtualNetworkAdapter

-VirtualNetworkAdapter$adapt[0]-IPv4AddressTypeStatic-IPv6AddressTypeDynamic-VMSubnet$subnet-VMNetwork$net-IPv4Addresses'{9}'


Viewing all articles
Browse latest Browse all 2770

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>