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

Re: Migrate Vmkernel from DVS to Standard Switch and vice versa

$
0
0

Ok, I have information from Onyx on how to do it in the gui and I think I can reproduce in a script, but what I am unsure of is how to gather the required information to pass

 

I can't seem to find how to get the property for HostNetworkSystem which would be vswitch0

 

 

# ------- AddPortGroup -------

$portgrp = New-Object VMware.Vim.HostPortGroupSpec

$portgrp.name = "VMotion"

$portgrp.vlanId = 3721

$portgrp.vswitchName = "vSwitch0"

$portgrp.policy = New-Object VMware.Vim.HostNetworkPolicy

$_this = Get-View -Id 'HostNetworkSystem-networkSystem-371'

$_this.AddPortGroup($portgrp)

  

  

# ------- UpdateVirtualNic -------

$nic = New-Object VMware.Vim.HostVirtualNicSpec

$nic.portgroup = "VMotion"

$_this = Get-View -Id 'HostNetworkSystem-networkSystem-371'

$_this.UpdateVirtualNic("vmk1", $nic)


Viewing all articles
Browse latest Browse all 244528

Trending Articles



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