Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions libvirt/tests/src/virsh_cmd/domain/virsh_domtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import logging as log
import re
import time
import platform

from avocado.utils import process

Expand Down Expand Up @@ -426,11 +427,16 @@ def stop_vm():
utils_time.sync_timezone_linux(vm)
# Sync guest time with host
if channel and agent and not shutdown:
res = virsh.domtime(vm_name, now=restore_time)
if res.exit_status:
session.close()
test.error("Failed to recover guest time:\n%s"
% res)
# Skip time recovery on Power architecture - RTC reinjection not supported
if platform.machine() in ['ppc64', 'ppc64le']:
logging.warning("Skipping time recovery on Power architecture - "
"RTC interrupt reinjection not available")
else:
res = virsh.domtime(vm_name, now=restore_time)
if res.exit_status:
session.close()
test.error("Failed to recover guest time:\n%s"
% res)
session.close()
finally:
# Restore VM XML
Expand Down