Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 231085

Re: Migrating vmnics to Cisco 1000v with portgroup (nearly there!)

$
0
0

I managed to solve this using:

 

$config = New-Object VMware.Vim.HostNetworkConfig 
$config.proxySwitch = New-Object VMware.Vim.HostProxySwitchConfig[] (1) 
$config.proxySwitch[0] = New-Object VMware.Vim.HostProxySwitchConfig 
$config.proxySwitch[0].changeOperation = "edit" 
$config.proxySwitch[0].uuid = $1000vObject.key 
$config.proxySwitch[0].spec = New-Object VMware.Vim.HostProxySwitchSpec 
$config.proxySwitch[0].spec.backing = New-Object VMware.Vim.DistributedVirtualSwitchHostMemberPnicBacking 
$config.proxySwitch[0].spec.backing.pnicSpec = New-Object VMware.Vim.DistributedVirtualSwitchHostMemberPnicSpec[] (1) 
$config.proxySwitch[0].spec.backing.pnicSpec[0] = New-Object VMware.Vim.DistributedVirtualSwitchHostMemberPnicSpec 
$config.proxySwitch[0].spec.backing.pnicSpec[0].pnicDevice = "vmnic0" 
$config.proxySwitch[0].spec.backing.pnicSpec[0].uplinkPortgroupKey = $uplinkObj.key  

$vmhostRef = ($vmhost.MoRef.value).split('-')[1]
$_this = Get-View -Id "HostNetworkSystem-networkSystem-$vmhostRef" 
$_this.UpdateNetworkConfig($config, "modify")

Viewing all articles
Browse latest Browse all 231085

Trending Articles



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