From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jim Fehlig Subject: [PATCH] Fix restore of saved image containing rtc_timeoffset Date: Mon, 25 Feb 2008 13:43:02 -0700 Message-ID: <47C32856.7010008@novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------060400080909080806090905" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --------------060400080909080806090905 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 --------------060400080909080806090905 Content-Type: text/x-patch; name="xend-restore.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="xend-restore.diff" diff -r 854b4e5a009f tools/python/xen/xend/image.py --- a/tools/python/xen/xend/image.py Tue Feb 05 16:42:18 2008 -0700 +++ b/tools/python/xen/xend/image.py Mon Feb 25 13:26:56 2008 -0700 @@ -354,7 +354,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() --------------060400080909080806090905 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --------------060400080909080806090905--