A Xen domain0 is better described as a persistent domain. Mark it
as such during intialization.
Signed-off-by: Jim Fehlig <jfehlig(a)suse.com>
---
I noticed this while debugging a libvirt-guests issue. The list_guests()
function filters domain0 with
echo "$list" | grep -v 00000000-0000-0000-0000-000000000000
If domain0 is the only item in $list, the grep returns 1, causing
a failure of the stop operation when action is suspend. This
patch fixes the libvirt-guests issue, but I can also send a patch
to improve the filter if desired. E.g.
echo "$list" | sed "s/00000000-0000-0000-0000-000000000000//g"
src/libxl/libxl_driver.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
index 40328a6cb..79e29ce07 100644
--- a/src/libxl/libxl_driver.c
+++ b/src/libxl/libxl_driver.c
@@ -609,6 +609,7 @@ libxlAddDom0(libxlDriverPrivatePtr driver)
def = NULL;
+ vm->persistent = 1;
virDomainObjSetState(vm, VIR_DOMAIN_RUNNING, VIR_DOMAIN_RUNNING_BOOTED);
if (virDomainDefSetVcpusMax(vm->def, d_info.vcpu_max_id + 1, driver->xmlopt))
goto cleanup;
--
2.15.1