How do I Increase the SimpleRisk VM Size?
This FAQ was designed to help guide you through expanding the SimpleRisk VM disk size using VMWare. This process is involved and requires some steps which could result in dataloss if they are done incorrectly. We suggest making sure you have excellent backups of the VM before proceeding.
This process will require a linux bootable iso, in this example I'm using a live boot CD of Ubuntu 18.04. If you don't have one on hand I would go ahead and start that downloading here: http://releases.ubuntu.com/18.04/
Step 1: Increasing the size of the VM VDD
This step should be fairly easy if you haven't already done this. While the VM is not running right click it and select "settings". Now select Hard Disk(SATA) as shown in the screenshot below and click the “Expand” button at the bottom right.
On the resulting dialogue box enter the new size you would like the SimpleRisk VM to be.
Now click “Expand” and “Ok” to close the settings menu.
Step 2: Booting from Live ISO
Right click your VM again and go back to “Settings”. In the Hardware tab if you see a CD/DVD drive listed go ahead and click it. If you do not see one click “Add” button located at the bottom near the center of the menu and select CD/DVD drive. Now that you have your drive ready we must load it with the ISO in our example we are using Ubuntu 18.04 as mentioned before.
Click the CD/DVD drive in the list and on the right hand side click the “Use ISO image file:” option. Now select the ISO from where ever you downloaded it to. Once done it should look something like this.
Step 3: Booting from the Live ISO
I found this step to be tricky on my side of things but not by any means complex. Start the SimpleRisk VM as you normally would and then immediately hit “F2” while the VMWare bios splash screen is being displayed. This took me a few tries but when successful you should land on a page that looks like this.
From here we need to hit the right arrow key until we are in the boot menu. Hit “+” while selecting the CD-ROM Drive so that it looks like the following.
Now hit the right arrow key and from the “Exit” tab restart the system saving changes.
Step 4: Using Ubuntu to expand the partition
Your VM should now attempt to boot from the Ubuntu ISO use the “Try Ubuntu” option to boot into Ubuntu 18.04. The following procedure is the most important to get correct so I will break this part up into smaller steps.
1) Open Terminal you can open it from Applications menu we used before just search for Terminal this time.
2) From terminal use “sudo fdisk /dev/sda”
3) Press “p” to print out the current partition scheme. Write down where sda5 starts. 4) Press “d” to delete sda5 first then sda2.
5) Press “n” to create a new partition, press “e” to select extended and number it 2. The defaults for start and end should be fine.
6) Press “n” again this time it should create logical partition 5. Set the first sector to the one recorded in step 8 (Most likely: 1501184).The end value should be the default one which is as far out as it can go. When asked select “N” for “Do you want to remove the signature?”.
7) Press “p” and verify everything looks correct.
8) Press “w” to write the changes out.
9) Now go ahead and restart the VM booting back into the Live Ubuntu 18.04 again.
10) Now back in terminal use “sudo cryptsetup luksOpen /dev/sda5 crypt1”
11) The password should be “simplerisk” unless you have otherwise changed it previously
12) Now get the Live OS to recognize the LVM using:
“sudo vgscan –-mknodes”
”sudo vgchange -ay”
13) Resize the crypt using “sudo cryptsetup resize crypt1”
14) Resize the root (LVM) Physical Volume using “sudo pvresize /dev/mapper/crypt1”
15) Unlock the (LVM) Physical Volume using “ sudo pvchange -x y /dev/mapper/crypt1”
16) Resized the (LVM) Physical Volume using: sudo lvresize -l +100%FREE /dev/simplerisk-vg/root”
17) Re-lock the physical volume using “ sudo pvchange -x n /dev/mapper/crypt1”
18) Finally resize the filesystem using:
“sudo e2fsck -f /dev/mapper/simplerisk--vg-root”
“sudo resize2fs -p /dev/mapper/simplerisk--vg-root”
These steps will have guided you through expanding the disk space on a SimpleRisk VM using VMWare. If you have found any instructions to be incorrect or lacking detail please contact us at email@example.com