Skip to contentSkip to conversation

Question about xm save

DISCUSSION Dietmar Hahn 2 participants 4 messages Mar 12, 2007

lore
Share & tools
lore
#0 lore raw

Hi,

I'm trying to understand what's going on while calling 'xm save ...'. I looked through the sources and found in xend stuff:
XendCheckpoint.py -> saveInputHandler() -> dominfo.shutdown('suspend') This makes an entry in the xenstore:
control = ""
shutdown = "suspend"
The function dominfo.waitForShutdown() is startet and waits for an event. In parallel (with the forkHelper) the command '/usr/lib/xen/bin/xc_save 21 1 0 0 0' is started and never returns. What I miss is the connection between these both things.
Can anybody give me a hint?
(For the tests I simply added some tracer in the python scripts and startet the mini-os.)
Many thanks in advance!

Dietmar.

#1 lore raw
Quoted 16 lines · Dietmar Hahn

Hi,

I'm trying to understand what's going on while calling 'xm save ...'. I looked through the sources and found in xend stuff:
XendCheckpoint.py -> saveInputHandler() -> dominfo.shutdown('suspend') This makes an entry in the xenstore:
control = ""
shutdown = "suspend"
The function dominfo.waitForShutdown() is startet and waits for an event. In parallel (with the forkHelper) the command '/usr/lib/xen/bin/xc_save 21 1 0 0 0' is started and never returns. What I miss is the connection between these both things.
Can anybody give me a hint?
(For the tests I simply added some tracer in the python scripts and startet the mini-os.)
Many thanks in advance!

Xend is waiting for the guest to suspend, at which point it will write back to xc_save, and then the save will complete. Your guest is not suspending, by the looks of it.

Ewan.

#2 lore raw

Am Montag, 12. März 2007 09:57 schrieb Ewan Mellor:

Quoted 5 lines

Xend is waiting for the guest to suspend, at which point it will write back to xc_save, and then the save will complete. Your guest is not suspending, by the looks of it.

Ewan.

OK I understand. But how is the guest informed about the suspend. Which function in the guest is called or what entrypoint is used? Please can you tell me a name or symbol in the linux kernel so I can have a look at the sources.
Thanks.

Dietmar.

#3 lore raw
Quoted 10 lines · Dietmar Hahn

Am Montag, 12. März 2007 09:57 schrieb Ewan Mellor:

Quoted 5 lines

Xend is waiting for the guest to suspend, at which point it will write back to xc_save, and then the save will complete. Your guest is not suspending, by the looks of it.

Ewan.

OK I understand. But how is the guest informed about the suspend. Which function in the guest is called or what entrypoint is used? Please can you tell me a name or symbol in the linux kernel so I can have a look at the sources.

It's the control/shutdown = suspend node that is written into the store. I'm not familiar with Mini-OS, but in Linux it's in the sparse tree in drivers/xen/core/reboot.c. The node is written by Xend, then cleared by the kernel to acknowledge, and then the guest suspends.

Ewan.