NixOS as a VirtualBox guest

So after being rather unsatisfied with Linux gaming, I’ve bought another SSD and installed Windows there, for dual booting purposes. But there’s also the option of Windows hosting the NixOS disk as a guest (with a raw vmdk). That’s easy enough to setup (create vmdk, check EFI box, add disk to VM) and kind of works, just 2 issues:

  • The guest additions don’t seem to be detected (virtualisation.virtualbox.guest.enable=true)

They are running though:

ps aux | grep VBox
root       111  0.0  0.0      0     0 ?        I<   19:37   0:00 [iprt-VBoxWQueue]
root       595  0.0  0.0      0     0 ?        I<   19:37   0:00 [iprt-VBoxWQueue]
root       596  0.0  0.0      0     0 ?        S    19:37   0:00 [iprt-VBoxTscThr]
root       745  0.0  0.0 349604  3476 ?        Ssl  19:37   0:00 VBoxService --foreground
user      1407  0.0  0.0 139856   504 ?        S    19:38   0:00 /nix/store/j27zsksdmqag5n07rysjn7rj3smnhdld-VirtualBox-GuestAdditions-5.2.28-5.0.18/bin/VBoxClient --clipboard
user      1409  0.0  0.0 206232  3944 ?        Sl   19:38   0:00 /nix/store/j27zsksdmqag5n07rysjn7rj3smnhdld-VirtualBox-GuestAdditions-5.2.28-5.0.18/bin/VBoxClient --clipboard
user      1418  0.0  0.0 139856   504 ?        S    19:38   0:00 /nix/store/j27zsksdmqag5n07rysjn7rj3smnhdld-VirtualBox-GuestAdditions-5.2.28-5.0.18/bin/VBoxClient --display
user      1419  0.0  0.0 139988  2748 ?        S    19:38   0:00 /nix/store/j27zsksdmqag5n07rysjn7rj3smnhdld-VirtualBox-GuestAdditions-5.2.28-5.0.18/bin/VBoxClient --display
user      1424  0.0  0.0 139856   508 ?        S    19:38   0:00 /nix/store/j27zsksdmqag5n07rysjn7rj3smnhdld-VirtualBox-GuestAdditions-5.2.28-5.0.18/bin/VBoxClient --seamless
user      1425  0.0  0.0 206064  2340 ?        Sl   19:38   0:00 /nix/store/j27zsksdmqag5n07rysjn7rj3smnhdld-VirtualBox-GuestAdditions-5.2.28-5.0.18/bin/VBoxClient --seamless
user      1430  0.0  0.0 139856   504 ?        S    19:38   0:00 /nix/store/j27zsksdmqag5n07rysjn7rj3smnhdld-VirtualBox-GuestAdditions-5.2.28-5.0.18/bin/VBoxClient --draganddrop
user      1431  0.0  0.0 206580  2396 ?        Sl   19:38   0:00 /nix/store/j27zsksdmqag5n07rysjn7rj3smnhdld-VirtualBox-GuestAdditions-5.2.28-5.0.18/bin/VBoxClient --draganddrop
user      1693  0.0  0.0 129000  2636 pts/0    S+   19:52   0:00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn VBox

Their version is a bit behind that of the VirtualBox host (6.0.8), but according to the documentation this shouldn’t be an issue.

  • No new boot entries can be created: "could not sync /boot: Unknown error -1

This is probably emitted by this line and it seems to be a timeout. I can read and write files in /boot though - no idea where the issue is.

Any ideas how to fix this? I don’t really want to be running a Windows host, but this seems like a decent workaround if good performance in the Linux VM isn’t necessary …