Page 1 of 1

Fail to boot from VDI on EXTFS formatted external hard disc

Posted: 1. Dec 2014, 05:37
by Biggles
I am trying to run a virtual machine from an external hard disc. However, the virtual machine fails to boot.

Host: Mac OS X 10.10.1 (Yosemite), VirtualBox 4.3.18 r96516
Guest: Debian Wheezy 7.7 64-bit

The external hard disc is formatted using the ext4 file system. It is mounted in Mac OS X using the most recent version of the Paragon ExtFS for Mac OS X file system driver.

When the VM boots, it loads the GRUB boat loader, but fails immediately after that. The screen prints "GRUB GRUB GRUB GRUB GRUB..." repeatedly until the VM is powered off.
Error displayed when failing to boot
Error displayed when failing to boot
failure_to_boot_extfs.png (5.27 KiB) Viewed 2976 times
A list of GRUB errors tells me (without much detail) that this can be caused by GRUB failing to find something it needs to continue with the boot process. Since it can't even show the boot menu, then I assume it can't find the GRUB configuration files, which are usually stored in the partition containing /boot. The virtual disc image I am booting from uses a separate boot partition because it stores everything else in an encrypted LVM container.

I have tried making the virtual disc read/writeable by everyone, but the problem still occurs. I have noticed that the file system is mounted as follows. I'm not sure if this is causing a permissions problem for VirtualBox.

Code: Select all

/dev/disk2s1 on /Volumes/webapps (ufsd_ExtFS, local, noowners)
I also found in the VBox.log file this line about the partition on which the virtual disc image is stored:

Code: Select all

00:00:00.723826 File system of '/Volumes/webapps/vm/webapps.vdi' is unknown
The virtual machine and the virtual disc image were both originally created on a Linux computer (running Gentoo Linux, kernel version 3.16.5 and VirtualBox 4.3.18). It still runs flawlessly on that computer.

Copying the virtual disc image to the hard drive of my Mac means that the virtual machine boots and runs flawlessly. This makes me believe that it is something to do with either the Paragon ExtFS driver or the way that the external drive is mounted.

Virtual machine information and log file (for failing to boot scenario) are attached.

Re: Fail to boot from VDI on EXTFS formatted external hard d

Posted: 1. Dec 2014, 13:35
by mpack
There's something you don't see every day...
VBox.log wrote: 00:00:00.723826 File system of '/Volumes/webapps/vm/webapps.vdi' is unknown
I'm not at all sure what that means. Hmm. This line is purely informative, so possibly it simply means that VBox is unable to determine the "friendly name" for a filesystem code. It shouldn't matter, provided the host fully supports the filesystem.

What are the file size limits on ExtFS? Is it read/write or read-only?

Re: Fail to boot from VDI on EXTFS formatted external hard d

Posted: 2. Dec 2014, 03:38
by Biggles
The file system is ext4. It apparently has a file size limit of 16TB. As best as I can determine, the host (OSX) fully supports the file system via Paragon's ExtFS driver.

The file system is mounted read/write and I can modify any of the files on the drive through Finder and the terminal. I'm not sure why the file system is being mounted "noowners" though, or if this has an effect on VirtualBox.

Re: Fail to boot from VDI on EXTFS formatted external hard d

Posted: 2. Dec 2014, 12:32
by mpack
Well, let's return to basics. VirtualBox has absolutely no idea about the contents of the disk. Assuming you're using a legacy boot for the VM (not EFI), then all the BIOS does is read the first sector into a memory location and then jump to it. Everything that happens from then on is due to the code inside the boot sector.

The location of a virtual image file on the host cannot affect how the guest boots: VirtualBox either finds the file and has read access - or it doesn't (in hd boot cases, write access is usually required too).

If your description of the problem is complete (e.g. you didn't clone the drive then fail to mention it) then your symptoms are those of a corrupted boot. I would say that either the file itself is corrupted, or the ExtFS driver or the drive itself isn't working properly. A bit of testing should narrow the range of possibilities.

I'm assuming that the "unknown" label on the filesystem is harmless: a symptom of the fact that the filesystem is being supported via a 3rd party driver rather than natively by OS X.

Re: Fail to boot from VDI on EXTFS formatted external hard d

Posted: 3. Dec 2014, 02:26
by Biggles
I am using a legacy boot for the VM.

The VM boots flawlessly on another computer (a Linux computer, so it has native support for the ext4 file system). I think that rules out any problems with the disc image or the drive. Since VirtualBox can obviously read the disc image to get the first sector, something must be going wrong after that. From what you say, I think the problem probably lies with the ExtFS driver, not VirtualBox. I'll ask Paragon support if they know what's going wrong. Thanks for your help.

Re: Fail to boot from VDI on EXTFS formatted external hard d

Posted: 5. Dec 2014, 22:48
by loukingjr
@ Biggles… I think you were onto something here…
/dev/disk2s1 on /Volumes/webapps (ufsd_ExtFS, local, noowners)
I downloaded and installed both of Paragon's products, the one for NTFS and ExtFS. Both allowed me to create and read and write to NTFS and ExtFS partitions. However, when I copied a VM to a NTFS partition and added it to VB it ran fine. On the other hand when I did exactly the same thing with the same VM to an ext4 partition created with ExtFS it wouldn't start and had the same symptoms. I think the problem might be VirtualBox is seeing ExtFS instead of ext4 and doesn't know what to do with it.

Re: Fail to boot from VDI on EXTFS formatted external hard d

Posted: 5. Dec 2014, 23:11
by loukingjr
fwiw, I added the ext4 partition to a Ubuntu 14.10 guest as a shared folder and it read it fine.

Re: Fail to boot from VDI on EXTFS formatted external hard d

Posted: 6. Dec 2014, 01:20
by mpack
loukingjr wrote:I think the problem might be VirtualBox is seeing ExtFS instead of ext4 and doesn't know what to do with it.
I don't see what VBox would need to know. I/O from host files is implemented in the host OS, not in VirtualBox. However it may be worth testing with host I/O caching disabled, as the ExtFS driver may not like asynch access.

Re: Fail to boot from VDI on EXTFS formatted external hard d

Posted: 6. Dec 2014, 01:31
by loukingjr
That's a good idea thanks. I was going to try it but I forgot. I'm old. :D

Re: Fail to boot from VDI on EXTFS formatted external hard d

Posted: 6. Dec 2014, 01:40
by loukingjr
Interesting. Host I/O caching was disabled so I enabled it. The guest started up fine. :D

Re: Fail to boot from VDI on EXTFS formatted external hard d

Posted: 6. Dec 2014, 02:05
by loukingjr
What I still don't understand is why Host I/O caching has to be enabled for ExtFS but not for NTFS.

Re: Fail to boot from VDI on EXTFS formatted external hard d

Posted: 6. Dec 2014, 13:30
by mpack
Buggy driver? I don't use ExtFS or OS X, so I'm really in no position to speculate.

Re: Fail to boot from VDI on EXTFS formatted external hard d

Posted: 6. Dec 2014, 13:36
by loukingjr
It doesn't seem to be buggy since in all cases one can create and read and write from partitions created with the ext4 format using the ExtFS drivers. Plus my Linux box can also read and write to them and my Mac can now read and write to the ext4 format created on a Linux box. If the driver is buggy, the bug seems specific to VirtualBox. Seems unlikely. At any rate it's working now. :)