Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

feat: add support for dynamic directpath i/o #263

Merged
merged 1 commit into from
May 9, 2024

Conversation

kshivakumar-nvidia
Copy link
Contributor

@kshivakumar-nvidia kshivakumar-nvidia commented Mar 10, 2023

Description

As a part of the Assignable Hardware framework in vSphere 7, Dynamic DirectPath I/O is introduced. When configuring a virtual machine to use a PCIe device using Dynamic Direct I/O path, enables the Assignable Hardware intelligence for passthrough devices. No longer is the hardware address of the PCIe device directly mapped to the virtual machine configuration file (the .vmx file). Instead, the attributes, or capabilities, are exposed to the virtual machine.

Example

source "vsphere-iso" "example" {
  vcenter_server       = var.vsphere_server
  username             = var.vsphere_username
  password             = var.vsphere_password
  datacenter           = var.vsphere_datacenter
  cluster              = var.vsphere_cluster
  datastore            = var.vsphere_datastore
  network              = var.vsphere_network
  iso_paths            = [var.iso_path]
  iso_checksum         = var.iso_checksum
  iso_checksum_type    = "sha256"
  ssh_username         = var.ssh_username
  ssh_password         = var.ssh_password
  guest_os_type        = "windows9Server64Guest"
  disk_controller_type = "pvscsi"
  disk_size            = "60000"
  vm_name              = "my-vm"
  floppy_files         = ["path/to/floppyfile.txt"]
  pci_passthrough_allowed_device {
    "vendor_id": "8086",
    "device_id": "100e",
    "sub_device_id": "8086",
    "sub_vendor_id": "100e"
  }
}

Tests

?       github.com/hashicorp/packer-plugin-vsphere      [no test files]
ok      github.com/hashicorp/packer-plugin-vsphere/builder/vsphere/clone        1.419s
ok      github.com/hashicorp/packer-plugin-vsphere/builder/vsphere/common       2.157s
?       github.com/hashicorp/packer-plugin-vsphere/builder/vsphere/common/testing       [no test files]
ok      github.com/hashicorp/packer-plugin-vsphere/builder/vsphere/driver       5.149s
?       github.com/hashicorp/packer-plugin-vsphere/builder/vsphere/examples/driver      [no test files]
ok      github.com/hashicorp/packer-plugin-vsphere/builder/vsphere/iso  0.927s
ok      github.com/hashicorp/packer-plugin-vsphere/builder/vsphere/supervisor   2.654s
ok      github.com/hashicorp/packer-plugin-vsphere/post-processor/vsphere       0.461s
ok      github.com/hashicorp/packer-plugin-vsphere/post-processor/vsphere-template      1.103s
?       github.com/hashicorp/packer-plugin-vsphere/version      [no test files]

Reference

Closes #268

@kshivakumar-nvidia kshivakumar-nvidia requested a review from a team as a code owner March 10, 2023 03:52
@hashicorp-cla
Copy link

hashicorp-cla commented Mar 10, 2023

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@nywilken nywilken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution. I left a few request regarding the documentation and tests. Can you please take a look at the requested changes and let me know if you have any questions.

@nywilken
Copy link
Contributor

@tenthirtyam could I get your help in testing the changes in this PR please.

@nywilken nywilken added the stale label Jun 22, 2023
@nywilken
Copy link
Contributor

Hi @kshivakumar-nvidia there has been no updates on this PR since we last reviewed. I'm going to close it as it has become stale. If you find that you want to continue adding support for DirectPath please rebase your branch onto the latest main and update the PR and reopen.

Thanks again for the contribution.

@nywilken nywilken closed this Jun 22, 2023
@tenthirtyam tenthirtyam reopened this Mar 2, 2024
@tenthirtyam tenthirtyam changed the title Adding support for vSphere Dynamic DirectPath I/O feat: add support for dynamic directpath i/o Mar 2, 2024
@tenthirtyam tenthirtyam self-requested a review March 2, 2024 04:22
@tenthirtyam
Copy link
Collaborator

Reopened and rebased.

@tenthirtyam tenthirtyam marked this pull request as draft March 2, 2024 04:41
@tenthirtyam tenthirtyam marked this pull request as ready for review March 3, 2024 00:21
@tenthirtyam tenthirtyam self-assigned this Mar 23, 2024
@tenthirtyam tenthirtyam marked this pull request as draft March 23, 2024 00:32
@tenthirtyam tenthirtyam added this to the v1.2.8 milestone Apr 9, 2024
@tenthirtyam tenthirtyam modified the milestones: v1.3.0, Backlog Apr 27, 2024
@tenthirtyam tenthirtyam force-pushed the main branch 3 times, most recently from c8d87aa to c53c318 Compare May 1, 2024 02:15
@tenthirtyam tenthirtyam marked this pull request as ready for review May 1, 2024 02:17
@tenthirtyam tenthirtyam requested a review from nywilken May 1, 2024 02:17
@tenthirtyam tenthirtyam modified the milestones: Backlog, v1.3.0 May 1, 2024
@tenthirtyam tenthirtyam force-pushed the main branch 3 times, most recently from 92e04d0 to 0c66959 Compare May 1, 2024 02:29
Copy link
Collaborator

@tenthirtyam tenthirtyam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Adding support for vSphere Dynamic DirectPath I/O.

Co-Authored-By: Ryan Johnson <[email protected]>
@lbajolet-hashicorp lbajolet-hashicorp merged commit 148f50e into hashicorp:main May 9, 2024
12 checks passed
@hashicorp hashicorp locked and limited conversation to collaborators Jun 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for vSphere Dynamic DirectPath I/O
5 participants