Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix vagrant script to allow support for virtualbox #67

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 18 additions & 11 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,21 +53,28 @@ def configure_router(i, config)
router.vm.network "public_network"
end
else
router.vm.network "private_network",
virtualbox__intnet: "outgoing_network",
:libvirt__forward_mode => "nat",
:libvirt__network_name => "outgoing",
:libvirt__host_ip => "10.69.0.1",
:ip => "10.69.0."+ (i+1).to_s,
:libvirt__dhcp_enable => false

router.vm.provision "shell",
run: "always",
inline: "ip r add default via 10.69.0.1"

router.vm.provider :libvirt do |libvirt, override|
override.vm.network "private_network",
:libvirt__forward_mode => "nat",
:libvirt__network_name => "outgoing",
:libvirt__host_ip => "10.69.0.1",
:ip => "10.69.0."+ (i+1).to_s,
:libvirt__dhcp_enable => false


override.vm.provision "shell",
run: "always",
inline: "ip r add default via 10.69.0.1"
end

#NOTE (luisd): i think virtualbox doesnt have this problem
# it mostly applies to wireless configs or you don't want to
# expose the router to your network
router.vm.provider :virtualbox do |virtualbox, override|
override.vm.network "private_network",
:ip => "192.168.56."+ (i+1).to_s
end
end

configure_cpus(router, $router_cpus)
Expand Down