ia64/xen-unstable

changeset 17117:9dd235d6174d

Fix restore of saved image containing rtc_timeoffset

Saved images contain rtc_timeoffset as a string value, resulting in a
TypeError exception when calling xc.domain_set_time_offset() on
restore. Cast rtc_timeoffset to int before calling
xc.domain_set_time_offset().

Signed-off-by: Jim Fehlig <jfehlig@novell.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Feb 26 14:35:39 2008 +0000 (2008-02-26)
parents b6323bf8dae0
children 2749d15c7410
files tools/python/xen/xend/image.py
line diff
     1.1 --- a/tools/python/xen/xend/image.py	Tue Feb 26 14:34:50 2008 +0000
     1.2 +++ b/tools/python/xen/xend/image.py	Tue Feb 26 14:35:39 2008 +0000
     1.3 @@ -390,7 +390,7 @@ class LinuxImageHandler(ImageHandler):
     1.4          ImageHandler.configure(self, vmConfig)
     1.5          rtc_timeoffset = vmConfig['platform'].get('rtc_timeoffset')
     1.6          if rtc_timeoffset is not None:
     1.7 -            xc.domain_set_time_offset(self.vm.getDomid(), rtc_timeoffset)
     1.8 +            xc.domain_set_time_offset(self.vm.getDomid(), int(rtc_timeoffset))
     1.9  
    1.10      def buildDomain(self):
    1.11          store_evtchn = self.vm.getStorePort()