forked from openmediavault/openmediavault
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVagrantfile
57 lines (55 loc) · 1.97 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
# -*- mode: ruby -*-
#
# This file is part of openmediavault.
#
# @license http://www.gnu.org/licenses/gpl.html GPL Version 3
# @author Volker Theile <volker.theile@openmediavault.org>
# @copyright Copyright (c) 2009-2020 Volker Theile
#
# openmediavault is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# any later version.
#
# openmediavault is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with openmediavault. If not, see <http://www.gnu.org/licenses/>.
# Default values.
hostname = "omv5box"
Vagrant.configure("2") do |config|
config.vm.box = "debian/buster64"
config.vm.define hostname
config.vm.provision :shell, :path => "install.sh"
config.vm.network "private_network", ip: "192.172.16.24", auto_config: false
config.vm.network "private_network", ip: "192.172.16.25"
config.vm.hostname = hostname
config.vm.provider :virtualbox do |prov|
prov.name = hostname
prov.memory = "2048"
# Add some disks.
for i in 0..2 do
filename = "./disks/#{hostname}-disk#{i}.vmdk"
unless File.exist?(filename)
prov.customize ["createmedium", "disk", "--filename", filename,
"--size", 1000 * 1024]
prov.customize ["storageattach", :id, "--storagectl",
"SATA Controller", "--port", i + 1, "--device", 0,
"--type", "hdd", "--medium", filename]
end
end
end
config.vm.provider :libvirt do |prov|
prov.memory = "2048"
# Add some disks.
for i in 0..2 do
prov.storage :file, :size => "1G", :bus => "scsi"
end
end
config.vm.synced_folder "../deb", "/home/vagrant/openmediavault",
:nfs => true,
:mount_options => ["nolock,vers=3,udp,noatime,actimeo=1"]
end