Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create() panics #32

Open
michaelhenkel opened this issue Dec 1, 2023 · 4 comments
Open

create() panics #32

michaelhenkel opened this issue Dec 1, 2023 · 4 comments

Comments

@michaelhenkel
Copy link

Hi,

I'm trying the unmodified demo.rs. Binary compiles fine but trying to run gives me:

thread 'main' panicked at src/main.rs:13:14:
Failed to create container rootfs: Error { num: 0, str: "" }
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

Any idea?

@sanpii
Copy link
Owner

sanpii commented Dec 1, 2023

Have you started the lxc service?

@michaelhenkel
Copy link
Author

from what I can tell, yes:

snap services Service Startup Current Notes lxd.activate enabled inactive - lxd.daemon enabled active socket-activated lxd.user-daemon enabled inactive socket-activated

CLI based creation of containers and vms work. Is there any other service I need to start? In snap or apt repos there doesn't seem to be any additional lxc service.

Thanks!

@michaelhenkel
Copy link
Author

sorry, lxc service is started but in "exited" state

systemctl status lxc
● lxc.service - LXC Container Initialization and Autoboot Code
Loaded: loaded (/lib/systemd/system/lxc.service; enabled; preset: enabled)
Active: active (exited) since Fri 2023-12-01 16:11:06 UTC; 38s ago
Docs: man:lxc-autostart
man:lxc
Process: 104086 ExecStartPre=/usr/lib/x86_64-linux-gnu/lxc/lxc-apparmor-load (code=exited, status=0/SUCCESS)
Process: 104095 ExecStart=/usr/lib/x86_64-linux-gnu/lxc/lxc-containers start (code=exited, status=0/SUCCESS)
Main PID: 104095 (code=exited, status=0/SUCCESS)
CPU: 36ms

Dec 01 16:11:06 5b3s30 systemd[1]: Starting lxc.service - LXC Container Initialization and Autoboot Code...
Dec 01 16:11:06 5b3s30 systemd[1]: Finished lxc.service - LXC Container Initialization and Autoboot Code.

@sanpii
Copy link
Owner

sanpii commented Dec 3, 2023

My bad, you don’t need to start the lxc service, but you need to have privileges (Creating unprivileged containers as a user or running example has root).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants