If in VirtualBox' virtual machine you run out of disk space, then you can add a new disk in virtual machine's settings. Do as following:
To be able to utilize new virtual hard disk, you have to:
First what you have to do now is run the virtual machine and install gparted tool:
sudo apt-get install gparted
Next execute gparted with following command:
sudo gparted
In the gparted's main window in the upper right corner select the newly added disk (/dev/sdb):
Now from the main menu select an option: Device -> Create Partition Table..., accept selected by default partition table type (msdos) and press Apply button:
Next click with right mouse button a grey unallocated area of the disk drive space and from the menu select New item. In the dialog box that will appear accept default settings to create one partition which spreads all the disk space and click Add button:
In the end you have to apply the changes to the disk. To accomplish this, click the green tick icon in the toolbar:
After changes was applied you can close gparted application. Now you have to mount new disk
in some directory. To do this, create in your home directory a directory ff42:
cd && mkdir ff42
and mount new disk in it:
sudo mount -t ext4 /dev/sdb1 ~/ff42
Change directory privileges to allow all users for a full access to the directory (thanks to it you will have
full access as a casual user and not only as a root):
sudo chmod 777 ~/firefox42
At this point you will want the disk to be automatically mounted at the system startup so issue following
commands (CAUTION: directory /home/mzaleczny/ff42 below replace with full path to the directory ff42 in your
system):
sudo bash -i
echo -e "/dev/sdb1\t/home/mzaleczny/ff42\text4\terrors=remount-ro\t0\t1" >> /etc/fstab
exit
To remove unnecessary disk drive associated to a virtual machine, you should:
<HardDisks>
<HardDisk uuid="{50aa5fa6-42ff-4413-87e5-02d821b2f1aa}" location="Ubuntu15-10 FF42.vdi" format="VDI" type="Normal"/>
<HardDisk uuid="{cdb010f5-77dc-4c0c-9739-41c96f544076}" location="firefox42.vdi" format="VDI" type="Normal"/>
<HardDisk uuid="{9b2c085a-5c79-4234-aa9b-491cc316914c}" location="ff42.vdi" format="VDI" type="Normal"/>
</HardDisks>
Thanks it the virtual drive will be permanently removed.