Ubuntu guest on external USB SSD freezes at startup

Discussions related to using VirtualBox on Windows hosts.
Post Reply
Tetix
Posts: 4
Joined: 17. Dec 2021, 13:50

Ubuntu guest on external USB SSD freezes at startup

Post by Tetix »

Hello, and thanks in advance for help!

I am facing this problem where the VM hangs just at the start of booting process [right after CD/floppy fail at the start]. Check attached VBox.zip

The VM is supposed to boot from a .vmdk file that maps to the physical external USB SSD drive that has Ubuntu 18.04 installed.

This process has been done in my previous Windows 10 system and it was working fine. Note: I had a previous version of VBox (not sure how old, probably a year or so old).

I just reinstalled Windows and everything and followed the process to create a new .vmdk file (It is pasted below), this is done automatically by this command: VBoxManage internalcommands createrawvmdk -filename C:\usb.vmdk -rawdisk \\.\PhysicalDrive# (where #=2 for my case).

I can boot the external SSD with no issues from BIOS, so at least we know it can actually still boot the normal way.



# Disk DescriptorFile
version=1
CID=9c4ee688
parentCID=ffffffff
createType="fullDevice"

# Extent description
RW 488397168 FLAT "\\.\PhysicalDrive2" 0

# The disk Data Base
#DDB

ddb.virtualHWVersion = "4"
ddb.adapterType="ide"
ddb.geometry.cylinders="16383"
ddb.geometry.heads="16"
ddb.geometry.sectors="63"
ddb.uuid.image="c21332dc-4660-4de3-a4f4-0ca7d6451beb"
ddb.uuid.parent="00000000-0000-0000-0000-000000000000"
ddb.uuid.modification="00000000-0000-0000-0000-000000000000"
ddb.uuid.parentmodification="00000000-0000-0000-0000-000000000000"
ddb.geometry.biosCylinders="1024"
ddb.geometry.biosHeads="255"
ddb.geometry.biosSectors="63"
Attachments
VBox.zip
(28.59 KiB) Downloaded 2 times
Last edited by Tetix on 17. Dec 2021, 14:32, edited 1 time in total.
Tetix
Posts: 4
Joined: 17. Dec 2021, 13:50

Re: Ubuntu guest on external SSD freezes at startup

Post by Tetix »

I forgot I have done the following process 1 year ago.

You need to install PlopBootManager first to boot from USB...

I will confirm if this worked. Thanks !
Tetix
Posts: 4
Joined: 17. Dec 2021, 13:50

Re: Ubuntu guest on external USB SSD freezes at startup

Post by Tetix »

In the end, it wasn't even PlopBootManager required. In fact, it did nothing for me (I boot the disk as AHCI, not USB any way...)

What fixed my boot issue was to select Settings > System > Enable EFI in VBox.

So you can close this thread as solved.

But if possible, first, I would like to ask (so that I don't open new threads) if

a) I should use "Enable Host I/O Cache" for my (external) SSD drive connected through a USB external case. Without it, the system crashes right after Ubuntu load screen. I guess it is mandatory, just want to make sure, since by reading the manual I understood that for SATA drives it shouldn't be required (?)

b) By reading the same manual, "Oracle VM VirtualBox can optionally disable the I/O caching that the host OS would otherwise perform on disk image files." I was about to understand that for simple disk image files .vdi (not in my case but I tried it), I/O caching would be enabled by default. But the option is disabled by default. Then, on the other hand, further down it says for SATA is not recommended/required, and only for IDE.

I know this is slightly off-topic to the initial question, but I would appreciate any info on the I/O caching on a) my external SSD Evo 870 enclosed in a USB case and b) for normal .dvi files in the host Windows 10 SATA SSD.

Thanks in advance !
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: Ubuntu guest on external USB SSD freezes at startup

Post by scottgus1 »

The only thing I know about Host I/O Cache is what is in the manual and in various posts on the forum. The posts on the forum have suggested toggling the checkbox to try to solve a problem. So it should or should not help depending on circumstances. One just needs to try it to see what will happen.

"Oracle VM VirtualBox can optionally disable..." apparently means there is an option to disable the function, using the checkbox, not that Virtualbox will disable on its own.

According to the manual, the option is disabled by default for a few reasons, one of which is that enabling it causes data to be memory-cached twice: once in the host cache, once in the VM OS's cache if it has one. The manual has other reasons.
fth0
Volunteer
Posts: 5690
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Ubuntu guest on external USB SSD freezes at startup

Post by fth0 »

FWIW, when I was using HDDs in the past, I enabled the Host I/O Cache in all of my VMs, because disk I/O was considerably faster then. It even seems to be faster today when only using SSDs, but I didn't measure it again.

The major disadvantage IMHO is that a crash of the host OS during guest OS disk I/O can damage the virtual disk image, but my hosts usually do not crash, and if any of my VMs were important, I'd have a restorable backup anyway.
Post Reply