Remus: Make checkpoint buffering HVM-aware

Signed-off-by: Brendan Cully <brendan@cs.ubc.ca>
This commit is contained in:
Keir Fraser committed 2009-11-09 19:19:27 +00:00
1 parent 2cdf23dd60
commit ad91d3c17b
2 files changed
+287 -116

No files matched your search

-20
View File
@@ -323,26 +323,6 @@ def restore(xd, fd, dominfo = None, paused = False, relocating = False):
if not is_hvm and handler.console_mfn is None:
raise XendError('Could not read console MFN')
# get qemu state and create a tmp file for dm restore
# Even PV guests may have QEMU stat, but its not currently
# used so only bother with HVM currently.
if is_hvm:
qemu_signature = read_exact(fd, len(QEMU_SIGNATURE),
"invalid device model signature read")
if qemu_signature != QEMU_SIGNATURE:
raise XendError("not a valid device model state: found '%s'" %
qemu_signature)
qemu_fd = os.open("/var/lib/xen/qemu-save.%d" % dominfo.getDomid(),
os.O_WRONLY | os.O_CREAT | os.O_TRUNC)
while True:
buf = os.read(fd, dm_batch)
if len(buf):
write_exact(qemu_fd, buf,
"could not write dm state to tmp file")
else:
break
os.close(qemu_fd)
restore_image.setCpuid()
# xc_restore will wait for source to close connection
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.