Reviewed-by: Laszlo Ersek <lersek(a)redhat.com>
---
output/create_libvirt_xml.ml | 6 ++++++
tests/test-v2v-i-ova.xml | 1 +
2 files changed, 7 insertions(+)
diff --git a/output/create_libvirt_xml.ml b/output/create_libvirt_xml.ml
index 12586fde17..30119d1357 100644
--- a/output/create_libvirt_xml.ml
+++ b/output/create_libvirt_xml.ml
@@ -294,8 +294,14 @@ let create_libvirt_xml ?pool source inspect
List.push_back_list os loader;
e "os" [] !os in
+ (* The <clock> section. *)
+ let clock_section =
+ let offset = if guestcaps.gcaps_rtc_utc then "utc" else
"localtime" in
+ e "clock" [ "offset", offset ] [] in
+
List.push_back_list body [
os_section;
+ clock_section;
e "on_poweroff" [] [PCData "destroy"];
e "on_reboot" [] [PCData "restart"];
diff --git a/tests/test-v2v-i-ova.xml b/tests/test-v2v-i-ova.xml
index e5907ea1cc..a41827bfd5 100644
--- a/tests/test-v2v-i-ova.xml
+++ b/tests/test-v2v-i-ova.xml
@@ -18,6 +18,7 @@
<os>
<type arch='x86_64' machine='q35'>hvm</type>
</os>
+ <clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
--
2.41.0