On 04/30/2017 02:33 AM, Robert Moskowitz wrote:
I have a F21 QEMU image.  Use it for a number of things and not too
interested in updating it.  I like gthumb from back then.  They have
ruined a nice simple image viewer.

Anyway, the issue is system time when I resume the image.  The image was
paused, as I have learned that if I suspend the system without pausing
this QEMU F21 image, said image runs at 100% cpu and will not respond
unless I kill it.   Pausing it avoids this most of the time.

When I reenter the image, the clock is off and it rarely resets.  So far
I have used system-config-time to kick off ntpdate, or whatever it is
using.  This is a time consuming process and it locks the system,
requiring me to reenter my password (which I had to do for
system-config-time).

Is there some cli that I can easily use to reset the time of the image.

Note that the main image, F24 always has the right time.

How about fetching the time from F24 and using that to set the current local time, then leave it up to ntp to make it exact?

Something like:

#!/bin/bash

# fetch date from a current time source
DATE=$(ssh -t user@F24 date +%m%d%H%M%S)

# ssh appends a \r to its results; this will trim it
DATE="${DATE%"${DATE##*[![:space:]]}"}"

# set the date
date $(echo -n $DATE)
_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org

Reply via email to