Skip to content

Instantly share code, notes, and snippets.

@archf
Created November 7, 2016 20:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save archf/daea707c264f1783481bd3cd3ca44187 to your computer and use it in GitHub Desktop.
Save archf/daea707c264f1783481bd3cd3ca44187 to your computer and use it in GitHub Desktop.
vagrant-lxc
sudo yum install -y libvirt-devel libvirt libvirt-login-shell.x86_64 libvirt-daemon-lxc.x86_64
libvirt-daemon-driver-lxc.x86_64 virt-manager.noarch xorg-x11-server-Xorg.x86_64
wget https://releases.hashicorp.com/vagrant/1.8.7/vagrant_1.8.7_x86_64.rpm
sudo yum install vagrant_1.8.7_x86_64.rpm
sudo vagrant plugin install vagrant-lxc vagrant-libvirt
sudo -E usermod -a -G virtlogin,libvirt archf
VAGRANT_DEFAULT_PROVIDER=lxc
VAGRANT_LOG=error
Vagrant.configure(2) do |config|
config.vm.hostname = "m-c1"
config.vm.box = "fgrehm/trusty64-lxc"
config.vm.provider :lxc do |lxc|
lxc.container_name = "c1"
lxc.customize 'network.type', 'veth'
# lxc.customize 'network.type', 'veth'
lxc.customize 'network.link', 'virbr0'
lxc.customize 'network.flag', 'up'
lxc.customize 'network.gateway.ipv4' 'auto'
# lxc.customize 'network.gateway.ipv4' '192.168.122.1'
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment