【问题标题】:Unable to launch vagrant-lxc无法启动 vagrant-lxc
【发布时间】:2016-06-04 04:16:18
【问题描述】:

我正在尝试在 Ubuntu 14.04 上启动 vagrant-lxc。我正在使用最新的 Vagrant 下载(而不是 Debian 存储库中的旧版本)。

vagrant plugin install vagrant-lxc

成功运行,如下所示:

vagrant init fgrehm/precise64-lxc

我跑了

sudo vagrant lxc sudoers

处理here 中提到的 sudo 问题。 但是当我跑步时

vagrant up --provider=lxc

(有和没有 sudo)容器不加载,吐出这个:

> Bringing machine 'default' up with 'lxc' provider...
==> default: Checking if box 'fgrehm/precise64-lxc' is up to date...
==> default: Setting up mount entries for shared folders...
    default: /vagrant => /home/ubuntu
==> default: Starting container...
There was an error executing ["sudo", "/usr/local/bin/vagrant-lxc-wrapper", "lxc-start", "-d", "--name", "ubuntu_default_1456156125505_47833"]

For more information on the failure, enable detailed logging by
setting the environment variable VAGRANT_LOG to DEBUG

这是我得到的日志输出(来自 /var/log/lxc/ubuntu_default_1456156125505_47833.log):

lxc-start 1456158555.539 ERROR    lxc_start - start.c:lxc_spawn:884 - failed initializing cgroup support
  lxc-start 1456158555.568 ERROR    lxc_start - start.c:__lxc_start:1121 - failed to spawn 'ubuntu_default_1456156125505_47833'
  lxc-start 1456158555.568 ERROR    lxc_start_ui - lxc_start.c:main:341 - The container failed to start.
  lxc-start 1456158555.568 ERROR    lxc_start_ui - lxc_start.c:main:343 - To get more details, run the container in foreground mode.
  lxc-start 1456158555.568 ERROR    lxc_start_ui - lxc_start.c:main:345 - Additional information can be obtained by setting the --logfile and --logpriority options.

任何想法我做错了什么? 谢谢,

【问题讨论】:

    标签: vagrant ubuntu-14.04 lxc


    【解决方案1】:

    进入/home/<USERNAME>/.vagrant.d/boxes/fgrehm/precise64-lxc/.../lxc/lxc-config 文件和 注释掉: lxc.pivotdir = lxc_putold 再次执行vigrant up 它应该可以工作!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-06-24
      • 1970-01-01
      • 1970-01-01
      • 2014-03-03
      • 1970-01-01
      • 2014-09-09
      • 1970-01-01
      相关资源
      最近更新 更多