New-VMHostNetworkAdapter
This cmdlet creates a new HostVirtualNIC (Service Console or VMKernel) on the specified host. Creates a port group with a name specified by the PortGroup parameter on the virtual switch passed through the VirtualSwitch parameter. Adds either a Console NIC if ConsoleNIC is set, or a VMKernel NIC otherwise.
Syntax
[[-PortGroup] <String>]
[[-IP] <String>]
[[-SubnetMask] <String>]
[[-Mac] <String>]
[-AutomaticIPv6]
[-ConsoleNic]
[-FaultToleranceLoggingEnabled <Boolean>]
[-IPv6 <String[]>]
[-IPv6ThroughDhcp]
[-ManagementTrafficEnabled <Boolean>]
[-Mtu <Int32>]
[-PortId <String>]
[-Server <VIServer[]>]
[-VMHost <VMHost>]
[-VMotionEnabled <Boolean>]
[-VsanTrafficEnabled <Boolean>]
[CommonParameters]
Parameters
Required | Parameter Name | Type | Position | Features | Description |
---|---|---|---|---|---|
required |
|
VirtualSwitchBase | 2 |
|
Specifies the virtual switch to which you want to add the new network adapter. | optional |
|
String | 1 |
|
Specifies the port group to which you want to add the new adapter. If a distributed switch is passed to the VirtualSwitch parameter, an existing port group name should be specified. For standard virtual switches, if the port group is non-existent, a new port group with the specified name will be created and the new adapter will be added to the port group. | optional |
|
String | 3 |
|
Specifies an IP address for the new network adapter. All IP addresses are specified using IPv4 dot notation. If IP is not specified, DHCP mode is enabled. For VMKernel network adapters, the DHCP mode is supported only on vCenter Server 4.1, ESX 4.1, and later. | optional |
|
String | 4 |
|
Specifies a subnet mask for the new network adapter. | optional |
|
String | 5 |
|
Specifies a media access control (MAC) address for the new virtual network adapter. | optional |
|
SwitchParameter | named |
|
Indicates that the IPv6 address is obtained through a router advertisement. | optional |
|
SwitchParameter | named |
|
If the value is $true, indicates that you want to create a service console virtual network adapter. If the value is $false, indicates that you want to create a virtual host/VMkernel network adapter. Not supported on ESXi. | optional |
|
Boolean | named |
|
Indicates that the network adapter is enabled for Fault Tolerance (FT) logging. This parameter is supported only on ESX/vCenter Server 4.1 and later. | optional |
|
String[] | named |
|
Specifies multiple static addresses using the following format: |
optional |
|
SwitchParameter | named |
|
Indicates that the IPv6 address is obtained through DHCP. | optional |
|
Boolean | named |
|
Indicates that you want to enable the network adapter for management traffic. This parameter is supported only on ESX/ESXi/vCenter Server 4.1 and later. | optional |
|
Int32 | named |
|
Specifies the MTU size. This parameter is supported only on ESX/vCenter Server 4.1 and later. | optional |
|
String | named |
|
Specifies the port of the specified distributed switch to which you want to connect the network adapter. Use this parameter only if a distributed switch is passed to the VirtualSwitch parameter. | optional |
|
VIServer[] | named |
|
The Server parameter is required when the host is specified by name. In this case, the host with the specified name is searched for on the specified Servers and a network adapter is added to it. If a VMHost object is passed to the VMHost parameter, the Server parameter is not used. | optional |
|
VMHost | named |
|
Specifies the host to which you want to add the new adapter. This parameter is mandatory when creating a network adapter on a distributed switch. | optional |
|
Boolean | named |
|
Indicates that you want to use the new virtual host/VMKernel network adapter for VMotion. | optional |
|
Boolean | named |
|
Indicates that Virtual SAN traffic is enabled on this network adapter. |
-NetworkStack <HostNetworkStack>
[[-PortGroup] <String>]
[[-IP] <String>]
[[-SubnetMask] <String>]
[[-Mac] <String>]
[-AutomaticIPv6]
[-IPv6 <String[]>]
[-IPv6ThroughDhcp]
[-Mtu <Int32>]
[-PortId <String>]
[-Server <VIServer[]>]
[-VMHost <VMHost>]
[CommonParameters]
Parameters
Required | Parameter Name | Type | Position | Features | Description |
---|---|---|---|---|---|
required |
|
VirtualSwitchBase | 2 |
|
Specifies the virtual switch to which you want to add the new network adapter. | required |
|
HostNetworkStack | named |
|
Specifies the host network stack to which you want to add the new adapter. | optional |
|
String | 1 |
|
Specifies the port group to which you want to add the new adapter. If a distributed switch is passed to the VirtualSwitch parameter, an existing port group name should be specified. For standard virtual switches, if the port group is non-existent, a new port group with the specified name will be created and the new adapter will be added to the port group. | optional |
|
String | 3 |
|
Specifies an IP address for the new network adapter. All IP addresses are specified using IPv4 dot notation. If IP is not specified, DHCP mode is enabled. For VMKernel network adapters, the DHCP mode is supported only on vCenter Server 4.1, ESX 4.1, and later. | optional |
|
String | 4 |
|
Specifies a subnet mask for the new network adapter. | optional |
|
String | 5 |
|
Specifies a media access control (MAC) address for the new virtual network adapter. | optional |
|
SwitchParameter | named |
|
Indicates that the IPv6 address is obtained through a router advertisement. | optional |
|
String[] | named |
|
Specifies multiple static addresses using the following format: |
optional |
|
SwitchParameter | named |
|
Indicates that the IPv6 address is obtained through DHCP. | optional |
|
Int32 | named |
|
Specifies the MTU size. This parameter is supported only on ESX/vCenter Server 4.1 and later. | optional |
|
String | named |
|
Specifies the port of the specified distributed switch to which you want to connect the network adapter. Use this parameter only if a distributed switch is passed to the VirtualSwitch parameter. | optional |
|
VIServer[] | named |
|
The Server parameter is required when the host is specified by name. In this case, the host with the specified name is searched for on the specified Servers and a network adapter is added to it. If a VMHost object is passed to the VMHost parameter, the Server parameter is not used. | optional |
|
VMHost | named |
|
Specifies the host to which you want to add the new adapter. This parameter is mandatory when creating a network adapter on a distributed switch. |
Output
VMware.VimAutomation.ViCore.Types.V1.Host.Networking.Nic.HostVirtualNic
Examples
Example 1
Creates a VMKernel port group at the MyVirtualSwitch1 virtual switch. The IP address is obtained via DHCP.
Example 2
Creates a VMKernel port group at the MyVirtualSwitch1 virtual switch and assigns a static IP address.
Example 3
Creates a VMKernel NIC that has an IPv4 address and an IPv6 address.
Example 4
Creates a VMKernel NIC that obtains IPv6 automatically (by router advertisement) and takes the desired IPv4 address.
Example 5
Creates a VMKernel NIC that obtains the IPv4 and IPv6 addresses by DHCP.
Example 6
Creates a Service Console port group at the vSwitch virtual switch. The IP address is obtained via DHCP.
Example 7
Creates a new VMKernel network adapter and connects it to the specified port group on the specified distributed switch.
Example 8
Creates a new VMKernel network adapter and connects it to a specified port on a specified distributed switch.
Related Commands
VMHost
VMHostAccount
VMHostAdvancedConfiguration
VMHostAuthentication
VMHostAvailableTimeZone
VMHostDiagnosticPartition
VMHostDisk
VMHostDiskPartition
VMHostFirewallDefaultPolicy
VMHostFirewallException
VMHostFirmware
VMHostHardware
VMHostHba
VMHostModule
VMHostNetwork
VMHostNetworkAdapter
VMHostNetworkStack
VMHostNtpServer
VMHostPatch
VMHostPciDevice
VMHostProfile
VMHostProfileCompliance
VMHostProfileImageCacheConfiguration
VMHostProfileRequiredInput
VMHostProfileStorageDeviceConfiguration
VMHostProfileUserConfiguration
VMHostProfileVmPortGroupConfiguration
VMHostRoute
VMHostService
VMHostSnmp
VMHostStartPolicy
VMHostStorage