diff --git a/vendor/github.com/vmware/govmomi/object/virtual_device_list.go b/vendor/github.com/vmware/govmomi/object/virtual_device_list.go index f25f6f2c1..a898defbd 100644 --- a/vendor/github.com/vmware/govmomi/object/virtual_device_list.go +++ b/vendor/github.com/vmware/govmomi/object/virtual_device_list.go @@ -64,6 +64,7 @@ func EthernetCardTypes() VirtualDeviceList { &types.VirtualE1000e{}, &types.VirtualVmxnet2{}, &types.VirtualVmxnet3{}, + &types.VirtualVmxnet3Vrdma{}, &types.VirtualPCNet32{}, &types.VirtualSriovEthernetCard{}, }).Select(func(device types.BaseVirtualDevice) bool { @@ -732,7 +733,6 @@ func (l VirtualDeviceList) CreateEthernetCard(name string, backing types.BaseVir if name == "" { name = ctypes.deviceName(ctypes[0]) } - found := ctypes.Select(func(device types.BaseVirtualDevice) bool { return l.deviceName(device) == name }) diff --git a/vsphere/internal/virtualdevice/virtual_machine_network_interface_subresource.go b/vsphere/internal/virtualdevice/virtual_machine_network_interface_subresource.go index b57004cac..db2eb41c3 100644 --- a/vsphere/internal/virtualdevice/virtual_machine_network_interface_subresource.go +++ b/vsphere/internal/virtualdevice/virtual_machine_network_interface_subresource.go @@ -30,6 +30,7 @@ const ( networkInterfaceSubresourceTypeE1000e = "e1000e" networkInterfaceSubresourceTypePCNet32 = "pcnet32" networkInterfaceSubresourceTypeSriov = "sriov" + networkInterfaceSubresourceTypeVRdma = "vmxnet3vrdma" networkInterfaceSubresourceTypeVmxnet2 = "vmxnet2" networkInterfaceSubresourceTypeVmxnet3 = "vmxnet3" networkInterfaceSubresourceTypeUnknown = "unknown" @@ -39,6 +40,7 @@ var networkInterfaceSubresourceTypeAllowedValues = []string{ networkInterfaceSubresourceTypeE1000, networkInterfaceSubresourceTypeE1000e, networkInterfaceSubresourceTypeVmxnet3, + networkInterfaceSubresourceTypeVRdma, } // NetworkInterfaceSubresourceSchema returns the schema for the disk @@ -86,7 +88,7 @@ func NetworkInterfaceSubresourceSchema() map[string]*schema.Schema { Type: schema.TypeString, Optional: true, Default: networkInterfaceSubresourceTypeVmxnet3, - Description: "The controller type. Can be one of e1000, e1000e, or vmxnet3.", + Description: "The controller type. Can be one of e1000, e1000e, vmxnet3 or vrdma.", ValidateFunc: validation.StringInSlice(networkInterfaceSubresourceTypeAllowedValues, false), }, "use_static_mac": { @@ -605,6 +607,8 @@ func baseVirtualEthernetCardToBaseVirtualDevice(v types.BaseVirtualEthernetCard) return types.BaseVirtualDevice(t) case *types.VirtualVmxnet3: return types.BaseVirtualDevice(t) + case *types.VirtualVmxnet3Vrdma: + return types.BaseVirtualDevice(t) } panic(fmt.Errorf("unknown ethernet card type %T", v)) } @@ -633,6 +637,8 @@ func virtualEthernetCardString(d types.BaseVirtualEthernetCard) string { return networkInterfaceSubresourceTypeVmxnet2 case *types.VirtualVmxnet3: return networkInterfaceSubresourceTypeVmxnet3 + case *types.VirtualVmxnet3Vrdma: + return networkInterfaceSubresourceTypeVRdma } return networkInterfaceSubresourceTypeUnknown } diff --git a/website/docs/d/virtual_machine.html.markdown b/website/docs/d/virtual_machine.html.markdown index ecb86376f..e0cf8c523 100644 --- a/website/docs/d/virtual_machine.html.markdown +++ b/website/docs/d/virtual_machine.html.markdown @@ -114,7 +114,7 @@ The following attributes are exported: * `unit_number` - The disk number on the storage bus. * `network_interface_types` - The network interface types for each network interface found on the virtual machine, in device bus order. Will be one of - `e1000`, `e1000e`, `pcnet32`, `sriov`, `vmxnet2`, or `vmxnet3`. + `e1000`, `e1000e`, `pcnet32`, `sriov`, `vmxnet2`, `vmxnet3vrdma` or `vmxnet3`. * `network_interfaces` - Information about each of the network interfaces on this virtual machine or template. These are sorted by device bus order so that they can be applied to a `vsphere_virtual_machine` resource in the order the resource @@ -123,8 +123,8 @@ The following attributes are exported: data source must be the same on the destination virtual machine as the source. The sub-attributes are: * `adapter_type` - The network interface types for each network interface found - on the virtual machine, in device bus order. Will be one of `e1000`, `e1000e` or - `vmxnet3`. + on the virtual machine, in device bus order. Will be one of `e1000`, `e1000e`, + `vmxnet3vrdma` or `vmxnet3`. * `bandwidth_limit` - The upper bandwidth limit of this network interface, in Mbits/sec. * `bandwidth_reservation` - The bandwidth reservation of this network interface,