-
Notifications
You must be signed in to change notification settings - Fork 9
/
Vagrantfile
58 lines (43 loc) · 2.29 KB
/
Vagrantfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
Vagrant.configure("2") do |config|
config.vm.box = "generic/fedora33"
config.vm.box_check_update = false
config.vm.define "xdp-acl" do |m|
m.vm.provider "virtualbox" do |v|
v.memory = 1024
v.cpus = 2
v.customize ["modifyvm", :id, "--name", "xdp-acl"]
v.customize ["modifyvm", :id, "--nictype1", "82543GC"]
v.customize ["modifyvm", :id, "--nictype2", "82543GC"]
v.customize ["modifyvm", :id, "--nictype3", "82543GC"]
v.customize ["modifyvm", :id, "--nictype4", "82543GC"]
end
m.vm.hostname = "xdp-acl"
m.vm.synced_folder ".", "/vagrant", disabled: false
m.vm.network "private_network", ip: "172.20.6.3", netmask: "255.255.255.0", :mac => "040404200603"
m.vm.network "private_network", ip: "172.20.6.5", netmask: "255.255.255.0", :mac => "040404200605"
m.vm.provision :shell, run: "always", :inline => "ip a add 172.20.6.4/24 dev eth1 && ip a add 172.20.6.6/24 dev eth2"
m.vm.provision :shell, run: "always", :inline => "echo \"Hi, I'm xdp-acl 🍁 \n\" && uname -a"
# manager
m.vm.network "private_network", ip: "172.21.6.6", netmask: "255.255.255.0", :mac => "040404210606"
# m.vm.provision :shell, run: "always", :inline => "echo \"nameserver 223.5.5.5\" > /etc/resolv.conf", privileged: true
m.vm.provision :shell, path: "update_xdp-acl.sh", privileged: true
end
config.vm.define "trafgen" do |m|
m.vm.provider "virtualbox" do |v|
v.memory = 512
v.cpus = 1
v.customize ["modifyvm", :id, "--name", "trafgen"]
v.customize ["modifyvm", :id, "--nictype1", "82543GC"]
v.customize ["modifyvm", :id, "--nictype2", "82543GC"]
v.customize ["modifyvm", :id, "--nictype3", "82543GC"]
end
m.vm.hostname = "trafgen"
m.vm.synced_folder ".", "/vagrant", disabled: false
m.vm.network "private_network", ip: "172.20.6.7", netmask: "255.255.255.0", :mac => "040404200607"
m.vm.provision :shell, run: "always", :inline => "echo \"Hi, I'm trafgen 🍁 \n\" && uname -a"
# manager
m.vm.network "private_network", ip: "172.21.6.7", netmask: "255.255.255.0", :mac => "040404210606"
# m.vm.provision :shell, run: "always", :inline => "echo \"nameserver 223.5.5.5\" > /etc/resolv.conf", privileged: true
m.vm.provision :shell, path: "update_trafgen.sh", privileged: true
end
end