我有一台Debian机器,我想在其中运行一个Ubuntu LXC容器。我成功地跟踪了this guide,但最终没有网络。
然后我尝试使用this,但我想我在LXC安装上弄坏了什么东西。下面是我执行的步骤:
将这些行添加到/etc/lxc/default.conf
lxc.net.0.type = veth
lxc.net.0.link = virbr0
lxc.net.0.flags = up
# you can leave these lines as they were:
lxc.apparmor.profile = generated
lxc.apparmor.allow_nesting = 1然后:
$ $ sudo apt-get install -y libvirt-clients libvirt-daemon-system iptables ebtables dnsmasq-base libxml2-utils iproute2
$ sudo virsh net-start default
$ sudo virsh net-autostart default在那之后,每当我尝试启动我的容器时,我都会得到以下结果:
$ sudo lxc-start -n ubuntu01 -d
lxc-start: ubuntu01: lxccontainer.c: wait_on_daemonized_start: 842 Received container state "STOPPING" instead of "RUNNING"
lxc-start: ubuntu01: tools/lxc_start.c: main: 330 The container failed to start
lxc-start: ubuntu01: tools/lxc_start.c: main: 333 To get more details, run the container in foreground mode
lxc-start: ubuntu01: tools/lxc_start.c: main: 336 Additional information can be obtained by setting the --logfile and --logpriority options我做错了什么,我该如何改正?
发布于 2021-09-02 12:57:37
如果你正在使用Debian11牛眼(当前的稳定版),你应该使用$ lxc-unpriv-start -n ubuntu01
https://stackoverflow.com/questions/68323169
复制相似问题