--- output/create_libvirt_xml.ml | 10 ++++++++-- tests/test-v2v-i-ova.xml | 1 + 2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/output/create_libvirt_xml.ml b/output/create_libvirt_xml.ml index 964acd25fd..f97272ca31 100644 --- a/output/create_libvirt_xml.ml +++ b/output/create_libvirt_xml.ml @@ -292,10 +292,16 @@ let create_libvirt_xml ?pool source inspect e "nvram" ["template", vars_template] [] ] in List.push_back_list os loader; - !os in + e "os" [] !os in + + (* The <clock> section. *) + let clock_section = + let offset = if guestcaps.gcaps_bios_utc then "utc" else "localtime" in + e "clock" [ "offset", offset ] [] in List.push_back_list body [ - e "os" [] os_section; + 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 _______________________________________________ Libguestfs mailing list Libguestfs@redhat.com https://listman.redhat.com/mailman/listinfo/libguestfs