Author Topic: AHCI and Virtualbox  (Read 8320 times)

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2092
  • Karma: +159/-0
    • View Profile
AHCI and Virtualbox
« on: March 27, 2023, 10:25:44 am »
Hi All,

On my recent NUC, I'm running ArcaOS under Virtualbox (Ubuntu host). All works great, except the image I'm using was originally setup using IDE - and disk IO (when tested with Sysbench) is slow with write speeds in particular. I was looking to switch to AHCI - but when attempting to do this I get the dreaded OS/2 is unable to operate the hard disk message - seems the disk images aren't found.

Any hints to fix this? On another VM I was able to switch to AHCI without issue, so not sure what I might be doing wrong!

Cheers,

Paul.

Lars

  • Hero Member
  • *****
  • Posts: 1271
  • Karma: +65/-0
    • View Profile
Re: AHCI and Virtualbox
« Reply #1 on: March 27, 2023, 12:28:48 pm »
Have you updated the config.sys of the image to load OS2AHCI.ADD instead of (or in addition to) the DANIS506.ADD ?
Obviously, you will need to start Virtualbox having the OS/2 guest use IDE, update config.sys and then switch over VirtualBox to AHCI.

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2092
  • Karma: +159/-0
    • View Profile
Re: AHCI and Virtualbox
« Reply #2 on: March 27, 2023, 10:01:06 pm »
Have you updated the config.sys of the image to load OS2AHCI.ADD instead of (or in addition to) the DANIS506.ADD ?
Obviously, you will need to start Virtualbox having the OS/2 guest use IDE, update config.sys and then switch over VirtualBox to AHCI.

Yes - definitely os2ahci.add is in config.sys (in addition to danis506.add). I've even tried solely using os2ahci.add.

I might have to do a fresh install, but it would be nice not to have to try work out which rpm packages to reinstall....

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4713
  • Karma: +41/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: AHCI and Virtualbox
« Reply #3 on: March 27, 2023, 11:20:59 pm »
Hi Paul
.... but it would be nice not to have to try work out which rpm packages to reinstall....
Not sure if you want an answer for that, but Andy Willis once gave me this REXX script to list all the packages installed on my machine.

Code: [Select]
/* REXX to get just package names from RPM installed output */

rc = SysLoadFuncs()
Parse Arg fileout

rc = SysFileDelete(fileout)
fileinv = holdrpm.txt

address cmd 'yum list |grep install >'fileinv
list = ''
do while Lines(fileinv)
  text = LineIn(fileinv)
  parse var text package'.'.
  list = list || ' ' || package
end
rc = Lineout(fileout,'yum install -y 'list)
rc = SysFileDelete(fileinv)

Regards

Martin Iturbide
OS2World NewsMaster
... just share the dream.

Lars

  • Hero Member
  • *****
  • Posts: 1271
  • Karma: +65/-0
    • View Profile
Re: AHCI and Virtualbox
« Reply #4 on: March 28, 2023, 07:38:32 am »
Have you updated the config.sys of the image to load OS2AHCI.ADD instead of (or in addition to) the DANIS506.ADD ?
Obviously, you will need to start Virtualbox having the OS/2 guest use IDE, update config.sys and then switch over VirtualBox to AHCI.

Yes - definitely os2ahci.add is in config.sys (in addition to danis506.add). I've even tried solely using os2ahci.add.

I might have to do a fresh install, but it would be nice not to have to try work out which rpm packages to reinstall....

EDIT: Stick to Virtualbox 6.1.40. Do NOT use anything that is newer.
« Last Edit: March 28, 2023, 09:09:45 am by Lars »

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2092
  • Karma: +159/-0
    • View Profile
Re: AHCI and Virtualbox
« Reply #5 on: March 28, 2023, 09:21:35 am »
Gotta say, with an Ubuntu host, I haven't noticed any different between VirtualBox 6.1.x and 7.0

Lars

  • Hero Member
  • *****
  • Posts: 1271
  • Karma: +65/-0
    • View Profile
Re: AHCI and Virtualbox
« Reply #6 on: March 28, 2023, 07:10:42 pm »
ok, I am using Windows host. It also looked OK at the beginning. Until it blew my ArcaOS installation. Watch out.

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4713
  • Karma: +41/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: AHCI and Virtualbox
« Reply #7 on: March 28, 2023, 08:07:52 pm »
ok, I am using Windows host. It also looked OK at the beginning. Until it blew my ArcaOS installation. Watch out.
Hi Lars

I still haven't got the problem with VirtualBox 7.0.6 on Windows Host, but I'm very concerned about it.

Do you have more details on how to reproduce the bug? We had the discussion on the other thread "Re: Virtualbox - LVM stopped working", but I still don't have the details on what is the issue.  Or maybe the details are out there, but I don't have the understanding to organize the issue in a way we can open a new ticket.

