Skip to contentSkip to conversation

Fix restore of saved image containing rtc_timeoffset

PATCH New Jim Fehlig 1 participant 1 message Feb 25, 2008

lore
Share & tools
lore

Jim Fehlig

author
#0 lore raw

PATCH 1/1 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().

tools/python/xen/xend/image.py +1 -1
diff -r 854b4e5a009f tools/python/xen/xend/image.py
@@ -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()

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel