forked from AntonioMeireles/ClearLinux-packer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVagrantfile
More file actions
75 lines (70 loc) · 2.47 KB
/
Vagrantfile
File metadata and controls
75 lines (70 loc) · 2.47 KB
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
required_plugins = {
'vagrant-hostsupdater' => {
'version' => '>= 1.1.1.160'
},
'vagrant-reload' => {
'version' => '>= 0.0.1'
},
'vagrant-guests-clearlinux' => {
'version' => '>= 1.2.2'
}
}
VMWARE = ['vmware_fusion', 'vmware_desktop', 'vmware_workstation'].freeze
Vagrant.configure(2) do |config|
config.vagrant.plugins = required_plugins
config.vm.define :libvirt
config.vm.hostname = 'libvirt-host.clearlinux.local'
config.vm.box = 'AntonioMeireles/ClearLinux'
# check https://www.vagrantup.com/docs/synced-folders/nfs.html#root-privilege-requirement
# for (vagrant) host specific tweaks...
config.vm.synced_folder '../../', '/home/clear/ClearLinux-packer',
type: 'nfs',
nfs_udp: false,
mount_options: [
'rsize=32768',
'wsize=32768',
'nodiratime',
'actimeo=2',
'nfsvers=3',
'noatime',
'nolock',
'nocto',
'noacl',
'intr',
'soft',
'tcp',
'rw'
]
VMWARE.each do |provider|
config.vm.provider provider do |vmware|
vmware.gui = false
{
'memsize' => 8192,
'numvcpus' => 4
}.each { |k, v| vmware.vmx[k.to_s] = v.to_s }
end
end
config.vm.network :private_network, ip: '192.168.254.2'
config.vm.provision :bundle_add,
bundles: [
'clr-installer',
'kvm-host',
'make'
]
config.vm.provision 'set nfs sysctl opts',
type: 'shell',
path: 'sysctl.nfs.sh'
config.vm.provision 'setup libvirt',
privileged: false,
type: 'shell',
path: '../clearlinux/setup/libvirtd.sh'
config.vm.provision 'setup packer',
privileged: false,
type: 'shell',
path: '../clearlinux/setup/packer.sh'
config.vm.provision 'setup vagrant',
privileged: false,
type: 'shell',
path: '../clearlinux/setup/vagrant.sh'
config.vm.provision :reload
end