aboutsummaryrefslogtreecommitdiffstats
path: root/tools/xcutils/xc_save.c
Commit message (Collapse)AuthorAgeFilesLines
* tools/xc: log pid in xc_save/xc_restore outputOlaf Hering2013-02-151-1/+1
| | | | | | | | | | If several migrations log their output to xend.log its not clear which line belongs to a which guest. Print entry/exit of xc_save and xc_restore and also request to print pid with each log call. Signed-off-by: Olaf Hering <olaf@aepfle.de> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* tools/xc: restore logging in xc_saveOlaf Hering2013-02-151-5/+10
| | | | | | | | | | | | | | Prior to xen-4.1 the helper xc_save would print some progress during migration. With the new xc_interface_open API no more messages were printed because no logger was configured. Restore previous behaviour by providing a logger. The progress in xc_domain_save will be disabled because it generates alot of output and fills up xend.log quickly. Signed-off-by: Olaf Hering <olaf@aepfle.de> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* nstore: rename public xenstore headersIan Campbell2012-05-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | The xenstore header xs.h is producing conflicts with other software[1]. xs is a too short identifier and does not matche the library. Renaming the headers to xenstore.h and xenstore_lib.h is the easiest way to make them easy recognizable and prevent furthe problems. [1]: http://bugs.debian.org/668550 [ Also update QEMU_TAG, to bring in corresponding change to qemu-xen-traditional. -iwj ] Signed-off-by: Bastian Blank <waldi@debian.org> Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com> --HG-- rename : tools/xenstore/xs.h => tools/xenstore/xenstore.h rename : tools/xenstore/xs_lib.h => tools/xenstore/xenstore_lib.h
* tools: VM generation ID save/restore and migrate.Paul Durrant2011-12-161-1/+1
| | | | | | | | | | | | | | | Add code to track the address of the VM generation ID buffer across a save/restore or migrate, and increment it as necessary. The address of the buffer is written into xenstore by hvmloader at boot time. It must be read from xenstore by the caller of xc_domain_save() and then written back again by the caller of xc_domain_restore(). Note that the changes to xc_save.c and xc_restore.c are merely sufficient for them to build. Signed-off-by: Paul Durrant <paul.durrant@citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* libxc: convert evtchn interfaces to use an opaque handle typeIan Campbell2010-12-231-6/+5
| | | | | | | | | | | | This makes the interface consistent with the changes made to the main interface in 21483:779c0ef9682c. Also fix some references to "struct xc_interface" which should have been simply "xc_interface" in tools/xenpaging, and update QEMU_TAG to pull in the corresponding qemu change. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools/xcutils: xc_save: add missing whitespaceOlaf Hering2010-12-161-1/+1
| | | | | | Add missing whitespace between the two error strings. Signed-off-by: Olaf Hering <olaf@aepfle.de>
* tools: cleanup domain save switch_qemu_logdirty callbackIan Campbell2010-10-211-3/+5
| | | | | | | | | | | | | | | | | Move the function into struct save_callbacks with the others and add the void *closure to the callback arguments. Add and propagate an error return code from the callback. Use this in libxl to pass the save context to libxl__domain_suspend_common_switch_qemu_logdirty allowing us to reuse the parent's xenstore handle, gc context etc. Also add an apparently missing libxl__free_all to libxl__domain_suspend_common. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxc: eliminate static variables, use xentoollog; API changeKeir Fraser2010-05-281-9/+9
| | | | | | | | | | | | | | | | | | | | This patch eliminate the global variables in libxenctrl (used for logging and error reporting). Instead the information which was in the global variables is now in a new xc_interface* opaque structure, which xc_interface open returns instead of the raw file descriptor; furthermore, logging is done via xentoollog. There are three new parameters to xc_interface_open to control the logging, but existing callers can just pass "0" for all three to get the old behaviour. All libxc callers have been adjusted accordingly. Also update QEMU_TAG for corresponding qemu change. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* Change the global suspend event channel lock file to a per-domain lock fileKeir Fraser2010-05-041-1/+1
| | | | | | | | This allows multiple guests to be migrated or protected by Remus simultaneously. Signed-off-by: Shriram Rajagopalan <rshriram@cs.ubc.ca> Acked-by: Brendan Cully <brendan@cs.ubc.ca>
* Remus: Add callbacks for suspend, postcopy and preresume in xc_domain_save.Keir Fraser2009-11-091-2/+5
| | | | | | This makes it possible to perform repeated checkpoints. Signed-off-by: Brendan Cully <brendan@cs.ubc.ca>
* Fix some issues for HVM log dirty:Keir Fraser2009-09-071-87/+36
| | | | | | | | | * Add necessary logging dirty in qemu to avoid guest error with intensive disk access when live migration * Take place of shared memory between qemu and migration tools by new added hypercall, which is clean and simple Signed-Off-By: Zhai, Edwin <edwin.zhai@intel.com>
* xc_save: fixes typo in error message.Keir Fraser2009-04-221-1/+1
| | | | Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* Move the suspend event channel function to libxc, it will use theKeir Fraser2009-03-181-89/+25
| | | | | | /var/lib/xen/suspend_evtchn_lock.d to protect the access. Signed-off-by: Jiang Yunhong <yunhong.jiang@intel.com>
* xc_save: remove the dependency on the global si structureKeir Fraser2009-03-181-33/+28
| | | | Signed-off-by: Jiang Yunhong <yunhong.jiang@intel.com>
* Fix domain save when guest is in S3.Keir Fraser2008-12-051-8/+2
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* Do not request domain shutdown if in S3 state during domain save.Keir Fraser2008-12-031-10/+26
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* xc_save/xc_restore: Fix wrong data typeKeir Fraser2008-09-171-2/+2
| | | | | | | | xc_interface_open() may return -1, but if we define xc_fd as unsigned int, then -1 will be > 0. Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* xc_save: ignore the first suspend event channel notificationKeir Fraser2008-09-081-31/+47
| | | | | | | | | | | | | I've noticed that the suspend event channel becomes pending as soon as it is bound. I'm not sure why or whether this is intentional, but it means that the suspend function will return before the domain has completed suspending unless the first notification is cleared. Without this patch, xc_domain_save may find that the guest has not suspended and sleep in 10ms chunks until it does. Typically this is several milliseconds of wasted time. From: Brendan Cully <brendan@cs.ubc.ca> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* xc_save: Clean up (*suspend)() callback hook.Keir Fraser2008-09-081-9/+9
| | | | Sigend-off-by: Keir Fraser <keir.fraser@citrix.com>
* xc_save: Janitorial work.Keir Fraser2008-09-081-17/+10
| | | | | | | | Remove an unused variable. Replace errx by warnx when cleanup code follows. From: Brendan Cully <brendan@cs.ubc.ca> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* Cleanups to suspend-event-channel patches.Keir Fraser2008-07-041-18/+3
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* Teach xc_save to use event-channel-based domain suspend if available.Keir Fraser2008-07-041-1/+137
| | | | | | | | | | If the guest provides a suspend event channel through xenstore, xc_save will use it in preference to the old xenstore-based method. Xend is still informed when the domain has suspended so that it can perform device migration in parallel with last-round migration. Signed-off-by: Brendan Cully <brendan@cs.ubc.ca>
* Fix xc_save compileKeir Fraser2008-03-181-0/+1
| | | | | | Add missing <err.h> include. Signed-off-by: John Levon <john.levon@sun.com>
* [HVM] Save/restore: don't leak shared-memory segments after HVM live-migrate.Tim Deegan2007-07-261-7/+18
| | | | Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
* [HVM] Live-migration fixups after 15639:c585f993385cTim Deegan2007-07-241-1/+3
| | | | | | Use the same xenstore area for log-dirty commands as for save/continue, and avoid a race condition by acking the save command after the save. Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
* [HVM] Save/restore: merge xc_linux_save and xc_hvm_saveTim Deegan2007-04-111-6/+3
| | | | | | | | into xc_domain_save, like we did for xc_domain_restore Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com> --HG-- rename : tools/libxc/xc_linux_save.c => tools/libxc/xc_domain_save.c
* [HVM][QEMU] Save/restore: enable HVM live migrationTim Deegan2007-03-161-2/+127
| | | | | by getting page-dirtying bitmaps from qemu-dm as well as from xen. Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
* [HVM] save restore: frame workTim Deegan2007-01-181-1/+4
| | | | | | Signed-off-by: Zhai Edwin <edwin.zhai@intel.com> frame work for HVM save restore in Control Panel
* [XEND] xc_save/xc_restore open the libxc interface independentlykfraser@localhost.localdomain2006-08-151-10/+18
| | | | | | | of their parent. This is required now that the interface fd is marked for close-on-exec. Signed-off-by: Keir Fraser <keir@xensource.com>
* Extend the xc_linux_save interface to take a callback function for handling theemellor@leeni.uk.xensource.com2006-01-101-1/+19
| | | | | | | | | suspend, and push the printf("suspend") out of xc_linux_save and into xc_save. This means that xc_linux_save can be used without the xc_save wrapper if desired. Signed-off-by: Ewan Mellor <ewan@xensource.com>
* Enable 'live' migration from a tools pov; prior to this the 'live' flag was shand@ubuntu.eng.hq.xensource.com2005-09-021-4/+7
| | | | | | | being ignored by xend/xc_linux_save. Signed-off-by: Steven Hand <steven@xensource.com>
* Break the building/save/restore code out into a separate library libxenguest.cl349@firebug.cl.cam.ac.uk2005-08-251-2/+3
| | | | | | | Also update the tools accordingly. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
* Rename libxc => libxenctrl and xc.h => xen/xenctrl.hcl349@firebug.cl.cam.ac.uk2005-08-241-1/+1
| | | | | | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk> --HG-- rename : tools/libxc/xc.h => tools/libxc/xenctrl.h
* bitkeeper revision 1.1527.2.1 (429368a2F0SR4yrzuHsrRucuwriYqA)cl349@firebug.cl.cam.ac.uk2005-05-241-0/+29
Implement the parts of vm save which need interaction with xend as part of xend, instead of using xfrd. Execute xc_linux_save in a seperate process so that it can't crash xend. Also handle errors passed from xc_linux_save. xen_domain.c: Disable save in xfrd. xc_save.c: new file Makefile: Add xc_save. XendDomainInfo.py: Add suspended state and threading Condition with notification, allowing easy waiting for state changes. XendDomain.py: Implement the parts of vm save which need interaction with xend as part of xend, instead of using xfrd. Set state to "suspended" when detecting a suspended domain. Fix reading output from subprocesses. Fix ValueError in xen_domain(). xc.c: Remove python binding for xc_linux_save. xc_linux_save.c: Implement the parts of vm save which need interaction with xend as part of xend, instead of using xfrd. Also run xc_linux_save in a seperate process. xc_linux_restore.c: Flush output so that xend picks it up timely. Also disable debug output again. xc.h: Update xc_linux_save prototype and fix comments for xc_linux_{save,restore}. ignore: Add tools/xcutils/xc_save. xpopen.py: Exit with 127 if exec fails. Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>