extra-container icon indicating copy to clipboard operation
extra-container copied to clipboard

Failed to create container on Ubuntu 20.04.2 LTS

Open aanderse opened this issue 3 years ago • 0 comments

Hello :wave:

I run an example from the website:

sudo extra-container create --start <<'EOF'
{
  containers.foobar = {
    privateNetwork = true;
    hostAddress = "10.250.0.1";
    localAddress = "10.250.0.2";

    config = { pkgs, ... }: {
      systemd.services.hello = {
        wantedBy = [ "multi-user.target" ];
        script = ''
          while true; do
            echo hello | ${pkgs.netcat}/bin/nc -lN 50
          done
        '';
      };
      networking.firewall.allowedTCPPorts = [ 50 ];
    };
  };
}
EOF

The container fails to start, though. Here is the error:

container foobar[3550533]: Spawning container foobar on /var/lib/containers/foobar.
container foobar[3550533]: Press ^] three times within 1s to kill container.
container foobar[3550539]: /etc/localtime does not point into /usr/share/zoneinfo/, not updating container timezone.
container foobar[3550540]: Failed to mount sysfs (type sysfs) on /sys/full (MS_RDONLY|MS_NOSUID|MS_NODEV|MS_NOEXEC ""): No such file or directory
container foobar[3550533]: Failed to register machine: Machine 'foobar' already exists
systemd[1]: [email protected]: Main process exited, code=exited, status=1/FAILURE

A few points:

  • Failed to register machine: Machine 'foobar' already exists - I have never created a foobar container on this machine before
  • Failed to mount sysfs (type sysfs) on /sys/full (MS_RDONLY|MS_NOSUID|MS_NODEV|MS_NOEXEC ""): No such file or directory - /sys/full doesn't exist... should it?

Do you have any ideas on how to resolve this? Any and all help is greatly appreciated :bow:

Thanks!

aanderse avatar Apr 01 '22 15:04 aanderse