Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add support for SR-IOV network adapters #1136

Closed
andrew-lee-1089 opened this issue Jul 15, 2020 · 4 comments · Fixed by #2059
Closed

Add support for SR-IOV network adapters #1136

andrew-lee-1089 opened this issue Jul 15, 2020 · 4 comments · Fixed by #2059
Labels
acknowledged Status: Issue or Pull Request Acknowledged area/networking Area: Networking area/vm Area: Virtual Machines enhancement Type: Enhancement size/m Relative Sizing: Medium

Comments

@andrew-lee-1089
Copy link

andrew-lee-1089 commented Jul 15, 2020

Description

When deploying a VM to a particular host you may want to attach a network adapter directly to an SR-IOV enabled physical NIC (bypassing a vSwitch)

To do this in the GUI, you simply attach a network adapter as normal and select 'SRIOV' instead of 'vmxnet3' (the default) and provide a link to the physical NIC. You still need to provide the name of a virtual network (from which you inherit various VLAN settings)

image

Potential Terraform Configuration

resource "vsphere_virtual_machine" "vm" {
   # ... other configuration ...
  host_system_id      = data.vsphere_host.host.id
  memory              = var.memory
  memory_reservation  = var.memory # Need to reserve memory for SR-IOV to work
  network_interface  {
    network_id        = data.vsphere_network.network.id
    adapter_type      = sriov
    physical_function = "0000:3b:00.1" 
  }
  ... other network_interfaces... 
}

Although there may be a natural extension to make a data type representing the physical NIC and the physical PCI is read off that data type (I think we can build off @bill-rich 's work in #1099

References

Th MOP to do this is here

This MOP is in two parts:

  1. enable SR-IOV on the host: this MOP
  2. Assign a Virtual Function as SR-IOV Passthrough Adapter to a Virtual Machine

This work essentially adds support for the second part of the MOP in terraform.

I've started work on this enhancement, and have a PR that does deploy the VM correctly but is hitting an issue with UnitNumber ordering see this issue

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment
@andrew-lee-1089 andrew-lee-1089 added the enhancement Type: Enhancement label Jul 15, 2020
@bill-rich
Copy link
Contributor

Hi @andrew-lee-metaswitch! I responded on the govmomi issue, so please see there for further details, but I believe this can be supported by increasing our coverage of network interface types here.

@bill-rich bill-rich added acknowledged Status: Issue or Pull Request Acknowledged size/m Relative Sizing: Medium labels Jul 23, 2020
@andrew-lee-1089
Copy link
Author

Fixed in #1417

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 25, 2021
@tenthirtyam tenthirtyam reopened this Feb 9, 2022
@tenthirtyam
Copy link
Collaborator

Reopening this issue as it's not yet merged. Once merged, this issue with be closed by the linked pull request.

Ryan Johnson
Staff II Solutions Architect | VMware, Inc.

@tenthirtyam tenthirtyam added area/vm Area: Virtual Machines area/networking Area: Networking labels Feb 22, 2022
@tenthirtyam tenthirtyam added this to the Backlog milestone Mar 21, 2022
@tenthirtyam tenthirtyam removed this from the Backlog milestone Mar 6, 2024
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
acknowledged Status: Issue or Pull Request Acknowledged area/networking Area: Networking area/vm Area: Virtual Machines enhancement Type: Enhancement size/m Relative Sizing: Medium
Projects
None yet
3 participants