]> xenbits.xensource.com Git - people/vhanquez/xen.git/commitdiff
Fix restore of saved image containing rtc_timeoffset
authorKeir Fraser <keir.fraser@citrix.com>
Mon, 3 Mar 2008 13:41:34 +0000 (13:41 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Mon, 3 Mar 2008 13:41:34 +0000 (13:41 +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>
xen-unstable changeset:   17113:9dd235d6174d1944caf53798a07ecf509678eead
xen-unstable date:        Tue Feb 26 14:35:39 2008 +0000

tools/python/xen/xend/image.py

index c1bbffe07f424e5a3dd25d9bab725fd9841ead27..502760596b81046f325a544d19555a6f05b3fd42 100644 (file)
@@ -192,7 +192,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()