From 5f187bd2bfb268838a22c9092c41cfc8123313c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Thu, 15 Jun 2017 00:21:13 +0200 Subject: [PATCH] Force maxmem=memory for HVM with PCI devices Xen do not support other cases at all ("PCI device assignment for HVM guest failed due to PoD enabled", PoD means "populate on demand"). --- templates/libvirt/xen.xml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/templates/libvirt/xen.xml b/templates/libvirt/xen.xml index 21914d5b..393f670d 100644 --- a/templates/libvirt/xen.xml +++ b/templates/libvirt/xen.xml @@ -2,7 +2,11 @@ {% block basic %} {{ vm.name }} {{ vm.uuid }} - {{ vm.maxmem }} + {% if vm.hvm and vm.devices['pci'].persistent() | list %} + {{ vm.memory }} + {% else %} + {{ vm.maxmem }} + {% endif %} {{ vm.memory }} {{ vm.vcpus }} {% endblock %}