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