hashicorp / terraform-provider-vsphere

Terraform Provider for VMware vSphere
https://registry.terraform.io/providers/hashicorp/vsphere/
Mozilla Public License 2.0
623 stars 453 forks source link

Add support for specifying the `pci_slot` number of network interfaces on `r/virtual_machine` #1654

Closed mvrk69 closed 1 year ago

mvrk69 commented 2 years ago

Community Guidelines

Description

Would be very useful to have the possibility of specifying the pci_slot number for each network interface on VM creation.

Use Case(s)

For example, when i create a Linux VM with 4 network interfaces, for some reason VMware does this:

ethernet0.pciSlotNumber = "192"
ethernet1.pciSlotNumber = "224"
ethernet2.pciSlotNumber = "256"
ethernet3.pciSlotNumber = "1184"

This makes the ethernet3 showing up as 1st network interface on Linux.

To fix it, i change the vmx file manually to:

ethernet0.pciSlotNumber = "1184"
ethernet1.pciSlotNumber = "192"
ethernet2.pciSlotNumber = "224"
ethernet3.pciSlotNumber = "256"

Potential Terraform Provider Configuration

  network_interface {
    network_id = data.vsphere_network.network1.id
    pci_slot = 1184
  }
  network_interface {
    network_id = data.vsphere_network.network2.id
    pci_slot = 192
  }
  network_interface {
    network_id = data.vsphere_network.network3.id
    pci_slot = 224
  }
  network_interface {
    network_id = data.vsphere_network.network4.id
    pci_slot = 256
  }

References

No response

github-actions[bot] commented 2 years ago

Hello,   mvrk69 ! 🖐

Thank you for submitting an issue for this provider. The issue will now enter into the issue lifecycle.

If you want to contribute to this project, please review the contributing guidelines and information on submitting pull requests.

github-actions[bot] commented 1 year ago

Marking this issue as stale due to inactivity in the past 180 days. This helps us focus on the active issues. If this issue is reproducible with the latest version of the provider, please comment. If this issue receives no comments in the next 30 days it will automatically be closed. If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you!

github-actions[bot] commented 1 year ago

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.