-
Notifications
You must be signed in to change notification settings - Fork 4
/
Vagrantfile
78 lines (75 loc) · 2.7 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# -*- mode: ruby -*-
# vim: set ft=ruby :
audio_driver = case RUBY_PLATFORM
when /linux/
'alsa'
when /darwin/
'coreaudio'
when /cygwin|mswin|mingw|bccwin|wince|emx/
'dsound'
else
raise 'Unknown RUBY_PLATFORM=#{RUBY_PLATFORM}'
end
guest_iso = case RUBY_PLATFORM
when /linux/
'/usr/share/virtualbox/VBoxGuestAdditions.iso'
when /darwin/
'/Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso'
when /cygwin|mswin|mingw|bccwin|wince|emx/
'%PROGRAMFILES%/Oracle/VirtualBox/VBoxGuestAdditions.iso'
else
raise 'Unknown RUBY_PLATFORM=#{RUBY_PLATFORM}'
end
Vagrant.configure('2') do |config|
config.vm.box = 'ramsey/macos-catalina'
config.vm.box_check_update = true
config.vm.provider 'virtualbox' do |vb|
vb.gui = true
vb.cpus = 4
vb.linked_clone = true
vb.name = 'setup.macos'
vb.memory = '8192'
vb.customize [
'modifyvm', :id,
'--accelerate3d', 'on', # default: off
'--acpi', 'on', # default: on
'--apic', 'on', # default: on
'--audio', audio_driver,
'--audiocontroller', 'hda', # default ac97
'--biosapic', 'x2apic', # default: apic
'--bioslogofadein', 'on',
'--bioslogofadeout', 'on',
'--chipset', 'ich9', # default: ich9
'--clipboard', 'bidirectional', # default: disabled
'--draganddrop', 'bidirectional', # default: disabled
'--firmware', 'efi64', # default: efi
'--hpet', 'on', # default: off
'--hwvirtex', 'on', # default: on
'--ioapic', 'on', # default: on
'--keyboard', 'usb', # default: usb
'--largepages', 'on', # default: on
'--longmode', 'on', # default: on
'--nestedpaging', 'on', # default: on
'--pae', 'on', # default: on
'--paravirtprovider', 'minimal', # default: default
'--rtcuseutc', 'off', # default: on
'--usbxhci', 'on', # default: on
'--vram', '256', # default: 128
'--vtxvpid', 'on', # default: on
'--vtxux', 'on', # default: on
'--x2apic', 'on', # default: off
]
vb.customize [
'storageattach', :id,
'--storagectl', 'SATA Controller',
'--port', '2',
'--type', 'dvddrive',
'--medium', guest_iso
]
end
config.vm.synced_folder '.', '/vagrant', type: 'rsync', owner: 'vagrant', group: 'staff'
config.vm.provision 'Allow all applications to run', type: 'shell', inline: 'spctl --master-disable'
config.vm.provision 'Install VBGuest addons', type: 'shell', inline: 'cd /Volumes/VBox_GAs_*; installer -pkg VBoxDarwinAdditions.pkg -target /'
config.vm.provision 'Restore the allow all applications to run', type: 'shell', inline: 'spctl --master-enable'
# config.vm.provision 'Start setup', type: 'shell', inline: '/vagrant/setup'
end