vmware / vmware/pyvmomi

Add PCI device to VM

Open
#39 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

question sample request
Dominant language
Python
Stars
2.3k
Forks
763
PR merge metrics
No merged PRs in 30d

Description

Appreciate any help on this, given below is what I am trying. But backing.deviceId I'm not able fetch properly.

        pcispec = vim.vm.device.VirtualDeviceSpec()
        pcispec.operation = vim.vm.device.VirtualDeviceSpec.Operation.add
        pcispec.device = vim.vm.device.VirtualPCIPassthrough()
        pcispec.device.key = -1

        pcispec.device.backing = vim.vm.device.VirtualPCIPassthrough.DeviceBackingInfo()
        pcispec.device.backing.id = '00:00.0'
        pcispec.device.backing.deviceId = ??? (HostPciDevice.deviceId)
        #pcispec.device.backing.systemId =  ???

        pcispec.device.connectable = vim.vm.device.VirtualDevice.ConnectInfo()
        pcispec.device.connectable.startConnected = True
        pcispec.device.connectable.allowGuestControl = True

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the shown VirtualPCIPassthrough and DeviceBackingInfo configuration, then consult the HostPciDevice fields referenced in the issue to determine the required deviceId and systemId values. Done means the PCI device can be added to a VM with a valid backing configuration; no repository file or test is named.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, infrastructure
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.