Giter VIP home page Giter VIP logo

Comments (3)

StephanStS avatar StephanStS commented on May 25, 2024

Actually I am investigating VBox with different timed sync options and their behaviour at "VBox machine reboot", "VBox machine sleep mode", "PC sleep mode with running VBox machine".

Basically, if you always shutdown your VBox machine, you do not have any problem.
Only in sleep mode situations where the PCs clock runs ahead from the VBox machine clock a time sync problem occurs. This problem can lead to apt update problems (with outdated files).

Depending on the results I assume that "daemon" will be the best recommendation. Results will be described in the installation chapter.

from dietpi-docs.

MichaIng avatar MichaIng commented on May 25, 2024

So VBoxService is running but not syncing the time with the host when exiting sleep mode? Looks like something we should ask at VBox forum. If I remember right, it should sync every 5 minutes drifting and every 20 minutes a full sync. But I'd expect it to sync directly on boot and as well after exiting any system mode where the system clock (or the service) stops.

from dietpi-docs.

StephanStS avatar StephanStS commented on May 25, 2024

Some results so far:

Behaviour

image

A.) Emulated RTC of the VM

Generally, there is a VM emulated RTC (read with hwclock) and a Linux system time (read with date) which basically run independent from each other.

These two clocks can be synchronized to each other with

  • hwclock --systohc (equals to hwclock -w): The emulated RTC is set to the value of the Linux system time.
  • hwclock --hctosys (equals to hwclock -s): The Linux system time is set to the value of the emulated RTC).

B.) Behaviour in regard of vboxadd-service

  1. Without vboxadd-service running (i.e. without VirtualBox Extensions installed)
    • Setting in dietpi-config to all options except Custom works like expected
  2. With vboxadd-service running
    • Having options except Custom leads to an error in systemctl status systemd-timesyncd, also at boot time a timeout for the timesync occurs.
      Stopping then the vboxadd-service (at least removing the symbolic link /usr/sbin/VBoxService which links to /opt/VBoxGuestAdditions-6.1.18/init/vboxadd-service) helps to run options except Custom.
      (Remark: The symbolic link can also be added manually via ln -s /opt/VBoxGuestAdditions-6.1.18/init/vboxadd-service /usr/sbin/VBoxService)
    • t.b.d. What happens if option Custom is set?

C.) Behaviour at suspend/resume (i.e. no shutdown of the LInux system)

General: The hwclock (as well as the system time) is halted and gets a delay to the host PCs time.

Due to VirtualBox's documentation there should be the ability to activate/deactivat the clock time takeover (which time?) at the resume process via
VBoxManage guestproperty set <VM-name> "/VirtualBox/GuestAdd/VBoxService/--timesync-set-on-restore" 0|1

  1. Without vboxadd-service running (i.e. without VirtualBox Extensions installed)

    • Setting in dietpi-config to all options except Custom works like expected
      • If set to option 1 (boot only): No time is corrected after resume
      • If set to option 2, 3: Linux system time is set after 1 hour resp. 1 day (emulated RTC also changed)
      • If set to option 4: Time is set in about 2 minutes after resume (emulated RTC not changed)
    • Generally the fake-hwclock updates the emulated RTC hourly (updates at option 4).
  2. With vboxadd-service running
    T.b.d.

Structural views

Structural view without Guest additions

image

Structural view with Guest additions (in work)

image

@MichaIng: Is the description above o.k.?

from dietpi-docs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.