sync guest time

Miguel Duarte de Mora Barroso mdbarroso at redhat.com
Thu Apr 30 11:52:12 UTC 2020


Hi,

I'm seeing the following issue when attempting to update the guest's
clock on a running fc32 guest (using guest agent):

```
[root at virt-launcher-vmi-masquerade-mh2xm /]# virsh domtime 1 --pretty
Time: 2020-04-30 23:27:29
[root at virt-launcher-vmi-masquerade-mh2xm /]# virsh domtime 1 --sync
error: internal error: unable to execute QEMU agent command
'guest-set-time': hwclock failed to set hardware clock to system time

# now, this one works.
[root at virt-launcher-vmi-masquerade-mh2xm /]# virsh domtime 1 --now

[root at virt-launcher-vmi-masquerade-44v2x /]# virsh domtime 1 --pretty
Time: 2020-04-30 11:15:45

```

This is the simplest reproducer I could come with; the original issue
is this call to libvirt's `setTIme` in [0].

Is there any workaround I could try ? Am I doing something wrong here ?

[0] - https://github.com/kubevirt/kubevirt/blob/6bb516148ce4c29825ae74f473e0220753c3767d/pkg/virt-launcher/virtwrap/manager.go#L533





More information about the libvirt-users mailing list