-
Notifications
You must be signed in to change notification settings - Fork 1
/
vbox_assignment4.sh
64 lines (50 loc) · 2.53 KB
/
vbox_assignment4.sh
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
59
60
#!/bin/bash
# Make snapshot of Base machine
VBoxManage snapshot "Base" take BaseSnapshot
# Attack of the clones
VBoxManage clonevm "Base" --snapshot BaseSnapshot --mode machine --options link --name machine1 --register
VBoxManage clonevm "Base" --snapshot BaseSnapshot --mode machine --options link --name machine2 --register
VBoxManage clonevm "Base" --snapshot BaseSnapshot --mode machine --options link --name machine3 --register
VBoxManage clonevm "Base" --snapshot BaseSnapshot --mode machine --options link --name machine4 --register
# Clipboard sharing
VBoxManage modifyvm "machine1" --clipboard bidirectional
VBoxManage modifyvm "machine2" --clipboard bidirectional
VBoxManage modifyvm "machine3" --clipboard bidirectional
VBoxManage modifyvm "machine4" --clipboard bidirectional
# Machine 1 interfaces
VBoxManage modifyvm "machine1" --nic1 nat
VBoxManage modifyvm "machine1" --nictype1 82540EM
VBoxManage modifyvm "machine1" --macaddress1 420694206911
VBoxManage modifyvm "machine1" --nic2 intnet
VBoxManage modifyvm "machine1" --nictype2 82540EM
VBoxManage modifyvm "machine1" --nicpromisc2 allow-all
VBoxManage modifyvm "machine1" --intnet2 intnet1
VBoxManage modifyvm "machine1" --macaddress2 420694206912
# Machine 2 interfaces
VBoxManage modifyvm "machine2" --nic1 intnet
VBoxManage modifyvm "machine2" --nictype1 82540EM
VBoxManage modifyvm "machine2" --nicpromisc1 allow-all
VBoxManage modifyvm "machine2" --intnet1 intnet1
VBoxManage modifyvm "machine2" --macaddress1 420694206921
VBoxManage modifyvm "machine2" --nic2 intnet
VBoxManage modifyvm "machine2" --nictype2 82540EM
VBoxManage modifyvm "machine2" --nicpromisc2 allow-all
VBoxManage modifyvm "machine2" --intnet2 intnet3
VBoxManage modifyvm "machine2" --macaddress2 420694206922
VBoxManage modifyvm "machine2" --nic3 intnet
VBoxManage modifyvm "machine2" --nictype3 82540EM
VBoxManage modifyvm "machine2" --nicpromisc3 allow-all
VBoxManage modifyvm "machine2" --intnet3 intnet4
VBoxManage modifyvm "machine2" --macaddress3 420694206923
# Machine 3 interfaces
VBoxManage modifyvm "machine3" --nic1 intnet
VBoxManage modifyvm "machine3" --nictype1 82540EM
VBoxManage modifyvm "machine3" --nicpromisc1 allow-all
VBoxManage modifyvm "machine3" --intnet1 intnet3
VBoxManage modifyvm "machine3" --macaddress1 420694206931
# Machine 4 interfaces
VBoxManage modifyvm "machine4" --nic1 intnet
VBoxManage modifyvm "machine4" --nictype1 82540EM
VBoxManage modifyvm "machine4" --nicpromisc1 allow-all
VBoxManage modifyvm "machine4" --intnet1 intnet4
VBoxManage modifyvm "machine4" --macaddress1 420694206941