* domain never exits after using 'xl save'
@ 2021-09-23 11:10 James Dingwall
2021-09-23 12:15 ` Olaf Hering
0 siblings, 1 reply; 2+ messages in thread
From: James Dingwall @ 2021-09-23 11:10 UTC (permalink / raw)
To: xen-devel
Hi,
This is an issue that was observed on 4.11.3 but I have reproduced on 4.14.3.
After using the `xl save` command the associated `xl create` process exits
which later results in the domain not being cleaned up when the guest is
shutdown.
e.g.:
# xl list -v | grep d13cc54d-dcb8-4337-9dfe-3b04f671b16
guest01 15 2048 3 -b---- 1555.9 d13cc54d-dcb8-4337-9dfe-3b04f671b16a - system_u:system_r:migrate_domU_t
# ps -ef | grep d13cc54d-dcb8-4337-9dfe-3b04f671b16
root 18694 1 0 Sep22 ? 00:00:00 /usr/sbin/xl create -p /etc/xen/config/d13cc54d-dcb8-4337-9dfe-3b04f671b16a.cfg
# xl save -p guest01 /vmsave/guest01.mem
Saving to /vmsave/guest01.mem new xl format (info 0x3/0x0/2900)
xc: info: Saving domain 15, type x86 HVM
xc: Frames: 1044480/1044480 100%
xc: End of stream: 0/0 0%
# xl list -v | grep d13cc54d-dcb8-4337-9dfe-3b04f671b16
guest01 15 2048 3 --p--- 1558.3 d13cc54d-dcb8-4337-9dfe-3b04f671b16a - system_u:system_r:migrate_domU_t
# ps -ef | grep d13cc54d-dcb8-4337-9dfe-3b04f671b16
- no matches -
# xl unpause guest01
# xl list -v | grep d13cc54d-dcb8-4337-9dfe-3b04f671b16
guest01 15 2048 3 -b---- 1559.0 d13cc54d-dcb8-4337-9dfe-3b04f671b16a - system_u:system_r:migrate_domU_t
# xl shutdown guest01
# xl list -v | grep d13cc54d-dcb8-4337-9dfe-3b04f671b16
guest01 15 2048 3 ---s-- 1575.8 d13cc54d-dcb8-4337-9dfe-3b04f671b16a 0 system_u:system_r:migrate_domU_t
What we would expect is that the `xl create` process remains running so that
when the domain is later shutdown then it gets cleaned up without having to
manually `xl destroy`.
tools/xl/xl_vmcontrol.c handle_domain_death() has (0 == DOMAIN_RESTART_NONE in xl.h)
case LIBXL_SHUTDOWN_REASON_SUSPEND:
LOG("Domain has suspended.");
return 0;
The while(1) loop of create_domain() has a switch statement which handles this
return value with:
case DOMAIN_RESTART_NONE:
LOG("Done. Exiting now");
libxl_event_free(ctx, event);
ret = 0;
goto out;
Is this the expected behaviour? Would an approach to getting the behaviour we
want be to change the return value from handle_domain_death() to one which
doesn't trigger the exit?
Thanks,
James
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: domain never exits after using 'xl save'
2021-09-23 11:10 domain never exits after using 'xl save' James Dingwall
@ 2021-09-23 12:15 ` Olaf Hering
0 siblings, 0 replies; 2+ messages in thread
From: Olaf Hering @ 2021-09-23 12:15 UTC (permalink / raw)
To: James Dingwall; +Cc: xen-devel
[-- Attachment #1: Type: text/plain, Size: 306 bytes --]
Am Thu, 23 Sep 2021 12:10:44 +0100
schrieb James Dingwall <james-xen@dingwall.me.uk>:
> xl save -p
This was discussed earlier this year in "how handle domU checkpoints properly".
https://build.opensuse.org/request/show/918052 has a patch named "xl-save-pc.patch" to address the issue.
Olaf
[-- Attachment #2: Digitale Signatur von OpenPGP --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-09-23 12:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-23 11:10 domain never exits after using 'xl save' James Dingwall
2021-09-23 12:15 ` Olaf Hering
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).