Forked from lktslionel/Vagrant network config : NAT + NAT network + HostOnly
Created
April 20, 2023 20:48
-
-
Save christianjunk/99689b0aae2cdb0ced2af68b86cdd3a2 to your computer and use it in GitHub Desktop.
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# All Vagrant configuration is done below. The "2" in Vagrant.configure | |
# configures the configuration version (we support older styles for | |
# backwards compatibility). Please don't change it unless you know what | |
# you're doing. | |
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. | |
# Every Vagrant development environment requires a box. You can search for | |
# boxes at https://atlas.hashicorp.com/search. | |
config.vm.define "HQ" do |hq| | |
hq.vm.box = "minimal/centos7" | |
hq.vm.network "private_network", :type => 'dhcp' | |
hq.vm.network "private_network", :type => 'dhcp' | |
hq.vm.provider "virtualbox" do |vb| | |
vb.name = "HQ" | |
vb.cpus = 2 | |
vb.customize ["modifyvm", :id, "--nic2", "hostonly", "--hostonlyadapter2", "VirtualBox Host-Only Ethernet Adapter"] | |
vb.customize ["modifyvm", :id, "--nic3", "natnetwork"] | |
vb.customize ["modifyvm", :id, "--nat-network3", "NatNetwork"] | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment