
Am Dienstag 24 Mai 2011 06:06:08 schrieb Jim Fehlig:
+ + event = virDomainEventNewFromObj(vm, VIR_DOMAIN_EVENT_STOPPED, + VIR_DOMAIN_EVENT_STOPPED_SAVED); + + if (libxlVmReap(driver, vm, 1, VIR_DOMAIN_SHUTOFF_SAVED) != 0) { + libxlError(VIR_ERR_INTERNAL_ERROR, + _("Failed to destroy domain '%d'"), dom->id); + goto cleanup; + }
And here call libxl_domain_destroy() directly instead of libxlVmReap(), allowing the event handler to cleanup the vm.
Can you make these changes and ensure all the save/restore issues are resolved in your environment?
I made these changes but this leads to another issue. When using the event handler to cleanup the domain there seems to be a race condition. The call to libxl_event_get_domain_death_info returns a value != 1 sometimes and the domain gets not cleaned up. The latest version of the patch I posted in this thread earlier does not have this issue as it cleans up the domain directly. Maybe the every now and then fail of libxl_event_get_domain_death_info is a result of a bug or unhandled race condition in Xen. Cheers, Markus