Skip to content

Commit

Permalink
[vagrant] Handle VBox versions requiring --nat-localhostreachableN
Browse files Browse the repository at this point in the history
  • Loading branch information
binary-manu committed Mar 3, 2024
1 parent ce1dfca commit 07ab81f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions vagrant/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,15 @@ Vagrant.configure("2") do |config|
"--vram", default_video_ram.to_s,
"--graphicscontroller", "vmsvga"
]

# Must use printf below, the last \n is not stripped
if `VBoxManage modifyvm --help 2>&1 | grep -q -- --nat-localhostreachableN; printf %d $?` == "0"
vb.customize [
"modifyvm", :id,
"--nat-localhostreachable1", "on"
]
end

if enable_audio
vb.customize [
"modifyvm", :id,
Expand Down

0 comments on commit 07ab81f

Please sign in to comment.