Skip to content
This repository has been archived by the owner on Dec 8, 2020. It is now read-only.

Increase vagrant default port range for larger deployments

Timo Sugliani edited this page May 16, 2014 · 1 revision

This comes from @StefanScherer in Issue #58

It seems on a vCloud Director target environment for vagrant, you can hit the port range limits much faster than with a local environment because of the amount of consumptions resources available.

The default value for vagrant can be found here:

./plugins/kernel_v2/config/vm.rb:          @usable_port_range = (2200..2250)

It is also mentioned in the Vagrant docs, so it is worth mentioning to increase config.vm.usable_port_range to more than 2200..2250.

Quick and Simple solution is to extend that range in your Vagrantfile as depicted below:

  if Vagrant.has_plugin?("vagrant-vcloud")
    config.vm.provider :vcloud do |cloud, override|
      config.vm.usable_port_range = 2200..2999
    end
  end
Clone this wiki locally