VMware Cloud Community
esxi1979
Expert
Expert
Jump to solution

vmk port group for nfs

Create a new vmk port on a vSwitch, add it to a specific port group and enable for vMotion. If a port group matching the specified name does not exist then one will be created.

1

New-VMHostNetworkAdapter -VMHost <host> -PortGroup <PG Name> -VirtualSwitch <vswitch> -IP <IP> -SubnetMask <Mask> -VMotionEnabled:$true -Confirm:$false

You can enable or disable a vmk for Management traffic, vMotion or Fault Tolerance. All are disabled by default and all of them can be enabled when the vmk is created, similar to how vMotion was enabled in the example above. To disable just change $true to $false.

1

2

3

Get-VMHostNetworkAdapter -VMHost <host> -name <vmk> | Set-VMHostNetworkAdapter -ManagementTrafficEnabled:$true -confirm:$false

Get-VMHostNetworkAdapter -VMHost <host> -name <vmk> | Set-VMHostNetworkAdapter -FaultToleranceLoggingEnabled:$true -confirm:$false

Get-VMHostNetworkAdapter -VMHost <host> -name <vmk> | Set-VMHostNetworkAdapter -VMotionEnabled:$true -confirm:$false

Change the IP addres of a vmk

1

Get-VMHostNetworkAdapter -VMHost <host> -name <vmk> | Set-VMHostNetworkAdapter -IP <ip> -confirm:$false

And remove a vmk

1

Get-VMHostNetworkAdapter -VMHost <host> -name <vmk> | Remove-VMHostNetworkAdapter -confirm:$false

===

pastedImage_0.png

I am trying to create above

Nowhere i am getting option to sepcify the vlan id.. Also in my case nothing will be enable ie no ft/no vmtion/no mgmt on this vmk

Please suggest

Reply
0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

When you have the portgroupname, you can use the Set-VirtualPortgroup cmdlet to set/change the VlanID.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

Reply
0 Kudos
3 Replies
LucD
Leadership
Leadership
Jump to solution

When you have the portgroupname, you can use the Set-VirtualPortgroup cmdlet to set/change the VlanID.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
esxi1979
Expert
Expert
Jump to solution

looks like setting it up is not an option in New-VirtualPortGroup 

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

The New-VirtualPortgroup cmdlet has a VlanId parameter.

Not sure what you mean ?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos