From d3f8fc96e40f1f2ca61d2ade1e43bbff1813fe44 Mon Sep 17 00:00:00 2001 From: Bahtiar `kalkin-` Gadimov Date: Wed, 20 Jul 2016 17:52:49 +0200 Subject: [PATCH] Fix pci device attachment to QubesVM --- qubes/devices.py | 2 +- templates/libvirt/xen.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 %}