On 12/13/2017 10:41 PM, Jim Fehlig wrote: > A Xen domain0 is better described as a persistent domain. Mark it > as such during intialization. > > Signed-off-by: Jim Fehlig <jfehlig@xxxxxxxx> > --- > > 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; > I think this is orthogonal to libvirt-guests fix. dom0 should be marked as persistent because it is persistent. I mean, even though we don't store its config anywhere, we can't really get rid of it (udefine && destroy). Michal -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list