Recorder I/O Error on virtualbox

I have a fresh Ubuntu 18.04 running on virtualbox 6.0, in which I’m installing the latest Home assistant docker image (0.88.2).
I map a local directory for the HA conf files with: -v /home/myuser/ha_data:/config
If the /home/myuser directory is a plain directory on the host everything works as expected, but if I export the directory as a shared directory with Virtualbox I get the following errors when starting up Home assistant:

    2019-03-03 18:18:05 ERROR (Recorder) [homeassistant.components.recorder] Error during connection setup: (sqlite3.OperationalError) disk I/O error [SQL: '\nCREATE TABLE events (\n\tevent_id INTEGER NOT NULL, \n\tevent_type VARCHAR(32), \n\tevent_data TEXT, \n\torigin VARCHAR(32), \n\ttime_fired DATETIME, \n\tcreated DATETIME, \n\tcontext_id VARCHAR(36), \n\tcontext_user_id VARCHAR(36), \n\tPRIMARY KEY (event_id)\n)\n\n'] (Background on this error at: http://sqlalche.me/e/e3q8) (retrying in 3 seconds)
2019-03-03 18:18:05 INFO (MainThread) [homeassistant.setup] Setup of domain frontend took 0.5 seconds.
2019-03-03 18:18:08 ERROR (Recorder) [homeassistant.components.recorder] Error during connection setup: (sqlite3.OperationalError) disk I/O error (Background on this error at: http://sqlalche.me/e/e3q8) (retrying in 3 seconds)
2019-03-03 18:18:11 ERROR (Recorder) [homeassistant.components.recorder] Error during connection setup: (sqlite3.OperationalError) disk I/O error (Background on this error at: http://sqlalche.me/e/e3q8) (retrying in 3 seconds)
2019-03-03 18:18:14 ERROR (Recorder) [homeassistant.components.recorder] Error during connection setup: (sqlite3.OperationalError) disk I/O error (Background on this error at: http://sqlalche.me/e/e3q8) (retrying in 3 seconds)
2019-03-03 18:18:15 WARNING (MainThread) [homeassistant.setup] Setup of recorder is taking over 10 seconds.
2019-03-03 18:18:17 ERROR (Recorder) [homeassistant.components.recorder] Error during connection setup: (sqlite3.OperationalError) disk I/O error (Background on this error at: http://sqlalche.me/e/e3q8) (retrying in 3 seconds)
2019-03-03 18:18:20 ERROR (Recorder) [homeassistant.components.recorder] Error during connection setup: (sqlite3.OperationalError) disk I/O error (Background on this error at: http://sqlalche.me/e/e3q8) (retrying in 3 seconds)
2019-03-03 18:18:23 ERROR (Recorder) [homeassistant.components.recorder] Error during connection setup: (sqlite3.OperationalError) disk I/O error (Background on this error at: http://sqlalche.me/e/e3q8) (retrying in 3 seconds)
2019-03-03 18:18:26 ERROR (Recorder) [homeassistant.components.recorder] Error during connection setup: (sqlite3.OperationalError) disk I/O error (Background on this error at: http://sqlalche.me/e/e3q8) (retrying in 3 seconds)
2019-03-03 18:18:29 ERROR (Recorder) [homeassistant.components.recorder] Error during connection setup: (sqlite3.OperationalError) disk I/O error (Background on this error at: http://sqlalche.me/e/e3q8) (retrying in 3 seconds)
2019-03-03 18:18:32 ERROR (Recorder) [homeassistant.components.recorder] Error during connection setup: (sqlite3.OperationalError) disk I/O error (Background on this error at: http://sqlalche.me/e/e3q8) (retrying in 3 seconds)
2019-03-03 18:18:32 INFO (MainThread) [homeassistant.setup] Setup of domain recorder took 27.7 seconds.
2019-03-03 18:18:32 ERROR (MainThread) [homeassistant.setup] Setup failed for recorder: Component failed to initialize.
2019-03-03 18:18:32 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of history. Setup failed for dependencies: recorder
2019-03-03 18:18:32 ERROR (MainThread) [homeassistant.setup] Setup failed for history: Could not set up all dependencies.

Home assistant obviously has write permissions to the directory, the home-assistant_v2.db is there and all other files. HA runs as expected, except for the recorder component.

Has anyone seen this before, and is there a workaround? Would be good to easily edit my config files form my host.

I think this has to do with the permissions (docker volume > vagrant mounted directory > local filesystem)

Since I’m mostly using VirtualBox to test my config and I don’t mind losing the history, I’ve temporarily solved it with:

recorder:
  db_url: sqlite:////tmp/home-assistant.db