From: Keir Fraser Date: Tue, 26 Feb 2008 14:35:39 +0000 (+0000) Subject: Fix restore of saved image containing rtc_timeoffset X-Git-Tag: 3.3.0-rc1~311^2~14 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=e516decc8c8979c6f95856f5d8b349f186e53573;p=xen.git 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 --- diff --git a/tools/python/xen/xend/image.py b/tools/python/xen/xend/image.py index 414bf53d14..210aae1d80 100644 --- a/tools/python/xen/xend/image.py +++ b/tools/python/xen/xend/image.py @@ -390,7 +390,7 @@ class LinuxImageHandler(ImageHandler): ImageHandler.configure(self, vmConfig) rtc_timeoffset = vmConfig['platform'].get('rtc_timeoffset') if rtc_timeoffset is not None: - xc.domain_set_time_offset(self.vm.getDomid(), rtc_timeoffset) + xc.domain_set_time_offset(self.vm.getDomid(), int(rtc_timeoffset)) def buildDomain(self): store_evtchn = self.vm.getStorePort()