Shut down the virtual machine
Right click on the virtual machine, open the settings and select storage
Under Controller: SATA click the Adds hard disk option, then click Create
I recommend VHD as it is the most common and compatible virtual hard disk format
Leave Pre-allocate Full Size unchecked. The virtual hard disk is dynamic: it expands and shrinks as necessary without needlessly occupying space on the host.
Set the location where the .vhd file will be and give it a name. Then, give it a drive size. Again, as a dynamically expanding disk, this will not create a 100GB file unless 100GB worth of files are stored in it.
The vhd file will be created and under "not attached" in the Hard Disk Selector window
Close the Hard Disk Selector, click on Controller: SATA, click the Add Attachment icon then click Hard Disk
Choose vhd file listed under "not attached" in the Hard Disk Selector window.
The virtual drive is attached
Run the virtual machine and proceed to a drive management tool. In Ubuntu, the program is called Disks
The virtual disk is visible to the disk manager.
Format the virtual drive. In Linux, the compatible filesystem is Ext4.
The disk is now recognized by the system.
-
Permanently mount drive with fstab
Create the mount point
-
sudo mkdir /mnt/100GB
✂
Identify drive (I.E: /dev/sdb)
-
sudo lsblk
✂
Mount drive
-
sudo mount -t ext4 /dev/sdb /mnt/100GB
✂
Get drive UUID and type
-
sudo lsblk -o NAME,FSTYPE,UUID,MOUNTPOINTS
✂
Edit fstab
-
sudo nano /etc/fstab
✂
fstab entries have the following format:
[UUID] [mount-point] [type] [options] [dump] [pass]
#4TB Disk
UUID=b09bb4c8-de4d-4ce6-a93f-30c4c9241a58 /mnt/4TB ext4 defaults 0 0
Test fstab
-
sudo findmnt --verify
✂
*do not reboot if there are errors/warnings. An invalid fstab can render a disk unbootable*