Host Network System Add Virtual Nic
Adds a virtual host/VMkernel network adapter.
Returns the device of the virtual network adapter.
IP configuration is required although it does not have to be enabled if the host is an ESX Server system. The dynamic privilege check will ensure that users have Host.Config.Network privilege on the host, and Network.Assign privilege on the connecting DVPortGroup, or DVS if connecting to a standalone DVPort. Network.Assign privilege is not required for operations on standard network or for operations performed directly on the host.
The unique identifier for the managed object to which the method attaches; the serialized managed object reference for a request has the form moType/moId
, in this case HostNetworkSystem/{moId}
.
The vSphere release schema. The current specification covers vSphere 8.0.2.0 APIs.
{
"portgroup": "string",
"nic": {
"_typeName": "string",
"dynamicProperty": [
{
"_typeName": "string",
"name": "string",
"val": {
"_typeName": "string"
}
}
],
"ip": {
"_typeName": "string",
"dhcp": false,
"ipAddress": "string",
"subnetMask": "string",
"ipV6Config": {
"_typeName": "string",
"ipV6Address": [
{
"_typeName": "string",
"ipAddress": "string",
"prefixLength": 0,
"origin": "string",
"dadState": "string",
"lifetime": "string",
"operation": "string"
}
],
"autoConfigurationEnabled": false,
"dhcpV6Enabled": false
}
},
"mac": "string",
"distributedVirtualPort": {
"_typeName": "string",
"switchUuid": "string",
"portgroupKey": "string",
"portKey": "string",
"connectionCookie": 0
},
"portgroup": "string",
"mtu": 0,
"tsoEnabled": false,
"netStackInstanceKey": "string",
"opaqueNetwork": {
"_typeName": "string",
"opaqueNetworkId": "string",
"opaqueNetworkType": "string"
},
"externalId": "string",
"pinnedPnic": "string",
"ipRouteSpec": {
"_typeName": "string",
"ipRouteConfig": {
"_typeName": "string",
"defaultGateway": "string",
"gatewayDevice": "string",
"ipV6DefaultGateway": "string",
"ipV6GatewayDevice": "string"
}
},
"systemOwned": false,
"dpuId": "string"
}
}
Note: Must be the empty string in case nic.distributedVirtualPort is set.
The HostVirtualNicSpec data object describes the HostVirtualNic configuration containing both the configured properties on a virtual NIC and identification information.
OK
AlreadyExists: if the portgroup already has a virtual network adapter.
InvalidArgument: if the IP address or subnet mask in the IP configuration are invalid. In the case of an ESX Server system, DHCP is not supported and this exception will be thrown if DHCP is specified. Exception may also be thrown if the named PortGroup does not exist.
InvalidState: if the an ipv6 address is specified in an ipv4 only system
HostConfigFault: for all other configuration failures.
{
"_typeName": "string",
"faultCause": "MethodFault Object",
"faultMessage": [
{
"_typeName": "string",
"key": "string",
"arg": [
{
"_typeName": "string",
"key": "string",
"value": {
"_typeName": "string"
}
}
],
"message": "string"
}
]
}