Project

General

Profile

Actions

Feature #13022

closed

Want method to globally disable HMA

Added by Andy Fiddaman about 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
bhyve
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:

Description

At present, it is only possible to run a hypervisor under the illumos kernel if it integrates with the HMA framework. This is causing problems for people who want to run Virtualbox on AMD. We could implement a switch via /etc/system to allow disabling HMA.


Related issues

Related to OpenIndiana Distribution - Bug #12809: VirtualBox 6.1.8 errors attempting to start VMResolved

Actions
Actions #1

Updated by Andy Fiddaman about 1 year ago

  • Subject changed from Want way to globally disable HMA to Want method to globally disable HMA
Actions #2

Updated by Andy Fiddaman about 1 year ago

  • Related to Bug #12809: VirtualBox 6.1.8 errors attempting to start VM added
Actions #3

Updated by Electric Monk about 1 year ago

  • Gerrit CR set to 833
Actions #4

Updated by Andy Fiddaman about 1 year ago

For testing on OmniOS using virtualbox and vagrant from the OmniOS extra repository.

As root (skip the first line if the extra.omnios publisher is already configured, although it won't do any harm to re-assert it)

pkg set-publisher -O https://pkg.omnios.org/r151034/extra extra.omnios
pkg install vagrant virtualbox

As non-root:

mkdir bento
cd bento
vagrant init bento/debian-10.4
vagrant up

Expect this to fail on an AMD box (or on Intel when bhyve or KVM is already running).

Now, as root:

echo set hma_disable = 1 > /etc/system.d/hma
init 6

and try again (as non-root):

cd bento
vagrant up
vagrant ssh
vagrant destroy

Actions #5

Updated by Andy Fiddaman about 1 year ago

Kindly tested for me by Volker A. Brandt on an AMD machine:

"Six-Core AMD Opteron(tm) Processor 8431"

Using OmniOS r151034 with Virtualbox 6.1.12

[20:15:19]  <v_a_b> OK, now everything works as expected.  Summary:  Without hma_disable=1, the VBoxHeadless will dump core.  With hma_disable, the vagrant debian box will come up and work fine:
[20:15:22]  <v_a_b> vagrant@debian-10:~$ uname  -a
[20:15:22]  <v_a_b> Linux debian-10 4.19.0-9-amd64 #1 SMP Debian 4.19.118-2+deb10u1 (2020-06-07) x86_64 GNU/Linux
[20:15:22]  <v_a_b> vagrant@debian-10:~$ uptime
[20:15:22]  <v_a_b>  19:15:04 up 4 min,  1 user,  load average: 0.00, 0.02, 0.00
[20:27:01]  <v_a_b> For giggles, I also tested oracle-8.2 and freebsd-12.1 -- both work fine.
[20:29:44]  <v_a_b> I now have three "VBoxHeadless" procs running, everything is stable.
Actions #6

Updated by Electric Monk about 1 year ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100

git commit be4662198f3d57350960479f8997432537cfd6a5

commit  be4662198f3d57350960479f8997432537cfd6a5
Author: Andy Fiddaman <omnios@citrus-it.co.uk>
Date:   2020-08-31T17:29:22.000Z

    13022 Want method to globally disable HMA
    Reviewed by: Patrick Mooney <pmooney@pfmooney.com>
    Reviewed by: Robert Mustacchi <rm@fingolfin.org>
    Approved by: Robert Mustacchi <rm@fingolfin.org>

Actions

Also available in: Atom PDF