Change from SCSI to IDE

This commit is contained in:
IamTheFij 2017-06-04 17:53:48 -07:00
parent 916600c77b
commit e2ceb3d4bf

39
Vagrantfile vendored
View File

@ -36,16 +36,18 @@ Vagrant.configure(2) do |config|
config.vm.provider "virtualbox" do |vb|
# Display the VirtualBox GUI when booting the machine
vb.gui = false
# Customize the amount of memory on the VM:
vb.memory = "2048"
end
# disk_filepath "~/VirtualBox\ VMs/#{:name}/disk1.vdi"
disk_filepath = 'disk1.vdi'
if ARGV[0] == "up" && ! File.exists?(disk_filepath)
# Create vdi
config.vm.provider :virtualbox do |vb|
# Virtual disk filepath
config.vm.provider :virtualbox do |vb|
# require 'pry'
# binding.pry
# disk_filepath = "#{ENV["HOME"]}/VirtualBox VMs/#{vb.name}/extended.vdi"
disk_filepath = "extended.vdi"
if ARGV[0] == "up" && ! File.exists?(disk_filepath)
# Create vdi
vb.customize [
'createhd',
'--filename', disk_filepath,
@ -56,20 +58,21 @@ Vagrant.configure(2) do |config|
vb.customize [
'storageattach', :id,
'--storagectl', 'IDE',
'--port', 1, '--device', 0,
'--type', 'hdd', '--medium',
disk_filepath
'--storagectl', 'SCSI',
'--port', 2, '--device', 0,
'--type', 'hdd',
'--medium', disk_filepath
]
end
# Run script to map new disk
config.vm.provision "shell", inline: <<-SHELL
pvcreate /dev/sdb
vgextend VolGroup /dev/sdb
lvextend /dev/VolGroup/lv_root /dev/sdb
resize2fs /dev/VolGroup/lv_root
SHELL
# Run script to map new disk
# TODO: This doesn't actually work to extend yet
#config.vm.provision "shell", inline: <<-SHELL
# pvcreate /dev/sdb
# vgextend VolGroup /dev/sdb
# lvextend /dev/VolGroup/lv_root /dev/sdb
# resize2fs /dev/VolGroup/lv_root
#SHELL
end
end
# Set up Cloudron on provision. If using a fork, change this URL