onos/tools/dev/p4vm/Vagrantfile
Carmelo Cascone a252df1d9a Updated Ubuntu 16 desktop vagrant box for tutorial P4 VM
Change-Id: I4c3028a715d2a91cceaad44685285148f47d556b
(cherry picked from commit 4b9974fabf5393d53b99b70f88b577e4f3076c5e)
2018-11-01 01:05:48 +00:00

27 lines
981 B
Ruby

P4_VM_TYPE = ENV['P4_VM_TYPE'] || "dev"
Vagrant.configure(2) do |config|
if P4_VM_TYPE == "tutorial"
config.vm.box = "lasp/ubuntu16.04-desktop"
else
config.vm.box = "bento/ubuntu-16.04"
end
config.vm.provider "virtualbox" do |vb|
vb.name = "ONOS+P4 " + P4_VM_TYPE + " " + Time.now.strftime("(%Y-%m-%d)")
vb.gui = true
vb.cpus = P4_VM_TYPE == "tutorial" ? 4 : 2
vb.memory = 4096
if P4_VM_TYPE == "tutorial"
vb.customize ["storageattach", :id,
"--storagectl", "IDE Controller",
"--port", "0", "--device", "1",
"--type", "dvddrive",
"--medium", "emptydrive"]
vb.customize ['modifyvm', :id, '--clipboard', 'bidirectional']
end
end
config.vm.hostname = "onos-p4-" + P4_VM_TYPE
config.vm.network "private_network", :type => 'dhcp', :adapter => 2
config.vm.provision "shell", path: "root-bootstrap.sh", :args => P4_VM_TYPE
end