I have been using WindowsXP with SP3 as a guest within VirtualBox on a FreeBSD host for many years. However, after not using VB for some time I discovered that it no longer had audio nor did it have access to the CD/DVD. Audio and CD/DVD access works on FreeBSD (RELEASE 12.1p6) in native mode. The current version of VB is 5.2.44. It is possible to attach the DVD to the VM but when starting the VM it crashes and gives the following Result Code: NS_ERROR_FAILURE (0x80004005) I have doubled checked the permissions as specified in the installation message as well as the FreeBSD Handbook. I have also searched the web for a solution but have not found anything that works. The very same issue was recorded on Nov 2018 against ticket number18211 on the VirtualBox website. Their response was to state that "FreeBSD in not an officially supported host. Please report this to the FreeBSD port maintainers". That user's version of VirtualBox was v5.2.22. Any help would be greatly appreciated. Marek
Created attachment 218049 [details] Patch to drvHostBaseScsiCmdOs() Hello Marek, Thanks for submitting this PR. I could reproduce the problem. It seems that VirtualBox randomly crashes when returning from src/VBox/Devices/Storage/DrvHostBase-freebsd.cpp:drvHostBaseScsiCmdOs(). The attached patch fixed the problem for me. Can you try it and tell me if it works for you (just copy it to the files/ directory of the port and rebuild it) ? This bug has probably been introduced after upstream SVN rev 64316. Best regards, Ganael.
Hello Ganael, Bingo! The patch works. However, after attaching the drive to the VM, the 'passthrough' feature must be disabled. After that the CD/DVD works as it should. Many thanks for the patch. Will it be added to the ports tree? I update my ports by using pkg and I had to suck in a large number of ports, even gcc, as part of the tool chain, and would like to remove them from my system if possible. Many thanks for identifying this bug. Marek
Hello Marek, Good news! Thanks for your feedback. I can commit the patch but I would like a maintainer approval to do so (from Vbox team: vbox@FreeBSD.org). Stay tuned :) Best regards, Ganael.
Comment on attachment 218049 [details] Patch to drvHostBaseScsiCmdOs() Approved by: koobs (vbox) If it passes QA (poudriere)
A commit references this bug: Author: martymac Date: Mon Sep 21 10:32:30 UTC 2020 New revision: 549433 URL: https://svnweb.freebsd.org/changeset/ports/549433 Log: Fix crash when accessing physical CD/DVD PR: 248333 Reported by: mfv@bway.net Approved by: koobs (vbox) MFH: 2020Q3 Changes: head/emulators/virtualbox-ose/Makefile head/emulators/virtualbox-ose/files/patch-src-VBox-Devices-Storage-DrvHostBase-freebsd.cpp
Patch committed, thanks! Ganael.
A commit references this bug: Author: martymac Date: Mon Sep 21 15:50:30 UTC 2020 New revision: 549453 URL: https://svnweb.freebsd.org/changeset/ports/549453 Log: MFH: r549433 Fix crash when accessing physical CD/DVD PR: 248333 Reported by: mfv@bway.net Approved by: koobs (vbox) Approved by: ports-secteam (fluffy) Changes: _U branches/2020Q3/ branches/2020Q3/emulators/virtualbox-ose/Makefile branches/2020Q3/emulators/virtualbox-ose/files/patch-src-VBox-Devices-Storage-DrvHostBase-freebsd.cpp