ようへいの日々精進XP

よかろうもん

Vagrant をお手軽にデバッグする(vagrant-lxc が動かない問題)

はじめに

  • vagrant-lxc が動かないのでどうしたもんだかメモ
  • 多分 lxc-1.0.0 だからかもしれない問題

参考


やりかた

vagrant up の前に VAGRANT_LOG=debug をつけるだけ

VAGRANT_LOG=debug vagrant up --provider=lxc

意外にお手軽。


vagrant lxc が動かない問題について

上記の手順でログを見ると...

DEBUG driver: Creating container...
 INFO subprocess: Starting process: ["sudo", "lxc-create", "--template", "vagrant-tmp-vagrant_default-1382548047", "--name", "vagrant_default-1382548047", "-f", "/home/kawahara/.vagrant.d/boxes/quantal64/lxc/lxc.conf", "--", "--tarball", "/home/kawahara/.vagrant.d/boxes/quantal64/lxc/rootfs.tar.gz", "--auth-key", "/usr/share/vagrant/keys/vagrant.pub"]
DEBUG subprocess: Selecting on IO
DEBUG subprocess: stderr: getopt: オプション '--rootfs=/usr/lib/x86_64-linux-gnu/lxc' を認識できません
DEBUG subprocess: stderr: lxc-create: container creation template for vagrant_default-1382548047 failed

上記のようなエラーが出ているのが分かった。

おそらく、こちらとかこちらで議論されていた内容かと思われるので引き続き調べる。