Skip to content
This repository was archived by the owner on Oct 25, 2018. It is now read-only.

Commit 85bcffb

Browse files
author
Giuseppe Morelli
committed
[dev] add new extra hard disk from config
1 parent 973bc70 commit 85bcffb

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

Vagrantfile

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
## ##
66
## GMdotnet ##
77
## Vagrant Multi Machine Virtualbox ##
8-
## Version 1.1.0 ##
8+
## Version 1.2.0 ##
99
## ##
1010
#######################################
1111

@@ -124,6 +124,16 @@ Vagrant.configure("2") do |config|
124124
vmhost.vm.provider "virtualbox" do |vb|
125125
# RAM
126126
vb.memory = host['ram']
127+
# CPUS
128+
vb.cpus = host['cpu']
129+
# Extra Hard disk
130+
if host['extra_hard_disk']['create'] == true
131+
unless File.exist?(host['extra_hard_disk']['filepath'])
132+
vb.customize ['createhd', '--filename', host['extra_hard_disk']['filepath'], '--variant', 'Fixed', '--size', host['extra_hard_disk']['size'] * 1024]
133+
end
134+
135+
vb.customize ['storageattach', :id, '--storagectl', 'SATA Controller', '--port', 1, '--device', 0, '--type', 'hdd', '--medium', host['extra_hard_disk']['filepath']]
136+
end
127137
end
128138

129139
# Shell provision

config/config.yaml.sample

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
## ##
33
## GMdotnet ##
44
## Vagrant Multi Machine Virtualbox ##
5-
## Version 1.1.0 ##
5+
## Version 1.2.0 ##
66
## ##
77
## Config file ##
88
#######################################
@@ -19,6 +19,10 @@ gmdotnet:
1919
check_update: yes
2020
private_ip: 192.168.250.10
2121
ram: 1024
22+
cpu: 1
23+
extra_hard_disk:
24+
filepath: .vagrant/extradisk.vdi
25+
size: 30 # size in GB
2226
# PROVISION
2327
provision:
2428
ansible:

0 commit comments

Comments
 (0)