Commits

Randy Stauner committed 0a81d43

Always forward at least one port to the vagrant vm

so that we can use one without needing to reload.

Comments (0)

Files changed (1)

vagrant/config.rb

   # Overwrite default ssh port.
   config.vm.network :forwarded_port, {
     :guest        => 22,
-    :host         => 3199,
+    :host         => 3200,
     :host_ip      => '127.0.0.1',
     :id           => 'ssh',
     :auto_correct => true,
   }
 
   # Confirm that using alternate port range works.
-  config.vm.usable_port_range = (3200 .. 3250)
+  config.vm.usable_port_range = (3200 .. 3300)
+
+  # Always forward at least one port (so you can use one without restarting)..
+  # NOTE: This can cause a suspended vm to not resume when a port conflict
+  # is detected.  Resuming the vm in the vbox gui and shutting down fixes it.
+  # I think I've only had to do this once for any given suspended vm, but if
+  # it happens more often we could try saving the list of used ports somewhere.
+  config.vm.network :forwarded_port, {
+    :guest        => 3201,
+    :host         => 3201,
+    :id           => 'vagrant_rc',
+    :auto_correct => true,
+  }
 
   # Bridge a network connection without prompting for which NIC:
   #config.vm.network :public_network, :bridge => 'wlan0'
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.