Created
November 7, 2016 20:58
-
-
Save archf/daea707c264f1783481bd3cd3ca44187 to your computer and use it in GitHub Desktop.
vagrant-lxc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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