forked from Islandora/documentation
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create resizing_vm.md (Islandora#1283)
- Loading branch information
1 parent
7c3eaf3
commit deb9b90
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
## Resize vagrant machine | ||
To expand virtual machine's harddrive for testing of larger files. Once the VM has started, you'll need to `halt` the VM, download and run the script, tell it what size (in MB) and then start the VM. | ||
The last step `vagrant ssh --command "sudo resize2fs /dev/sda1"` is a check. It should return there was nothing to do. If you already provisioned you VM you can skip the 2 steps with provisioning in them. | ||
|
||
```shell | ||
# Skip this if you VM is already provisioned. | ||
$ vagrant up --no-provision <-- Exclude if already running and provisioned. | ||
|
||
$ vagrant halt | ||
|
||
# Download and run. This will default to the correct name (just press enter) then give the size. | ||
# Example: `350000` is equal to 350GB | ||
|
||
$ wget https://gist.githubusercontent.com/DonRichards/6dc6c81ae9fc22cba8d7a57b90ab1509/raw/98cd6daeafe86c8e830495f9b46eb04e590f4b4f/expand_disk.py | ||
$ chmod +x expand_disk.py | ||
$ python expand_disk.py | ||
$ vagrant up --no-provision | ||
|
||
# This step isn't needed but acts as a check to verify it worked. | ||
$ vagrant ssh --command "sudo resize2fs /dev/sda1" | ||
|
||
# Skip this if you VM is already provisioned. | ||
$ vagrant provision <-- Exclude if already provisioned. | ||
``` | ||
### Troubleshooting expand_disk.py | ||
You may need to remove the "resized" version. Assuming your VM location is `~/VirtualBox\ VMs` | ||
```shell | ||
$ rm -rf ~/VirtualBox\ VMs/Islandora\ CLAW\ Ansible_resized | ||
``` |