mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
Teach xc_save to use event-channel-based domain suspend if available.
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>
This commit is contained in:
1 parent
4539594d46
commit
17636f47a4
2 files changed
+139
-1
No files matched your search
@@ -108,6 +108,7 @@ def save(fd, dominfo, network, live, dst, checkpoint=False, node=-1):
|
||||
log.debug("Suspending %d ...", dominfo.getDomid())
|
||||
dominfo.shutdown('suspend')
|
||||
dominfo.waitForShutdown()
|
||||
if line in ('suspend', 'suspended'):
|
||||
dominfo.migrateDevices(network, dst, DEV_MIGRATE_STEP2,
|
||||
domain_name)
|
||||
log.info("Domain %d suspended.", dominfo.getDomid())
|
||||
@@ -116,6 +117,7 @@ def save(fd, dominfo, network, live, dst, checkpoint=False, node=-1):
|
||||
if hvm:
|
||||
dominfo.image.saveDeviceModel()
|
||||
|
||||
if line == "suspend":
|
||||
tochild.write("done\n")
|
||||
tochild.flush()
|
||||
log.debug('Written done')
|
||||
|
||||