I have a problem when running snapcraft. After snapcraft has finished I can not launch virtual machines via Virtualbox:
In order to launch a virtual machine I need to issue first
$ snapcraft clean
after which virtual machines can be started as normal. This works but is very annoying since I use virtual machines for testing modified snaps. So when I make modifications to the snap and re-run snapcraft it needs to re-create the snap from scratch which takes ages.
Is there a simpler way to release the hypervisor from snapcraft so I can launch virtual machines without having to clean the whole snap?
This is in fcat not snapcraft blocking your hypervisor, but the multipass VM … you can make snapcraft use lxd containers instead of multipass …
$ sudo snap install lxd
$ sudo lxd init --auto
now you should be able to use snapcraft with the --use-lxd option (you might need to log out and back in again to be in the newly added lxd group so you do not need sudo for unprivileged containers) so your builds run in an lxd container and do not touch the hypervisor at all …