vagrant-lxc plugin

vagrant-lxc plugin

OK today I finally had time to get vagrant-lxc to work. Up until now I have had vagrant virtualbox working just fine but when I looked into lxc containers with vagrant I ran into a little problem. First, I added vagrant-lxc plugin with this command

vagran plugin install vagrant-lxc

But this failed first asking for hostsupname plugin so I added that … Then it complained about not being able to find the vagrant-lxc plugin even though this command showed it listed:

vagrant plugin list

Looking at the git repo for vagrant-lxc it said I needed vagrant version 1.5 or better but apt-get install vagrant gave me an older version…

Now I love everything about ruby until you hit ruby version conflicts - yes there is rvm but sometimes it is just easier to move on and have a nice day… so I did, until this morning. I figured I would download the newest version of vagrant, build it, and see what happens with the plugin vagrant-lxc. To my pleasant surpise the vagrant website offers a debian package for the newest version - sweet. I downloaded it, installed it, and all went well. Then when I tried running

vagrant init fgrehm/precise64-lxc

NOTE: Normally vagrant will create its own Vagrantfile based on the init info you entered above.

This failed for me. It couldn’t find the plugin again but but it suggested this:

rm $HOME/.vagrant.d/plugins.json

So I removed that file and then I ran this again:

vagrant init fgrehm/precise64-lxc
vagrant up

Bada-bing that fixed the issues (makes me wonder it that might have worked for fixing the older version.

It downloaded and built out the lxc container and all is good. Now I need to start tweaking lxc containers to give me a virtual lab to deploy development, staging, and production deployments for testing.

Geoff McNamara

"Do not meddle in the affairs of wizards, for they are subtle and quick to anger.” J.R.R Tolkien

Elizabeth City, NC