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

Add PCI device to VM #39

Open
reubenur-rahman opened this issue May 30, 2014 · 2 comments
Open

Add PCI device to VM #39

reubenur-rahman opened this issue May 30, 2014 · 2 comments

Comments

@reubenur-rahman
Copy link

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
@wiggin15
Copy link
Contributor

Here's code that adds PCI passthrough devices to a VM:
https://gist.github.com/wiggin15/319b5e828c42af3aed40
It may belong to the pyvmomi-community-samples repository but I'm not sure... If you want, you open a pull request there with this code.

@chanduusc
Copy link

@wiggin15 .. Can you please quote example for memory reservation for PCI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants