diff --git a/qubes/devices.py b/qubes/devices.py index 8393d22e..a10bf1c2 100644 --- a/qubes/devices.py +++ b/qubes/devices.py @@ -132,7 +132,7 @@ class PCIDevice(RegexDevice): @property def libvirt_name(self): - return 'pci_000_{}_{}_{}'.format(self.bus, self.device, self.name) + return 'pci_0000_{}_{}_{}'.format(self.bus, self.device, self.function) class BlockDevice(object): diff --git a/templates/libvirt/xen.xml b/templates/libvirt/xen.xml index 9547e93b..53ac21ea 100644 --- a/templates/libvirt/xen.xml +++ b/templates/libvirt/xen.xml @@ -94,7 +94,7 @@ {% endif %} {% for device in vm.devices.pci %} - {% include libvirt/devices/pci.xml %} + {% include 'libvirt/devices/pci.xml' %} {% endfor %} {% if vm.hvm %}