]> xenbits.xensource.com Git - xen.git/commitdiff
Fix restore of saved image containing rtc_timeoffset
authorKeir Fraser <keir.fraser@citrix.com>
Tue, 26 Feb 2008 14:35:39 +0000 (14:35 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Tue, 26 Feb 2008 14:35:39 +0000 (14:35 +0000)
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>
tools/python/xen/xend/image.py

index 414bf53d14a9c2b796c7c73f0a3e96672680cf8a..210aae1d80fcb2939fb85be36751db7891108321 100644 (file)
@@ -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()