HVM save/restore issue
all,
there are 2 issues of HVM save/restore:
1. restore would cause a type dismatch exception, which can be fixed by attached patch.
2. a saved sdl guest change to vnc after restore as "console_refs" are not empty and "devices" has a new added "vfb" device, which is different from create process.
can anybody help to fix this W/O breaking vfb?
thanks a lot.
Signature · 2 lines
best rgds, edwin
Fix the python type dismatch exception when HVM restore
tools/python/xen/xend/XendCheckpoint.py +2 -2
@@ -193,8 +193,8 @@ def restore(xd, fd, dominfo = None, paus is_hvm = dominfo.info.is_hvm() if is_hvm: hvm = dominfo.info['memory_static_min'] - apic = dominfo.info['platform'].get('apic', 0) - pae = dominfo.info['platform'].get('pae', 0) + apic = int(dominfo.info['platform'].get('apic', 0)) + pae = int(dominfo.info['platform'].get('pae', 0)) log.info("restore hvm domain %d, mem=%d, apic=%d, pae=%d", dominfo.domid, hvm, apic, pae) else:
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 4 lines · Edwin
all,
there are 2 issues of HVM save/restore:
1. restore would cause a type dismatch exception, which can be fixed by attached patch.
I can't reproduce this exception.
tools/python/xen/xend/XendCheckpoint.py def restore(xd, fd, dominfo = None, paus · line 197
Quoted 6 lines
if
is_hvm:
hvm = dominfo.info['memory_static_min']tools/python/xen/xend/XendCheckpoint.py +2
-2- apic = dominfo.info['platform'].get('apic', 0) - pae = dominfo.info['platform'].get('pae', 0) + apic = int(dominfo.info['platform'].get('apic', 0)) + pae = int(dominfo.info['platform'].get('pae', 0))
AFAICS, 'apic' and 'pae' are mapped through str() when they're used, so I don't see that it helps to cast them to integers now.
Is there a reason you don't pass 'hvm' through int() as well?
Cheers,
Tim.
Signature · 2 lines
Tim Deegan <[email protected]>, XenSource UK Limited Registered office c/o EC2Y 5EB, UK; company number 05334508
Quoted 7 lines · Tim Deegan
Quoted 4 lines · Edwin
all,
there are 2 issues of HVM save/restore:
1. restore would cause a type dismatch exception, which can be fixed by attached patch.I can't reproduce this exception.
i can still reproduce on staging tree r14401.
trace log
====================================================
[2007-03-16 13:32:22 5071] ERROR (XendDomain:1034) Restore failed Traceback (most recent call last):
File "/usr/lib64/python/xen/xend/XendDomain.py", line 1029, indomain_restore_fd
return XendCheckpoint.restore(self, fd, paused=paused)
File "/usr/lib64/python/xen/xend/XendCheckpoint.py", line 199, in restore
dominfo.domid, hvm, apic, pae)
File "/usr/lib64/python2.3/logging/__init__.py", line 893, in info
apply(self._log, (INFO, msg, args), kwargs)
File "/usr/lib64/python2.3/logging/__init__.py", line 994, in _log
self.handle(record)
File "/usr/lib64/python2.3/logging/__init__.py", line 1004, in handle
self.callHandlers(record)
File "/usr/lib64/python2.3/logging/__init__.py", line 1037, in callHandlers
hdlr.handle(record)
File "/usr/lib64/python2.3/logging/__init__.py", line 592, in handle
self.emit(record)
File "/usr/lib64/python2.3/logging/handlers.py", line 102, in emit
msg = "%s\n" % self.format(record)
File "/usr/lib64/python2.3/logging/__init__.py", line 567, in format
return fmt.format(record)
File "/usr/lib64/python2.3/logging/__init__.py", line 362, in format
record.message = record.getMessage()
File "/usr/lib64/python2.3/logging/__init__.py", line 233, in getMessage
msg = msg % self.args
TypeError: int argument required
Quoted 11 lines
tools/python/xen/xend/XendCheckpoint.py def restore(xd, fd, dominfo = None, paus · line 197
Quoted 7 lines
if
is_hvm:
hvm = dominfo.info['memory_static_min']tools/python/xen/xend/XendCheckpoint.py +2
-2- apic = dominfo.info['platform'].get('apic', 0) - pae = dominfo.info['platform'].get('pae', 0) + apic = int(dominfo.info['platform'].get('apic', 0)) + pae = int(dominfo.info['platform'].get('pae', 0))AFAICS, 'apic' and 'pae' are mapped through
str()when they're used, so I don't see that it helps to cast them to integers now.
Is there a reason you don't pass 'hvm' throughint()as well?
change the "apic=%d" to "%s" is also okay. hvm is int as it come from dominfo.info['memory_static_min'].
thanks,
Quoted 9 lines
Cheers,
Tim.
Signature · 2 lines
Tim Deegan <[email protected]>, XenSource UK Limited Registered office c/o EC2Y 5EB, UK; company number 05334508
Signature · 2 lines
best rgds, edwin
Quoted 5 lines · Edwin
Quoted 2 lines · Tim Deegan
I can't reproduce this exception.
i can still reproduce on staging tree r14401.
My apologies - I hadn't got the logging level turned up high enough to trigger that line (mutter mutter compile-time type-checking mutter).
Tim.
Signature · 2 lines
Tim Deegan <[email protected]>, XenSource UK Limited Registered office c/o EC2Y 5EB, UK; company number 05334508
Quoted 8 lines
Quoted 4 lines · Edwin
Quoted 1 line · Tim Deegan
I can't reproduce this exception.
i can still reproduce on staging tree r14401.
My apologies - I hadn't got the logging level turned up high enough to trigger that line (mutter mutter compile-time type-checking mutter).
Aren't we running pylint on the code? Seems to catch the kinds of errors you'd usually want a compiler to catch.
If it's anything like C lint there might need to be some filtering of the output though ;-)
Cheers,
Mark
Signature · 4 lines
Dave: Just a question. What use is a unicyle with no seat? And no pedals! Mark: To answer a question with a question: What use is a skateboard? Dave: Skateboards have wheels. Mark: My wheel has a wheel!
Quoted 6 lines · Mark Williamson
Quoted 6 lines
Quoted 4 lines · Edwin
Quoted 1 line · Tim Deegan
I can't reproduce this exception.
i can still reproduce on staging tree r14401.
Quoted 8 lines
Quoted 2 lines
My apologies - I hadn't got the logging level turned up high enough to trigger that line (mutter mutter compile-time type-checking mutter).
Aren't we running pylint on the code? Seems to catch the kinds of errors you'd usually want a compiler to catch.
If it's anything like C lint there might need to be some filtering of the output though ;-)
There is a pylintrc in tools/python, but the output is far too noisy to be useful as an automated check. I pick through it every now and again.
Ewan.