mirror of
https://github.com/opennetworkinglab/onos.git
synced 2025-10-25 14:21:33 +02:00
Dev: 1.5 GB instead of 3.5 GB Tutorial: 2.3 GB instead of 5.5 GB Change-Id: Ib63d47578a2c9e16a97827bfba463f90cfe1187d
23 lines
889 B
Ruby
23 lines
889 B
Ruby
P4_VM_TYPE = ENV['P4_VM_TYPE'] || "dev"
|
|
|
|
Vagrant.configure(2) do |config|
|
|
config.vm.box = "bento/ubuntu-16.04"
|
|
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
|