Skip to content

Add PCI device to VM #39

Open
Open
@reubenur-rahman

Description

@reubenur-rahman

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions