onionjake edited this page Jan 12, 2015 · 13 revisions

In order to find out more about what's going on under the hood on vagrant, prepend VAGRANT_LOG=debug to your vagrant commands. For lxc-starts debugging set LXC_START_LOG_FILE and for redir debugging use REDIR_LOG:

REDIR_LOG=1 LXC_START_LOG_FILE=/tmp/lxc-start.log VAGRANT_LOG=debug vagrant up

This will output A LOT of Vagrant debugging information on your terminal, lxc-start stuff to /tmp/lxc-start.log and redir related output to /var/log/syslog.

Another way of investigating what's going on under the hood and tracking down if the problem is on vagrant-lxc or with your setup is to start the container on the foreground with plain old lxc-start. So given that you have a vm called db on your Vagrantfile, you can run the command below and have a look at the output:

lxc-start -n $(cat .vagrant/machines/db/lxc/id)

I'm unable to restart containers!

It can be many things including a bug on specific linux kernel (3.5.0-17.28), so make sure you are using a version different than that one. More information can be found on:

The problem might also be related to the additional customizations you are specifying on your Vagrantfile, please try creating a container using no custom configs before submitting a bug report.

I'm hitting errors related to running commands with sudo / test-kitchen

Try commenting out the Defaults requiretty line from your /etc/sudoers file if it exists as it has been reported as the cause of pain.

I'm seeing a "The lxc package does not seem to be installed or is not accessible on the PATH." error

Make sure you have the package around and try removing the 'Defaults requiretty' from your sudoers file as as described above.

I'm having trouble with Berkshelf / librarian-chef!

Unfortunately it is an issue with Berkshelf and librarian which causes provisioning to fail.

Can't install software on containers!

This seems to be related to some iptables rules declared on hosts, see #94 for more information

Can't use ufw on guest containers

There seems to be an issue with Kernel module loading on vagrant-lxc boxes. See #104 and this message on lxc-users mailing list for more information

I'm using Eclipse to launch vagrant-lxc containers and I'm getting errors executing lxc commands.

See #88 for more information

apt-get update hangs at 0%

When running apt-get update it sits at 0% downloading forever. This appears to be a problem with MTU sizes. Try setting this in your Vagrantfile with decreasing MTU sizes until it works:

  config.vm.provider :lxc do |lxc|
    lxc.customize 'network.mtu','1400'
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.