Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Add an option to configure the NAT network #198

Closed
wants to merge 1 commit into from

2 participants

@emerose

The default VirtualBox setup uses 10.0.2.* as the NAT network — which causes problems for folks who use that IP range on their internal network. This patch makes the NAT network configurable through definition.rb, by using the --natnet1 option to VBoxManage. See http://www.virtualbox.org/manual/ch09.html#changenat for more details

@jedi4ever
Owner

In the new version you can pass your options to the modifyvm by adding

:virtualbox => { :vm_options => { :natnet1 => 'some value' } } to your definition.rb

https://github.com/jedi4ever/veewee/blob/master/lib/veewee/provider/virtualbox/box/helper/create.rb#L164

@jedi4ever jedi4ever closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 29, 2011
  1. @emerose
This page is out of date. Refresh to see the latest.
Showing with 7 additions and 1 deletion.
  1. +7 −1 lib/veewee/session.rb
View
8 lib/veewee/session.rb
@@ -527,6 +527,13 @@ def self.create_vm(boxname,force=false)
end
end
+ # Set NAT network
+ unless @definition[:network].nil?
+ puts "Using #{@definition[:network]} as the NAT network"
+ command="#{@vboxcmd} modifyvm #{boxname} --natnet1 #{@definition[:network]}"
+ Veewee::Shell.execute("#{command}")
+ end
+
# Todo Check for java
# Todo check output of commands
@@ -672,7 +679,6 @@ def self.mount_isofile(boxname,isofile)
end
-
def self.suppress_messages
#Setting this annoying messages to register
VirtualBox::ExtraData.global["GUI/RegistrationData"]="triesLeft=0"
Something went wrong with that request. Please try again.