0

I've created a container using lxc launch ubuntu:16.04. My host machine is ubuntu 16.04 as well. The container is running:

enter image description here

But when I run lxc-stop like this:

» lxc-stop ideal-bluejay

I get the output

ideal-bluejay is not running

I think this could be because I used newgrp lxd after adding myself to lxd group instead of just logging out and back in again while following ubuntu's lxd guide

I've since logged in and out, and even rebooted the computer. I was able to stop two previously-running containers (surprisingly, they were still running after the reboot, there might be some default checkpointing-and-restore going on). But I'm not able to stop this container which I just launched in this session.


Additional Info: In case if using lxc without logging out after adding myself to lxd group is indeed a problem, then it may help to knowthat I'm not able to destroy the stopped containers either.

On running

» lxc-destroy valid-anemone

I get the output

lxc-destroy: conf.c: userns_exec_full: 4163 No mapping for container root found
lxc-destroy: lxccontainer.c: container_destroy: 2707 Error destroying container directory for valid-anemone
Destroying valid-anemone failed
  • note: "lxc-stop" (LXC) is not "lxc stop" (LXD), perhaps they aren't using the same default environment. – A.B Nov 06 '19 at 07:24
  • @A.B wow, that was indeed the issue. Trying this would've been the last thing on my mind. Please post this as an answer so that I can accept it! – Peeyush Kushwaha Nov 07 '19 at 21:27
  • While I know quite some stuff about LXC, I don't know much about LXD. I'd prefer to put an answer describing how each handles its configuration, but I'm not up to do this for LXD. I don't mind at all if you add an answer yourself. Btw, the LXC and LXD tags should already give a hint about this. – A.B Nov 07 '19 at 21:32

0 Answers0