-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
008.disk.Vagrantfile
62 lines (45 loc) · 2.23 KB
/
008.disk.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
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.require_version ">= 2.2.4"
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/bionic64"
config.vm.box_version = "20190411.0.0"
config.vm.box_check_update = false
config.vm.hostname = "canigodev"
config.vm.provider "virtualbox" do |vb|
vb.default_nic_type = "virtio"
vb.gui = true
vb.memory = "6124" # 6G
vb.cpus = 2
# vb.customize ["modifyvm", :id, "--cpuexecutioncap", "50"]
# https://everythingshouldbevirtual.com/virtualization/vagrant-adding-a-second-hard-drive/
swapdisk = './swapdisk.vdi'
unless File.exist?(swapdisk)
# vb.customize ['createhd', '--filename', swapdisk, '--variant', 'Dynamic', '--size', 100 * 1024]
vb.customize ['createmedium', 'disk', '--filename', swapdisk, '--size', 8 * 1024 , '--format', 'VDI']
end
vb.customize ['storageattach', :id, '--storagectl', 'SCSI', '--port', 2, '--device', 0, '--type', 'hdd', '--medium', swapdisk]
datadisk = './datadisk.vmdk'
unless File.exist?(datadisk)
# vb.customize ['createhd', '--filename', datadisk, '--variant', 'Dynamic', '--size', 100 * 1024]
vb.customize ['createmedium', 'disk', '--filename', datadisk, '--size', 100 * 1024 , '--format', 'VMDK']
end
vb.customize ['storageattach', :id, '--storagectl', 'SCSI', '--port', 3, '--device', 0, '--type', 'hdd', '--medium', datadisk]
# See https://github.com/chef/bento/issues/682
vb.customize ["modifyvm", :id, "--cableconnected1", "on"]
# vb.customize ["modifyvm", :id, "--accelerate3d", "on"]
vb.customize ['modifyvm', :id, '--hwvirtex', 'on']
vb.customize ["modifyvm", :id, "--vram", "32"]
# audio
# vb.customize ["modifyvm", :id, "--audio", "coreaudio"]
# vb.customize ["modifyvm", :id, "--audiocontroller", "hda"]
vb.customize ["modifyvm", :id, "--audioout", "on"]
vb.customize ["modifyvm", :id, "--clipboard", "bidirectional"]
vb.customize ["modifyvm", :id, "--draganddrop", "bidirectional"]
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
vb.name = "CanigoDev-3.0.5"
end
# config.vm.provision "file", source: "resources", destination: "/tmp/resources"
config.vm.provision "shell", path: "./provision.sh"
# config.vm.synced_folder "resources", "/tmp/vagrant", owner: "root", group: "root"
end