Also a partially related ticket was opened (https://www.virtualbox.org/ticket/21334), but it was mixed with UEFI and NVMe use on ArcaOS 5.1 RC (unreleased).

My wild guess of what we should do is:
- Try to reproduce the issue on VBox 7.0.x (Win Host)
- Identify what is getting broken
- Create a new ticket with all information.
It would be desired if this issue can be reproduced on OS/2 Warp 4.52 so it will be easier for the VirtualBox developers to get access to it.

I want to help, since I consider VirtualBox a very important piece for the ones that uses OS/2 virtualized, but I need more help to understand/organize the issue for the ticket.

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

jailbird

  • Newbie
  • *
  • Posts: 46
  • Karma: +5/-0
    • View Profile
Re: AHCI and Virtualbox
« Reply #8 on: March 29, 2023, 01:43:10 am »
I can't get either AHCI nor SCSI mode to work properly with ArcaOS under VBox 7.x on macOS. I assume it has something to do with with VBox 7 using macOS's Hypervisor.framework now instead of using kexts (kernel modules) like 6.x did.

Strangely, Parallels also uses Hypervisor.framework and works with ArcaOS + AHCI fine.

I had filed 3337 on Arca's Mantis to try and get them to provide something useful that I could then give to the VBox devs, as I assume most of them don't have ArcaOS to test with.

Ian Manners

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 464
  • Karma: +10/-0
  • I am the computer, it is me.
    • View Profile
    • ComKal Networks Australia
Re: AHCI and Virtualbox
« Reply #9 on: March 29, 2023, 04:45:14 am »
Thought I would update to AHCI from IDE drivers/controller as well reading this thread but I have been unsuccessful.
I added BASEDEV=OS2AHCI.ADD to my Arca config.sys but the container stops booting, just displays the Arca boot screen, no error message, and does not progress any further even I leave it 30 minutes.

I'm using Virtualbox Version 6.1.40 r154048 (Qt5.12.8) [Stable channel] under Ubuntu.
Version 7.x of Virtualbox is not listed as Stable, I did try upgrading to it a while ago and very quicky reverted back to 6.1.40.x due to wierd stuff, so will stick to the stable channel from now on.
Cheers
Ian B Manners

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2092
  • Karma: +159/-0
    • View Profile
Re: AHCI and Virtualbox
« Reply #10 on: March 29, 2023, 11:39:55 am »
Hey Ian,

Thought I would update to AHCI from IDE drivers/controller as well reading this thread but I have been unsuccessful.
I added BASEDEV=OS2AHCI.ADD to my Arca config.sys but the container stops booting, just displays the Arca boot screen, no error message, and does not progress any further even I leave it 30 minutes.

I'm using Virtualbox Version 6.1.40 r154048 (Qt5.12.8) [Stable channel] under Ubuntu.
Version 7.x of Virtualbox is not listed as Stable, I did try upgrading to it a while ago and very quicky reverted back to 6.1.40.x due to wierd stuff, so will stick to the stable channel from now on.

Interesting... I was able to 'see' an AHCI controller and blank image from the AOS boot ISO - I did have to enable AHCI in the pre-boot menu though.

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2092
  • Karma: +159/-0
    • View Profile
Re: AHCI and Virtualbox
« Reply #11 on: April 16, 2023, 12:36:55 am »
Update on this  - AHCI works on Virtualbox with a single core -  but not with multiple cores. adding /MAXCPU=1 allows the use of AHCI.

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2092
  • Karma: +159/-0
    • View Profile
Re: AHCI and Virtualbox
« Reply #12 on: April 16, 2023, 01:00:25 pm »
Update on this  - AHCI works on Virtualbox with a single core -  but not with multiple cores. adding /MAXCPU=1 allows the use of AHCI.

A better workaround, is to use 3 cores in Virtualbox,  rather than 4.

With 4 cores I get the error, with 3 cores, the system boots fine. The host system has 4 cores.

Ian Manners

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 464
  • Karma: +10/-0
  • I am the computer, it is me.
    • View Profile
    • ComKal Networks Australia
Re: AHCI and Virtualbox
« Reply #13 on: April 16, 2023, 02:46:34 pm »
Thanks for that insight Paul :)
I've been letting VirtualBox use all 12 cores, think I'll try it with one core as it's really just for PMMail anyway.

Added: Adding /MAXCPU=1 in the config.sys works, where as letting VirtualBox only use 1 CPU does not. Thanks Paul :)
« Last Edit: April 22, 2023, 05:12:03 am by Ian Manners »
Cheers
Ian B Manners

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4713
  • Karma: +41/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: AHCI and Virtualbox
« Reply #14 on: April 21, 2023, 10:58:22 pm »
Hi

VirtualBox 7.0.8 (Windows/Linux host) was released on April 18.

I don't see anything related to storage in the Changelog. It will be good to see if there are some changes with ArcaOS.

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.