Error when run inside a VM without --use-lxd

Bug #1830369 reported by Evan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snapcraft
New
Undecided
Unassigned

Bug Description

snapcraft 3.5

Snapcraft tries to set up and use multipass when already inside a VM. It should error and tell the user they must run with --use-lxd as snapcraft cannot run its build VM nested inside another VM.

evan@evan-VirtualBox:~$ which snapcraft
evan@evan-VirtualBox:~$ snap list
No snaps are installed yet. Try "snap install hello-world".
evan@evan-VirtualBox:~$ sudo snap install --classic snapcraft
[sudo] password for evan:
2019-05-24T13:43:37+01:00 INFO Waiting for restart...
snapcraft 3.5 from 'canonical' installed
evan@evan-VirtualBox:~$ mkdir example
evan@evan-VirtualBox:~$ cd example/
evan@evan-VirtualBox:~/example$ snapcraft init
Created snap/snapcraft.yaml.
Go to https://docs.snapcraft.io/the-snapcraft-format/8337 for more information about the snapcraft.yaml format.
evan@evan-VirtualBox:~/example$ cat snap/snapcraft.yaml
name: my-snap-name # you probably want to 'snapcraft register <name>'
base: core18 # the base snap is the execution environment for this snap
version: '0.1' # just for humans, typically '1.2+git' or '1.3.2'
summary: Single-line elevator pitch for your amazing snap # 79 char long summary
description: |
  This is my-snap's description. You have a paragraph or two to tell the
  most important story about your snap. Keep it under 100 words though,
  we live in tweetspace and your description wants to look good in the snap
  store.

grade: devel # must be 'stable' to release into candidate/stable channels
confinement: devmode # use 'strict' once you have the right plugs and slots

parts:
  my-part:
    # See 'snapcraft plugins'
    plugin: nil
evan@evan-VirtualBox:~/example$ snapcraft
Using 'snap/snapcraft.yaml': Project assets will be searched for from the 'snap' directory.
Support for 'multipass' needs to be set up. Would you like to do that it now? [y/N]: y
snapd is not logged in, snap install commands will use sudo
multipass (beta) 0.6.1 from Canonical✓ installed
Waiting for multipass...
Launching a VM.
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.

Evan (ev)
summary: - snapcraft on Ubuntu 16.04
+ Error when run inside a VM without --use-lxd
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.