New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Virtualbox time drift due to missing guest additions #1540
Comments
i found this other repo that has automated updates and is way more recent but its in ruby |
What host operating system are you using? What is the setting of "Paravirtualization Interface" in you virtual machine? Does your host has hardware acceleration and is it enabled? I just tried to reproduce this here, and my virtual machine clock is second accurate even after 6h+. I wonder if this maybe only is a problem in certain environments?
Linux recently added some "native" VirtualBox drivers: https://cateee.net/lkddb/web-lkddb/VBOXGUEST.html. But I don't think that this is enough to get RTC synchronization going. |
Host is windows 10 x64 that kernel driver is the module that guest additions would install but its only a small part of the whole. we need the full guest additions to make time work for everyone. edit: set an automation that sends you a message with that set time and compare to the delivery timestamp |
@agners is there anything I can do to help? I really need time based automations |
@tetsuo55 oh that is super weird. I fear that syncing time will then not even help... Can you add the current time to the message (using |
Can you attach the trace of this automation? |
I think i got it figured out. As for the trace I'll have to wait for the next one because i rebooted the server to figure out this issue. Which brings us back to full guest additions, this should provide the bits needed for cpu clock synching, although i can't find the document i read that in again |
I have found something to test, maybe the paravirtualization has to be set to kvm |
Unfortunately the kvm mode didn't help, maybe made it even worse.
|
Please add me to the list of people having the same issue. Any time triggered automation I have in NodeRed and HA are not anymore reliable. Problem appeared (for me) around 1-2 month. After spending quit some time investigating by downgrading different part of my systems and trying fresh image/install, I can now says that the problem is solely related to release 6.3. Everything work fine with a clean 6.2 install, but I get unsync time with clean install of 6.3. extra info: I'm running HA OS inside a VirtualBox, which run on Ubuntu |
@tetsuo55 from what I can tell in your system, the system time is correct, its just the automation is triggered too late: E.g. You received the message at 8:20, and the message got generated at 8:20:55.289736. The question is, why did the system did not wake up at 8:00 and send it back then? @tetsuo55 can you confirm @guignol8220's observation? E.g. does it help for you to roll back to 6.2? (You can use |
I'm pretty sure i had the issue on 6.1, but i will test this anyway |
Same issue on 6.2
@agners , can you make a test build with that buildroot addon thing? Or maybe a way to install the virtual box additions? |
I found another package, for fedora Linux which is fully up to date. |
I faced the same problem. Running HA OS inside VirtualBox upon Ubuntu, automations triggered by time would drift by many minutes. This solved it for me: https://community.home-assistant.io/t/timebased-automations-completely-out-of-sync/302083/5 I switched “Paravirtualization Interface” to None and the time automations have been accurate since. |
Thanks for sharing @butako! |
I will disable paravirtualization for now too then. |
Agreed disabling paravirtualization is not ideal as a long term solution. What is a bit puzzling to me is that we supported Virtual Box since quite some time, but it only seems to crop up now? Which begs the question, did something change which makes it show up today? I'll try porting the VirtualBox guest addition to Buildroot/HAOS, but its not on-top of my todo list right now. |
Yeah that is strange, I'm a new user of home assistant and this was my first attempt at using time of day based automations so i can't speak for how things were before |
Did anyone find a solution to this problem? EDIT: I'm running VirtualBox 6.1.44. I can't get MacOS to prompt me to allow the kernel modification when installing VirtualBox 7, So I can't upgrade to that, for the moment. |
The only solution is for the guess additions to be added to ha os |
Hardware Environment
I'm using virtualbox on windows 10
Home Assistant OS release:
System Health
Home Assistant Community Store
Home Assistant Cloud
Home Assistant Supervisor
Lovelace
Journal logs:
Kernel logs:
Description of problem:
The issue is that the time drifts which breaks time based automations in they they fire minutes to hours to days later then planned because the clock is lagging.
The cause is that virtualbox requires guest additions to be able to communicate with the host and those aren't included.
When guest additions are installed virtualbox will sync time with the guest every 10 seconds to correct for the drift that occurs due to the guest getting paused by things like host power saving, being too busy to l
Provide the needed cycles on time or the guest being paused.
I found an older repo that has a virtualbox guest additions package for buildroot:
https://github.com/xenogenesi/vbox-buildroot-vagrant/tree/master/package/vbox-ga
Hoping this is enough for this issue to be corrected
The text was updated successfully, but these errors were encountered: