Last active
August 29, 2015 14:27
-
-
Save skamithi/ea5b85ee4b01c879abc8 to your computer and use it in GitHub Desktop.
vagrantfile_for_simple_libvirt_vagrant_setup
This file contains hidden or 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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure(2) do |config| | |
# The most common configuration options are documented and commented below. | |
# For a complete reference, please see the online documentation at | |
# https://docs.vagrantup.com. | |
config.vm.box = "trusty64" | |
# vagrant issues #1673..fixes hang with configure_networks | |
config.ssh.shell = "bash -c 'BASH_ENV=/etc/profile exec bash'" | |
config.vm.provider :libvirt do |domain| | |
domain.memory = 256 | |
domain.nested = true | |
end | |
# testvm1 | |
config.vm.define :testvm1 do |node| | |
node.vm.hostname = 'testvm1' | |
# not a fan of the synced_folder feature | |
node.vm.synced_folder '.', '/vagrant', :disabled => true | |
# (testvm1)eth1 === eth1(testvm2) | |
node.vm.network :private_network, | |
:ip => '169.2.2.2/24', # bogus IP so tha vagrant-libvirt can create virt_network | |
:auto_config => false, | |
:libvirt__forward_mode => 'veryisolated', | |
:libvirt__dhcp_enabled => false, | |
:libvirt__network_name => 'test_network' | |
end | |
# testvm2 | |
config.vm.define :testvm2 do |node| | |
node.vm.hostname = 'testvm2' | |
# not a fan of the synced_folder feature | |
node.vm.synced_folder '.', '/vagrant', :disabled => true | |
# (testvm2)eth1 === eth1(testvm1) | |
node.vm.network :private_network, | |
:ip => '169.2.2.2/24', # bogus IP so tha vagrant-libvirt can create virt_network | |
:auto_config => false, | |
:libvirt__forward_mode => 'veryisolated', | |
:libvirt__dhcp_enabled => false, | |
:libvirt__network_name => 'test_network' | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment