Obstacles with Snapping Electron Apps Tutorial

Hi, I’m pretty new to Snap and been running into some issues. I’m running Snap on Ubuntu 20.04.2 LTS on VirtualBox running on a 2018 i7 Macbook Pro. I’d like to launch this electron app packaged in a snap to a virtual machine running on AWS.

I was able to run a snap of electron-quick-start which is part of another tutorial. I reached this part of the tutorial where they provided a yaml to run. I saved it as snap/snapcraft.yaml and ran the command “snapcraft” and ran into a couple of errors.

Launching a VM.
info failed: The following errors occurred:
instance “snapcraft-electron-hello-world-kiosk” does not exist
launch failed: CPU does not support KVM extensions.
An error occurred with the instance when trying to launch with ‘multipass’: returned exit code 2.
Ensure that ‘multipass’ is setup correctly and try again.

Would appreciate help on this.

Make sure the settings for the VM has nested virtualization enabled, although I think Virtual box might only support AMD with nested virtualization unless it’s changed recently. In which case consider using LXD to build with as per https://snapcraft.io/docs/build-on-lxd

If you cannot enable nested virtualization for virtualbox, you can brew install snapcraft on MacOS.

Alternatively, if you want to work within the Ubuntu VM, consider using --use-lxd to use containers instead of Multipass VMs, no nested virtualization required.