Hello!
I originally posted a question in the Linux Containers forum, but this error only pops up when running snapcraft
, so I figured I’d also ask here.
Please check the original forum post for more information:
I tried to remove snapcraft (sudo snap remove --purge snapcraft
) and reinstall it (sudo snap install snapcraft --classic
), but I still get the same error:
$ snapcraft
Launching instance... Traceback (most recent call last):
File "/snap/snapcraft/8567/lib/python3.8/site-packages/craft_providers/lxd/lxc.py", line 549, in launch
self._run_lxc(
File "/snap/snapcraft/8567/lib/python3.8/site-packages/craft_providers/lxd/lxc.py", line 98, in _run_lxc
return subprocess.run(lxc_cmd, check=check, stdin=stdin.value, **kwargs)
File "/snap/snapcraft/8567/usr/lib/python3.8/subprocess.py", line 516, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['lxc', '--project', 'snapcraft', 'launch', 'craft-com.ubuntu.cloud-buildd:core22', 'local:snapcraft-xxx-on-amd64-for-amd64-47979909', '--config', 'raw.idmap=both 1000 0', '--config', 'security.syscalls.intercept.mknod=true']' returned non-zero exit status 1.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/snap/snapcraft/8567/bin/snapcraft", line 8, in <module>
sys.exit(run())
File "/snap/snapcraft/8567/lib/python3.8/site-packages/snapcraft/cli.py", line 228, in run
_run_dispatcher(dispatcher)
File "/snap/snapcraft/8567/lib/python3.8/site-packages/snapcraft/cli.py", line 204, in _run_dispatcher
dispatcher.run()
File "/snap/snapcraft/8567/lib/python3.8/site-packages/craft_cli/dispatcher.py", line 448, in run
return self._loaded_command.run(self._parsed_command_args)
File "/snap/snapcraft/8567/lib/python3.8/site-packages/snapcraft/commands/lifecycle.py", line 259, in run
super().run(parsed_args)
File "/snap/snapcraft/8567/lib/python3.8/site-packages/snapcraft/commands/lifecycle.py", line 132, in run
parts_lifecycle.run(self.name, parsed_args)
File "/snap/snapcraft/8567/lib/python3.8/site-packages/snapcraft/parts/lifecycle.py", line 208, in run
_run_command(
File "/snap/snapcraft/8567/lib/python3.8/site-packages/snapcraft/parts/lifecycle.py", line 249, in _run_command
_run_in_provider(project, command_name, parsed_args)
File "/snap/snapcraft/8567/lib/python3.8/site-packages/snapcraft/parts/lifecycle.py", line 530, in _run_in_provider
with provider.launched_environment(
File "/snap/snapcraft/8567/usr/lib/python3.8/contextlib.py", line 113, in __enter__
return next(self.gen)
File "/snap/snapcraft/8567/lib/python3.8/site-packages/craft_providers/lxd/lxd_provider.py", line 126, in launched_environment
instance = launch(
File "/snap/snapcraft/8567/lib/python3.8/site-packages/craft_providers/lxd/launcher.py", line 205, in launch
instance.launch(
File "/snap/snapcraft/8567/lib/python3.8/site-packages/craft_providers/lxd/lxd_instance.py", line 407, in launch
self.lxc.launch(
File "/snap/snapcraft/8567/lib/python3.8/site-packages/craft_providers/lxd/lxc.py", line 557, in launch
raise LXDError(
craft_providers.lxd.errors.LXDError: Failed to launch instance 'snapcraft-xxx-on-amd64-for-amd64-47979909'.
* Command that failed: "lxc --project snapcraft launch craft-com.ubuntu.cloud-buildd:core22 local:snapcraft-xxx-on-amd64-for-amd64-47979909 --config 'raw.idmap=both 1000 0' --config security.syscalls.intercept.mknod=true"
* Command exit code: 1
* Command output: b'Creating snapcraft-xxxc-on-amd64-for-amd64-47979909\n'
* Command standard error output: b'Error: Failed instance creation: Failed creating instance record: Failed initialising instance: Invalid devices: Failed detecting root disk device: No root device could be found\n'
Help!