Sometimes you need to use a PCI device on a virtual machine. We have a vendor who has supplied a USB dongle for software licensing, which is really annoying. Their software doesn’t merit it’s own server, so we want to put it into our Xenserver pool.
- Shutdown the VM you want to attach your device too.
- SSH into the host that has your PCI device. Use the following command to locate the PCI ID for your device. Should look something like this “00:1d.7″
lspci -v
- Now locate the UUID for the VM you want to attach the PCI device to with the following command
xe vm-list
- Now use the following command to set the pass through
xe vm-param-set other-config:pci=0/"PCI ID" uuid="UUID of VM"
- Now boot the VM and check if your device is now attached. If not, make sure you are using the correct PCI ID. USB devices can get tricky, as there maybe many USB devices listed.
I couldn’t get this command to work
xe vm-param-set other-config:pci=0/”PCI ID” uuid=”UUID of VM”
However, this worked:
xe vm-param-set other-config:pci=0/0000:”PCI ID” uuid=”UUID of VM”
I’m still trying to find a working command to pass multiple PCI IDs to a VM. I’m using vl pci-attach to add additional pci devices.