4

I have a Windows 10 host PC and a Linux Mint 18.2 virtual machine under Oracle VM VirtualBox (V 5.1.26r). The Windows OS and VirtualBox run from the same hard drive, and I would like to extend the ext4 storage of my virtual machine by enabling it use an additional ext4 formatted internal hard drive as storage. I was able to format the drive as ext4 under Windows using PartitionGuru, but how can I make this drive available as storage to my virtual machine? Note that I do not have space on the NTFS boot drive to add the ext4 drive as a Virtual Drive.

EDIT: Using Ext2Read in Windows I was able assign the ext4 drive a letter name. I was then able to use this drive as a shared folder in my Linux VirtualBox, but the problem here is that this changes all of the default Linux permissions, e.g., all text files become executable. How can I mount AND keep permission?

1 Answer 1

2

Direct disk access isn't for the faint of heart. See here, section 9.9.

Warning

Raw hard disk access is for expert users only. Incorrect use or use of an outdated configuration can lead to total loss of data on the physical disk. Most importantly, do not attempt to boot the partition with the currently running host operating system in a guest. This will lead to severe data corruption.

My advice is to format the internal hard disk in Windows as NTFS with the largest cluster size you can manage and assign to it a drive letter, say, G:.

Then, in VirtualBox, add a new hard disk file located on G:, with size equal to the free space available on it (or use a dynamic disk; performance impact isn't all that great, or so I found. Your mileage may vary).

Add the disk to the SATA controller of the Linux guest, and in Linux you'll find a new /dev/sdb disk ready to be fdisk'ed and made ready.

3
  • I'll let my work machine create the virtual disk file overnight and report back tomorrow. Thanks.
    – eric s
    Commented Sep 5, 2017 at 21:47
  • While trying to format the partition via mkfs.ext4, I get the this error: Host system reported disk full. VM execution is suspended. You can resume after freeing some space. Error ID: DevAHCI_DISKFULL Severity: Non-Fatal Error
    – eric s
    Commented Sep 6, 2017 at 20:12
  • So this solution works if you leave space on the drive, i.e,. not making the VDI file as large as the drive.
    – eric s
    Commented Sep 6, 2017 at 23:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .