astro / microvm.nix

NixOS MicroVMs
https://astro.github.io/microvm.nix/
MIT License
1.24k stars 93 forks source link

cannot start guests that use virtiofs with microvm command #266

Open Neon-44 opened 1 month ago

Neon-44 commented 1 month ago

basically #260 but 260 has been fixed if starting via systemd but not if starting via the microvm command

microvm.service needs to wait for microvm-virtiofsd.service, then it works.

the Microvm command doesn't wait for virtiofsd to finish

astro commented 1 month ago

What does start virtiofsd in your case? The systemd service only runs when used through systemd.

That behaviour is buried somewhere in the handbook. Feel free to point to another location where I should document that.

Neon-44 commented 4 weeks ago

When i use systemctl, it starts by itself.

When I use the MicroVM Command, I have to start it myself. I found a Hack by starting the microvm service, stopping it, starting the microvm-virtiofsd service, then running the microvm command.

If i don't do that, the MicroVM won't start and spit out a Error.

Is it possible to integrate the virtiofsd-mounting into the microvm command? I often use the microvm command for troubleshooting new configs.

astro commented 4 weeks ago

I think that would be easily doable in combination with https://github.com/F1bonacc1/process-compose...