Created
October 7, 2014 13:40
-
-
Save alexmuller/34a1c569e1097ef36b3b to your computer and use it in GitHub Desktop.
Multiple disks in Vagrant and VirtualBox
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Vagrantfile b/Vagrantfile | |
index 88c7485..0118176 100644 | |
--- a/Vagrantfile | |
+++ b/Vagrantfile | |
@@ -115,6 +115,9 @@ Vagrant.configure("2") do |config| | |
modifyvm_args << "--memory" << "1024" | |
end | |
vb.customize(modifyvm_args) | |
+ file_to_disk = './tmp/large_disk.vdi' | |
+ vb.customize ['createhd', '--filename', file_to_disk, '--size', 512] | |
+ vb.customize ['storageattach', :id, '--storagectl', 'IDE Controller', '--port', 1, '--device', 1, '--type', 'hdd', '--medium', file_to_disk] | |
end | |
c.vm.provider :vmware_fusion do |f, override| | |
diff --git a/tools/bootstrap-vagrant b/tools/bootstrap-vagrant | |
index 2824181..25f4f1f 100755 | |
--- a/tools/bootstrap-vagrant | |
+++ b/tools/bootstrap-vagrant | |
@@ -62,3 +62,12 @@ main() { | |
} | |
main | |
+ | |
+for i in /dev/sd? ; do | |
+ if ! parted -a optimal --script ${i} -- print | |
+ then | |
+ parted -a optimal --script ${i} -- mklabel msdos | |
+ parted -a optimal --script ${i} -- mkpart primary 1 100% | |
+ parted -a optimal --script ${i} -- set 1 lvm on | |
+ fi | |
+done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment