Time-related problems inside Virtual Box, collection of possible solutions #2292
lenaschimmel
started this conversation in
General
Replies: 1 comment
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
There are several problems when running Home Assistant Operating System inside Virtual Box:
sensor.date_time_iso
from platformtime_date
is only updated infrequently (mostly alternating between 3 and 5 minutes between updates) and values were off (by random amounts of several minutes)task.sleep(2)
returned after 2 seconds most of the time, but sometimes slept for more than 30 seconds or even 10 minutes. On average, 100 calls totask.sleep(2)
took about 600 seconds, instead of the expected 200 seconds.rcu_sched
, which may have led to file system corruption in some casesI only experienced symptoms 1, 2 and 3, and for me all of them were solved by setting Paravirtualization = None in Virtual Box.
I did not yet come across reports of the symptoms 2 and 3, but since they might have the same cause, I don't think it's particularly helpful to add more details on them.
I found several issues relating to symptoms 1 and 4, which I'll summarize below. I suspect that all four symptoms may be caused by the same root cause, since they are fixed by the same workaround.
Possible workarounds / solutions
Setting Paravirtualization = None in Virtual Box
Include virtual box additions in the vdi
Enable High Precision Event Timer (HPET) in Virtual Box
Add code to to detect the problem
Other issues and discussions about the same / similar issues
rcu_sched detected stalls on VirtualBox #1705
Home assistant 7.2 not working in Virtual box #1737
Virtualbox time drift due to missing guest additions #1540
Automations triggering late (issue #71278 in home-assistant/core)
rcu_sched detected stalls on CPUs/tasks: linux guest and host ?ryzen issue (Ticket #20131 in VirtualBox)
Beta Was this translation helpful? Give feedback.
All reactions