[PATCH] Fix localtime handling for Xen-PV domains

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At least Xen-3.4.3 translates the /vm/localtime SXPR value to
/domain/platform/localtime and /domain/image/{linux,hvm}/localtime when
the domain is defined.  When reading back that information libvirt only
handles HVM domains, but not PV domains: This results in libvirtd always
returning
	<clock offset="utc"/>
while Xend used (localtime 1).

For PV domains use /domain/image/linux/localtime.

Signed-off-by: Philipp Hahn <hahn@xxxxxxxxxxxxx>
---
This is tracked at <https://forge.univention.org/bugzilla/show_bug.cgi?id=22321>
---
 src/xenxs/xen_sxpr.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/xenxs/xen_sxpr.c b/src/xenxs/xen_sxpr.c
index 1f5be5f..ff8326f 100644
--- a/src/xenxs/xen_sxpr.c
+++ b/src/xenxs/xen_sxpr.c
@@ -1195,6 +1195,9 @@ xenParseSxpr(const struct sexpr *root,
             def->clock.ntimers = 1;
             def->clock.timers[0] = timer;
         }
+    } else { /* !hvm */
+        if (sexpr_int(root, "domain/image/linux/localtime"))
+            def->clock.offset = VIR_DOMAIN_CLOCK_OFFSET_LOCALTIME;
     }
 
     /* Current XenD allows localtime here, for PV and HVM */
-- 
1.7.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]