aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent JARDIN <vincent.jardin@6wind.com>2016-01-14 17:01:08 -0800
committerEd Warnicke <eaw@cisco.com>2016-01-18 13:25:08 +0000
commit1d3be19c77e965309ba7f2fd43994b4a7952aade (patch)
treee25c8bfdc3e4f99dc484a03a5e73d35e0d519a83
parent36de03819fd017a464dbd9eedfbb0bf492863fb5 (diff)
build - Vagrant template to get more emulated PCI NICs
For some testing, it an be usefull to have more physical NICS that DPDK's PMDs can bind to. Example to run vpp within a VM with 3 emulated NICs: export VPP_VAGRANT_NICS=3 vagrant up Change-Id: I82d70f21c0a9ceba126ab6620c3b869d590d8de1 Signed-off-by: Vincent JARDIN <vincent.jardin@6wind.com>
-rw-r--r--build-root/vagrant/Vagrantfile9
1 files changed, 9 insertions, 0 deletions
diff --git a/build-root/vagrant/Vagrantfile b/build-root/vagrant/Vagrantfile
index 4e2669b5..f00233d6 100644
--- a/build-root/vagrant/Vagrantfile
+++ b/build-root/vagrant/Vagrantfile
@@ -22,6 +22,15 @@ Vagrant.configure(2) do |config|
config.cache.scope = :box
end
+ # Define some physical ports for your VMs to be used by DPDK
+ nics = 0
+ if ENV.key?('VPP_VAGRANT_NICS')
+ nics = ENV['VPP_VAGRANT_NICS'].to_i(10)
+ end
+ for i in 1..nics
+ config.vm.network "private_network", type: "dhcp"
+ end
+
# use http proxy if avaiable
if ENV['http_proxy'] && Vagrant.has_plugin?("vagrant-proxyconf")
config.proxy.http = "$http_proxy"