Discussion:
[gentoo-user] Kernel parameters for VirtualBox
(too old to reply)
Peter Humphrey
2016-02-17 13:40:04 UTC
Permalink
Hello list,

I'm going round in circles here. I've been running VirtualBox and BOINC for
years with no problems to speak of.

Over the last year or more I've experienced mysterious failures in many
programs, some of them real nuisances, and recently I decided to replace my
RAM modules with a single matched set, which seems to have done the trick - so
far! It's required complete recompilation of everything, and throwing away
quite a lot of data that seemed to have been damaged at some time (hello
KMail).

Now however I can't get VirtualBox running properly. I've tried the latest
stable version and two testing versions, but at every login via KDM I get a
pop-up notice "VBoxClient: the VirtualBox kernel service is not running."
That's without any clients active or trying to be. If I then start virtualbox-
guest-additions I get this:

# /etc/init.d/virtualbox-guest-additions start
* Loading kernel modules
modprobe: ERROR: could not insert 'vboxguest': No such device
modprobe: ERROR: could not insert 'vboxsf': No such device
* ERROR: virtualbox-guest-additions failed to start

I assume I'm missing something in my kernel config, but I can't see what.

linux # grep -i virt .config
# CONFIG_VIRT_CPU_ACCOUNTING_GEN is not set
CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y
CONFIG_VIRT_TO_BUS=y
# CONFIG_FB_VIRTUAL is not set
# CONFIG_SND_VIRTUOSO is not set
CONFIG_VIRT_DRIVERS=y
# Virtio drivers
# CONFIG_VIRTIO_PCI is not set
# CONFIG_VIRTIO_MMIO is not set
# CONFIG_DEBUG_VIRTUAL is not set
CONFIG_VIRTUALIZATION=y

Most of those unset values are for when this kernel is running as a guest of
another OS, so I assume I don't need them when running as the host OS. Others
I can't set because they're hidden until I set the values to be a guest.

I can find lots of other people struggling with this and similar problems, but
no fix.

Any ideas here?
--
Rgds
Peter
J. Roeleveld
2016-02-17 14:20:01 UTC
Permalink
Post by Peter Humphrey
Hello list,
I'm going round in circles here. I've been running VirtualBox and BOINC for
years with no problems to speak of.
Over the last year or more I've experienced mysterious failures in many
programs, some of them real nuisances, and recently I decided to replace my
RAM modules with a single matched set, which seems to have done the trick -
so far! It's required complete recompilation of everything, and throwing
away quite a lot of data that seemed to have been damaged at some time
(hello KMail).
Corruption due to bad memory can't be blamed on the actual software.
Post by Peter Humphrey
Now however I can't get VirtualBox running properly. I've tried the latest
stable version and two testing versions, but at every login via KDM I get a
pop-up notice "VBoxClient: the VirtualBox kernel service is not running."
That's without any clients active or trying to be. If I then start
# /etc/init.d/virtualbox-guest-additions start
* Loading kernel modules
modprobe: ERROR: could not insert 'vboxguest': No such device
modprobe: ERROR: could not insert 'vboxsf': No such device
* ERROR: virtualbox-guest-additions failed to start
This is ONLY for guests, NOT the host.
Post by Peter Humphrey
I assume I'm missing something in my kernel config, but I can't see what.
linux # grep -i virt .config
# CONFIG_VIRT_CPU_ACCOUNTING_GEN is not set
CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y
CONFIG_VIRT_TO_BUS=y
# CONFIG_FB_VIRTUAL is not set
# CONFIG_SND_VIRTUOSO is not set
CONFIG_VIRT_DRIVERS=y
# Virtio drivers
# CONFIG_VIRTIO_PCI is not set
# CONFIG_VIRTIO_MMIO is not set
# CONFIG_DEBUG_VIRTUAL is not set
CONFIG_VIRTUALIZATION=y
VirtualBox does NOT use these.
I only have the following set:
# CONFIG_VIRT_CPU_ACCOUNTING_GEN is not set
CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y
CONFIG_VIRT_TO_BUS=y
Post by Peter Humphrey
Most of those unset values are for when this kernel is running as a guest of
another OS, so I assume I don't need them when running as the host OS.
Others I can't set because they're hidden until I set the values to be a
guest.
I can find lots of other people struggling with this and similar problems,
but no fix.
Any ideas here?
Yes, for the host, make sure you load the virtualbox modules:

% lsmod | grep vbox
vboxpci 12760 0
vboxnetflt 16280 0
vboxnetadp 17808 0
vboxdrv 347894 3 vboxnetadp,vboxnetflt,vboxpci


I achieve this with the following:

% cat /etc/conf.d/modules | grep vbox
modules="vboxdrv vboxnetadp vboxnetflt vboxpci"

These can be found in " app-emulation/virtualbox-modules "

It tells you to do this in the post-emerge:

* If you are using sys-apps/openrc, please add "vboxdrv", "vboxnetflt"
* and "vboxnetadp" to:
* /etc/conf.d/modules

--
Joost
Peter Humphrey
2016-02-17 17:10:02 UTC
Permalink
Post by J. Roeleveld
Post by Peter Humphrey
I'm going round in circles here. I've been running VirtualBox and
BOINC for years with no problems to speak of.
Over the last year or more I've experienced mysterious failures in many
programs, some of them real nuisances, and recently I decided to replace
my RAM modules with a single matched set, which seems to have done the
trick - so far! It's required complete recompilation of everything, and
throwing away quite a lot of data that seemed to have been damaged at
some time (hello KMail).
Corruption due to bad memory can't be blamed on the actual software.
No, of course not. It's just that KMail can't cope with whatever kind of
damage was caused. Archiving and importing the 30,000 mails didn't cure it
either.
Post by J. Roeleveld
Post by Peter Humphrey
Now however I can't get VirtualBox running properly. I've tried the latest
stable version and two testing versions, but at every login via KDM I get a
pop-up notice "VBoxClient: the VirtualBox kernel service is not running."
That's without any clients active or trying to be. If I then start
# /etc/init.d/virtualbox-guest-additions start
* Loading kernel modules
modprobe: ERROR: could not insert 'vboxguest': No such device
modprobe: ERROR: could not insert 'vboxsf': No such device
* ERROR: virtualbox-guest-additions failed to start
This is ONLY for guests, NOT the host.
As I thought. However, some BOINC projects download a .vdi file and present it
to VirtualBox as a guest. I wasn't sure (while going round in circles) whether
that required me to set some kernel options to suit.
Post by J. Roeleveld
Post by Peter Humphrey
I assume I'm missing something in my kernel config, but I can't see what.
linux # grep -i virt .config
# CONFIG_VIRT_CPU_ACCOUNTING_GEN is not set
CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y
CONFIG_VIRT_TO_BUS=y
# CONFIG_FB_VIRTUAL is not set
# CONFIG_SND_VIRTUOSO is not set
CONFIG_VIRT_DRIVERS=y
# Virtio drivers
# CONFIG_VIRTIO_PCI is not set
# CONFIG_VIRTIO_MMIO is not set
# CONFIG_DEBUG_VIRTUAL is not set
CONFIG_VIRTUALIZATION=y
VirtualBox does NOT use these.
# CONFIG_VIRT_CPU_ACCOUNTING_GEN is not set
CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y
CONFIG_VIRT_TO_BUS=y
Okay. I've tried that and I still get the pop-up notice "VBoxClient: the
VirtualBox kernel service is not running." This is with version 4.3.32. I'll
try later versions and see what happens. Thanks for the info.
Post by J. Roeleveld
Post by Peter Humphrey
Most of those unset values are for when this kernel is running as a guest
of another OS, so I assume I don't need them when running as the host OS.
Others I can't set because they're hidden until I set the values to be a
guest.
I can find lots of other people struggling with this and similar problems,
but no fix.
Any ideas here?
% lsmod | grep vbox
vboxpci 12760 0
vboxnetflt 16280 0
vboxnetadp 17808 0
vboxdrv 347894 3 vboxnetadp,vboxnetflt,vboxpci
% cat /etc/conf.d/modules | grep vbox
modules="vboxdrv vboxnetadp vboxnetflt vboxpci"
These can be found in " app-emulation/virtualbox-modules "
* If you are using sys-apps/openrc, please add "vboxdrv", "vboxnetflt"
* /etc/conf.d/modules
Yes, of course I did that long ago. I also found that it's important to
specify vboxnetadp before vboxnetflt, otherwise adp doesn't get loaded.
--
Rgds
Peter
Mick
2016-02-17 17:20:03 UTC
Permalink
Post by Peter Humphrey
Post by J. Roeleveld
Post by Peter Humphrey
I'm going round in circles here. I've been running VirtualBox and
BOINC for years with no problems to speak of.
Over the last year or more I've experienced mysterious failures in many
programs, some of them real nuisances, and recently I decided to replace
my RAM modules with a single matched set, which seems to have done the
trick - so far! It's required complete recompilation of everything, and
throwing away quite a lot of data that seemed to have been damaged at
some time (hello KMail).
Corruption due to bad memory can't be blamed on the actual software.
No, of course not. It's just that KMail can't cope with whatever kind of
damage was caused. Archiving and importing the 30,000 mails didn't cure it
either.
Post by J. Roeleveld
Post by Peter Humphrey
Now however I can't get VirtualBox running properly. I've tried the latest
stable version and two testing versions, but at every login via KDM I
get
a
pop-up notice "VBoxClient: the VirtualBox kernel service is not running."
That's without any clients active or trying to be. If I then start
# /etc/init.d/virtualbox-guest-additions start
* Loading kernel modules
modprobe: ERROR: could not insert 'vboxguest': No such device
modprobe: ERROR: could not insert 'vboxsf': No such device
* ERROR: virtualbox-guest-additions failed to start
This is ONLY for guests, NOT the host.
As I thought. However, some BOINC projects download a .vdi file and present
it to VirtualBox as a guest. I wasn't sure (while going round in circles)
whether that required me to set some kernel options to suit.
Post by J. Roeleveld
Post by Peter Humphrey
I assume I'm missing something in my kernel config, but I can't see what.
linux # grep -i virt .config
# CONFIG_VIRT_CPU_ACCOUNTING_GEN is not set
CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y
CONFIG_VIRT_TO_BUS=y
# CONFIG_FB_VIRTUAL is not set
# CONFIG_SND_VIRTUOSO is not set
CONFIG_VIRT_DRIVERS=y
# Virtio drivers
# CONFIG_VIRTIO_PCI is not set
# CONFIG_VIRTIO_MMIO is not set
# CONFIG_DEBUG_VIRTUAL is not set
CONFIG_VIRTUALIZATION=y
VirtualBox does NOT use these.
# CONFIG_VIRT_CPU_ACCOUNTING_GEN is not set
CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y
CONFIG_VIRT_TO_BUS=y
Okay. I've tried that and I still get the pop-up notice "VBoxClient: the
VirtualBox kernel service is not running." This is with version 4.3.32. I'll
try later versions and see what happens. Thanks for the info.
Post by J. Roeleveld
Post by Peter Humphrey
Most of those unset values are for when this kernel is running as a guest
of another OS, so I assume I don't need them when running as the host OS.
Others I can't set because they're hidden until I set the values to be a
guest.
I can find lots of other people struggling with this and similar problems,
but no fix.
Any ideas here?
% lsmod | grep vbox
vboxpci 12760 0
vboxnetflt 16280 0
vboxnetadp 17808 0
vboxdrv 347894 3 vboxnetadp,vboxnetflt,vboxpci
% cat /etc/conf.d/modules | grep vbox
modules="vboxdrv vboxnetadp vboxnetflt vboxpci"
These can be found in " app-emulation/virtualbox-modules "
* If you are using sys-apps/openrc, please add "vboxdrv", "vboxnetflt"
* /etc/conf.d/modules
Yes, of course I did that long ago. I also found that it's important to
specify vboxnetadp before vboxnetflt, otherwise adp doesn't get loaded.
Hmm ... it loads up here. However, I've now set it up as you suggest.
--
Regards,
Mick
J. Roeleveld
2016-02-17 19:50:03 UTC
Permalink
[....]
Post by Peter Humphrey
Post by J. Roeleveld
This is ONLY for guests, NOT the host.
As I thought. However, some BOINC projects download a .vdi file and present
it to VirtualBox as a guest. I wasn't sure (while going round in circles)
whether that required me to set some kernel options to suit.
Shouldn't be necessary on the host.
Post by Peter Humphrey
Post by J. Roeleveld
Post by Peter Humphrey
I assume I'm missing something in my kernel config, but I can't see what.
linux # grep -i virt .config
# CONFIG_VIRT_CPU_ACCOUNTING_GEN is not set
CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y
CONFIG_VIRT_TO_BUS=y
# CONFIG_FB_VIRTUAL is not set
# CONFIG_SND_VIRTUOSO is not set
CONFIG_VIRT_DRIVERS=y
# Virtio drivers
# CONFIG_VIRTIO_PCI is not set
# CONFIG_VIRTIO_MMIO is not set
# CONFIG_DEBUG_VIRTUAL is not set
CONFIG_VIRTUALIZATION=y
VirtualBox does NOT use these.
# CONFIG_VIRT_CPU_ACCOUNTING_GEN is not set
CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y
CONFIG_VIRT_TO_BUS=y
Okay. I've tried that and I still get the pop-up notice "VBoxClient: the
VirtualBox kernel service is not running." This is with version 4.3.32. I'll
try later versions and see what happens. Thanks for the info.
I actually run 4.3.28 myself at the moment.
Post by Peter Humphrey
Post by J. Roeleveld
Post by Peter Humphrey
Most of those unset values are for when this kernel is running as a guest
of another OS, so I assume I don't need them when running as the host OS.
Others I can't set because they're hidden until I set the values to be a
guest.
I can find lots of other people struggling with this and similar problems,
but no fix.
Any ideas here?
% lsmod | grep vbox
vboxpci 12760 0
vboxnetflt 16280 0
vboxnetadp 17808 0
vboxdrv 347894 3 vboxnetadp,vboxnetflt,vboxpci
% cat /etc/conf.d/modules | grep vbox
modules="vboxdrv vboxnetadp vboxnetflt vboxpci"
These can be found in " app-emulation/virtualbox-modules "
* If you are using sys-apps/openrc, please add "vboxdrv", "vboxnetflt"
* /etc/conf.d/modules
Yes, of course I did that long ago. I also found that it's important to
specify vboxnetadp before vboxnetflt, otherwise adp doesn't get loaded.
I use the order listed above and all modules actually get loaded.

One other thing, are you in the "vboxusers" group?
My user is and I have the following devices:

% ls -lsa /dev/vbox*
0 crw------- 1 root root 10, 56 Feb 7 13:16 /dev/vboxdrv
0 crw------- 1 root root 10, 55 Feb 7 13:16 /dev/vboxdrvu
0 crw------- 1 root root 10, 54 Feb 7 13:16 /dev/vboxnetctl

/dev/vboxusb:
total 0
0 drwxr-x--- 3 root vboxusers 60 Feb 7 15:24 .
0 drwxr-xr-x 18 root root 6360 Feb 17 18:13 ..
0 drwxr-x--- 2 root vboxusers 100 Feb 17 18:13 001

What do you get for the following:

% ls -lsa /dev/vbox*
% lsmod | grep vbox


--
Joost
Peter Humphrey
2016-02-18 10:10:01 UTC
Permalink
--->8
Post by J. Roeleveld
Post by Peter Humphrey
Post by Peter Humphrey
# CONFIG_VIRT_CPU_ACCOUNTING_GEN is not set
CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y
CONFIG_VIRT_TO_BUS=y
Okay. I've tried that and I still get the pop-up notice "VBoxClient: the
VirtualBox kernel service is not running." This is with version 4.3.32.
I'll try later versions and see what happens. Thanks for the info.
I actually run 4.3.28 myself at the moment.
Right.

--->8
Post by J. Roeleveld
One other thing, are you in the "vboxusers" group?
Of course. Also the vboxguest group recently.
Post by J. Roeleveld
% ls -lsa /dev/vbox*
0 crw------- 1 root root 10, 56 Feb 7 13:16 /dev/vboxdrv
0 crw------- 1 root root 10, 55 Feb 7 13:16 /dev/vboxdrvu
0 crw------- 1 root root 10, 54 Feb 7 13:16 /dev/vboxnetctl
total 0
0 drwxr-x--- 3 root vboxusers 60 Feb 7 15:24 .
0 drwxr-xr-x 18 root root 6360 Feb 17 18:13 ..
0 drwxr-x--- 2 root vboxusers 100 Feb 17 18:13 001
% ls -lsa /dev/vbox*
% lsmod | grep vbox
# ls -lsa /dev/vbox*
0 crw------- 1 root root 10, 58 Feb 17 16:54 /dev/vboxdrv
0 crw------- 1 root root 10, 57 Feb 17 16:54 /dev/vboxdrvu
0 crw------- 1 root root 10, 56 Feb 17 16:54 /dev/vboxnetctl

/dev/vboxusb:
total 0
0 drwxr-x--- 3 root vboxusers 60 Feb 17 16:54 .
0 drwxr-xr-x 19 root root 3.9K Feb 18 09:40 ..
0 drwxr-x--- 2 root vboxusers 80 Feb 18 09:40 002

# ls -lsa /dev/vboxusb/002
total 0
0 drwxr-x--- 2 root vboxusers 80 Feb 18 09:40 .
0 drwxr-x--- 3 root vboxusers 60 Feb 17 16:54 ..
0 crw-rw---- 1 root vboxusers 189, 130 Feb 17 16:54 003
0 crw-rw---- 1 root vboxusers 189, 133 Feb 18 09:40 006

# lsmod | grep vbox
vboxpci 13106 0
vboxnetflt 16882 0
vboxnetadp 17862 0
vboxdrv 331090 3 vboxnetadp,vboxnetflt,vboxpci

I still can't shake the idea that I don't have my kernel set up right. Do I
need anything particular in control groups, or name spaces, or anything?
--
Rgds
Peter
Peter Humphrey
2016-02-18 11:00:03 UTC
Permalink
Post by Peter Humphrey
I still can't shake the idea that I don't have my kernel set up right.
I found CONFIG_X86_X32, which I hadn't noticed before. I set it, made a new
kernel, remerged virtualbox-modules and rebooted. No pop-up notice!

I do still get this in boinc/stderrdae.txt though, so I don't have it right
yet:

[***@home] task postponed 86400.000000 sec: Communication with VM
Hypervisor failed.
--
Rgds
Peter
J. Roeleveld
2016-02-18 11:00:03 UTC
Permalink
Post by Peter Humphrey
Post by Peter Humphrey
I still can't shake the idea that I don't have my kernel set up right.
I found CONFIG_X86_X32, which I hadn't noticed before. I set it, made a new
kernel, remerged virtualbox-modules and rebooted. No pop-up notice!
Interesting.
I have that one set as well, was on as default I would assume.
Post by Peter Humphrey
I do still get this in boinc/stderrdae.txt though, so I don't have it right
Hypervisor failed.
I would assume that might be something with boinc?
Peter Humphrey
2016-02-20 12:00:02 UTC
Permalink
Post by J. Roeleveld
Post by Peter Humphrey
Post by Peter Humphrey
I still can't shake the idea that I don't have my kernel set up right.
I found CONFIG_X86_X32, which I hadn't noticed before. I set it, made a
new kernel, remerged virtualbox-modules and rebooted. No pop-up notice!
Interesting.
I have that one set as well, was on as default I would assume.
Post by Peter Humphrey
I do still get this in boinc/stderrdae.txt though, so I don't have it
Hypervisor failed.
I would assume that might be something with boinc?
In my case, I think it can't communicate because the necessary hardware
isn't there - the IOMMU stuff and maybe some devices. I've started a
conversation with the system builder, but at the moment it looks as though
I'll have to await the next BIOS upgrade - or else replace the motherboard.
--
Rgds
Peter
J. Roeleveld
2016-02-18 11:00:03 UTC
Permalink
Post by Peter Humphrey
--->8
Post by J. Roeleveld
Post by Peter Humphrey
Post by Peter Humphrey
# CONFIG_VIRT_CPU_ACCOUNTING_GEN is not set
CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y
CONFIG_VIRT_TO_BUS=y
Okay. I've tried that and I still get the pop-up notice "VBoxClient: the
VirtualBox kernel service is not running." This is with version 4.3.32.
I'll try later versions and see what happens. Thanks for the info.
I actually run 4.3.28 myself at the moment.
Right.
--->8
Post by J. Roeleveld
One other thing, are you in the "vboxusers" group?
Of course. Also the vboxguest group recently.
Post by J. Roeleveld
% ls -lsa /dev/vbox*
0 crw------- 1 root root 10, 56 Feb 7 13:16 /dev/vboxdrv
0 crw------- 1 root root 10, 55 Feb 7 13:16 /dev/vboxdrvu
0 crw------- 1 root root 10, 54 Feb 7 13:16 /dev/vboxnetctl
total 0
0 drwxr-x--- 3 root vboxusers 60 Feb 7 15:24 .
0 drwxr-xr-x 18 root root 6360 Feb 17 18:13 ..
0 drwxr-x--- 2 root vboxusers 100 Feb 17 18:13 001
% ls -lsa /dev/vbox*
% lsmod | grep vbox
# ls -lsa /dev/vbox*
0 crw------- 1 root root 10, 58 Feb 17 16:54 /dev/vboxdrv
0 crw------- 1 root root 10, 57 Feb 17 16:54 /dev/vboxdrvu
0 crw------- 1 root root 10, 56 Feb 17 16:54 /dev/vboxnetctl
total 0
0 drwxr-x--- 3 root vboxusers 60 Feb 17 16:54 .
0 drwxr-xr-x 19 root root 3.9K Feb 18 09:40 ..
0 drwxr-x--- 2 root vboxusers 80 Feb 18 09:40 002
# ls -lsa /dev/vboxusb/002
total 0
0 drwxr-x--- 2 root vboxusers 80 Feb 18 09:40 .
0 drwxr-x--- 3 root vboxusers 60 Feb 17 16:54 ..
0 crw-rw---- 1 root vboxusers 189, 130 Feb 17 16:54 003
0 crw-rw---- 1 root vboxusers 189, 133 Feb 18 09:40 006
# lsmod | grep vbox
vboxpci 13106 0
vboxnetflt 16882 0
vboxnetadp 17862 0
vboxdrv 331090 3 vboxnetadp,vboxnetflt,vboxpci
I still can't shake the idea that I don't have my kernel set up right. Do I
need anything particular in control groups, or name spaces, or anything?
About the kernel: I don't have anything special.

USE-flags:

[I] app-emulation/virtualbox

Installed versions: 4.3.32{tbz2}(03:46:09 PM 11/25/2015)(additions alsa
extensions java opengl pam pulseaudio qt4 sdk udev -doc -headless -libressl -
python -vboxwebsrv -vnc ELIBC="-FreeBSD" PYTHON_TARGETS="python2_7")


What does " dmesg " have to say?

For me:
% dmesg | grep -i vbox
[ 165.950507] vboxdrv: Found 8 processor cores.
[ 165.950787] vboxdrv: fAsync=0 offMin=0x1fe offMax=0xa4f9
[ 165.950828] vboxdrv: TSC mode is 'synchronous', kernel timer mode is
'normal'.
[ 165.950829] vboxdrv: Successfully loaded version 4.3.32 (interface
0x001a000b).
[ 165.978641] vboxpci: pci-stub module not available, cannot detach PCI
devices
[ 165.978643] vboxpci: IOMMU found


I actually updated to 4.3.32 yesterday. VMs are still starting.

How exactly are you starting the VMs?

I do it all with the GUI: /usr/bin/VirtualBox

--
Joost
Peter Humphrey
2016-02-18 11:30:02 UTC
Permalink
--->8
Post by J. Roeleveld
Post by Peter Humphrey
I still can't shake the idea that I don't have my kernel set up right. Do I
need anything particular in control groups, or name spaces, or anything?
About the kernel: I don't have anything special.
[I] app-emulation/virtualbox
Installed versions: 4.3.32{tbz2}(03:46:09 PM 11/25/2015)(additions
alsa extensions java opengl pam pulseaudio qt4 sdk udev -doc -headless
-libressl - python -vboxwebsrv -vnc ELIBC="-FreeBSD"
PYTHON_TARGETS="python2_7")
My USE flags:

Installed versions: 4.3.32{tbz2}(10:25:28 18/02/16)(additions alsa
extensions opengl pam qt4 sdk udev -doc -headless -java -libressl -pulseaudio
-python -vboxwebsrv -vnc ELIBC="-FreeBSD" PYTHON_TARGETS="python2_7")

I don't have pulseaudio here, but do I need java for virtualbox?
Post by J. Roeleveld
What does " dmesg " have to say?
% dmesg | grep -i vbox
[ 165.950507] vboxdrv: Found 8 processor cores.
[ 165.950787] vboxdrv: fAsync=0 offMin=0x1fe offMax=0xa4f9
[ 165.950828] vboxdrv: TSC mode is 'synchronous', kernel timer mode is
'normal'.
[ 165.950829] vboxdrv: Successfully loaded version 4.3.32 (interface
0x001a000b).
[ 165.978641] vboxpci: pci-stub module not available, cannot detach PCI
devices
[ 165.978643] vboxpci: IOMMU found
$ dmesg | grep -i vbox
[ 4.163645] vboxdrv: Found 4 processor cores.
[ 4.163748] vboxdrv: fAsync=0 offMin=0x1d8 offMax=0xd44
[ 4.163792] vboxdrv: TSC mode is 'synchronous', kernel timer mode is
'normal'.
[ 4.163793] vboxdrv: Successfully loaded version 4.3.32 (interface
0x001a000b).
[ 4.173458] vboxpci: pci-stub module not available, cannot detach PCI
devices
[ 4.173461] vboxpci: IOMMU not found (not registered)

That last one is suspicious, presumably connected with this:

$ dmesg | grep IOMMU
[ 0.119875] dmar: IOMMU: failed to map dmar0
[ 4.173461] vboxpci: IOMMU not found (not registered)

I wonder what dmar0 is.
Post by J. Roeleveld
How exactly are you starting the VMs?
I do it all with the GUI: /usr/bin/VirtualBox
Me too, with no problems, but one BOINC project I use includes a .vdi which it
submits to virtualbox as a guest. That's what's failing. I want to make sure
virtualbox is set up right before going after that.
--
Rgds
Peter
Peter Humphrey
2016-02-18 12:10:02 UTC
Permalink
Post by Peter Humphrey
--->8
Post by J. Roeleveld
Post by Peter Humphrey
I still can't shake the idea that I don't have my kernel set up right.
Do
I
need anything particular in control groups, or name spaces, or anything?
About the kernel: I don't have anything special.
[I] app-emulation/virtualbox
Installed versions: 4.3.32{tbz2}(03:46:09 PM 11/25/2015)(additions
alsa extensions java opengl pam pulseaudio qt4 sdk udev -doc -headless
-libressl - python -vboxwebsrv -vnc ELIBC="-FreeBSD"
PYTHON_TARGETS="python2_7")
Installed versions: 4.3.32{tbz2}(10:25:28 18/02/16)(additions alsa
extensions opengl pam qt4 sdk udev -doc -headless -java -libressl
-pulseaudio -python -vboxwebsrv -vnc ELIBC="-FreeBSD"
PYTHON_TARGETS="python2_7")
I don't have pulseaudio here, but do I need java for virtualbox?
Post by J. Roeleveld
What does " dmesg " have to say?
% dmesg | grep -i vbox
[ 165.950507] vboxdrv: Found 8 processor cores.
[ 165.950787] vboxdrv: fAsync=0 offMin=0x1fe offMax=0xa4f9
[ 165.950828] vboxdrv: TSC mode is 'synchronous', kernel timer mode is
'normal'.
[ 165.950829] vboxdrv: Successfully loaded version 4.3.32 (interface
0x001a000b).
[ 165.978641] vboxpci: pci-stub module not available, cannot detach PCI
devices
[ 165.978643] vboxpci: IOMMU found
$ dmesg | grep -i vbox
[ 4.163645] vboxdrv: Found 4 processor cores.
[ 4.163748] vboxdrv: fAsync=0 offMin=0x1d8 offMax=0xd44
[ 4.163792] vboxdrv: TSC mode is 'synchronous', kernel timer mode is
'normal'.
[ 4.163793] vboxdrv: Successfully loaded version 4.3.32 (interface
0x001a000b).
[ 4.173458] vboxpci: pci-stub module not available, cannot detach PCI
devices
[ 4.173461] vboxpci: IOMMU not found (not registered)
$ dmesg | grep IOMMU
[ 0.119875] dmar: IOMMU: failed to map dmar0
[ 4.173461] vboxpci: IOMMU not found (not registered)
I wonder what dmar0 is.
While exploring that, I found advice to add iommu=soft to the kernel options.
Then I got this:

# dmesg | grep -i dmar
[ 0.000000] ACPI: DMAR 0x00000000BFE880C0 000090 (v01 AMI OEMDMAR
00000001 MSFT 00000097)
[ 0.119714] dmar: Host address width 36
[ 0.119873] dmar: DRHD base: 0x000000fed90000 flags: 0x1
[ 0.120202] WARNING: CPU: 0 PID: 1 at drivers/iommu/dmar.c:829
warn_invalid_dmar+0x7c/0x90()
[ 0.120481] Your BIOS is broken; DMAR reported at address fed90000 returns
all ones!
[ 0.123772] [<ffffffff813f12bc>] warn_invalid_dmar+0x7c/0x90
[ 0.123934] [<ffffffff813f2549>] dmar_parse_one_drhd+0x4f9/0x550
[ 0.124096] [<ffffffff813f1129>] dmar_walk_remapping_entries+0x29/0x140
[ 0.124260] [<ffffffff81907be6>] dmar_table_init+0xb9/0x138
[ 0.124421] [<ffffffff813f2050>] ? dmar_free_dev_scope+0xb0/0xb0
[ 0.124918] [<ffffffff813f12d0>] ? warn_invalid_dmar+0x90/0x90
[ 0.127042] dmar: IOMMU: failed to map dmar0
[ 0.127201] dmar: parse DMAR table failure.

Without that kernel option:

[ 0.000000] ACPI: DMAR 0x00000000BFE880C0 000090 (v01 AMI OEMDMAR
00000001 MSFT 00000097)
[ 0.000000] WARNING: CPU: 0 PID: 0 at drivers/iommu/dmar.c:829
warn_invalid_dmar+0x7c/0x90()
[ 0.000000] Your BIOS is broken; DMAR reported at address fed90000 returns
all ones!
[ 0.000000] [<ffffffff813f12bc>] warn_invalid_dmar+0x7c/0x90
[ 0.000000] [<ffffffff815749a0>] dmar_validate_one_drhd+0xb0/0xf0
[ 0.000000] [<ffffffff813f1129>] dmar_walk_remapping_entries+0x29/0x140
[ 0.120132] dmar: Host address width 36
[ 0.120291] dmar: DRHD base: 0x000000fed90000 flags: 0x1
[ 0.120472] dmar: IOMMU: failed to map dmar0
[ 0.120631] dmar: parse DMAR table failure.

So all the kernel option adds is some extra debug info. ***@home still can't
communicate with VirtualBox.

Now that I think about it, I did update the AMI BIOS several weeks ago. It
went from 1102 to 2101 - a bit of a step. Maybe that's what's broken my system
- well, this bit of it, anyway.
Post by Peter Humphrey
Post by J. Roeleveld
How exactly are you starting the VMs?
I do it all with the GUI: /usr/bin/VirtualBox
Me too, with no problems, but one BOINC project I use includes a .vdi which
it submits to virtualbox as a guest. That's what's failing. I want to make
sure virtualbox is set up right before going after that.
--
Rgds
Peter
J. Roeleveld
2016-02-18 14:20:01 UTC
Permalink
Post by Peter Humphrey
Post by Peter Humphrey
--->8
Post by J. Roeleveld
Post by Peter Humphrey
I still can't shake the idea that I don't have my kernel set up right.
Do
I
need anything particular in control groups, or name spaces, or anything?
About the kernel: I don't have anything special.
[I] app-emulation/virtualbox
Installed versions: 4.3.32{tbz2}(03:46:09 PM 11/25/2015)(additions
alsa extensions java opengl pam pulseaudio qt4 sdk udev -doc -headless
-libressl - python -vboxwebsrv -vnc ELIBC="-FreeBSD"
PYTHON_TARGETS="python2_7")
Installed versions: 4.3.32{tbz2}(10:25:28 18/02/16)(additions alsa
extensions opengl pam qt4 sdk udev -doc -headless -java -libressl
-pulseaudio -python -vboxwebsrv -vnc ELIBC="-FreeBSD"
PYTHON_TARGETS="python2_7")
I don't have pulseaudio here, but do I need java for virtualbox?
Post by J. Roeleveld
What does " dmesg " have to say?
% dmesg | grep -i vbox
[ 165.950507] vboxdrv: Found 8 processor cores.
[ 165.950787] vboxdrv: fAsync=0 offMin=0x1fe offMax=0xa4f9
[ 165.950828] vboxdrv: TSC mode is 'synchronous', kernel timer mode is
'normal'.
[ 165.950829] vboxdrv: Successfully loaded version 4.3.32 (interface
0x001a000b).
[ 165.978641] vboxpci: pci-stub module not available, cannot detach PCI
devices
[ 165.978643] vboxpci: IOMMU found
$ dmesg | grep -i vbox
[ 4.163645] vboxdrv: Found 4 processor cores.
[ 4.163748] vboxdrv: fAsync=0 offMin=0x1d8 offMax=0xd44
[ 4.163792] vboxdrv: TSC mode is 'synchronous', kernel timer mode is
'normal'.
[ 4.163793] vboxdrv: Successfully loaded version 4.3.32 (interface
0x001a000b).
[ 4.173458] vboxpci: pci-stub module not available, cannot detach PCI
devices
[ 4.173461] vboxpci: IOMMU not found (not registered)
$ dmesg | grep IOMMU
[ 0.119875] dmar: IOMMU: failed to map dmar0
[ 4.173461] vboxpci: IOMMU not found (not registered)
I wonder what dmar0 is.
While exploring that, I found advice to add iommu=soft to the kernel
# dmesg | grep -i dmar
[ 0.000000] ACPI: DMAR 0x00000000BFE880C0 000090 (v01 AMI OEMDMAR
00000001 MSFT 00000097)
[ 0.119714] dmar: Host address width 36
[ 0.119873] dmar: DRHD base: 0x000000fed90000 flags: 0x1
[ 0.120202] WARNING: CPU: 0 PID: 1 at drivers/iommu/dmar.c:829
warn_invalid_dmar+0x7c/0x90()
[ 0.120481] Your BIOS is broken; DMAR reported at address fed90000
returns all ones!
[ 0.123772] [<ffffffff813f12bc>] warn_invalid_dmar+0x7c/0x90
[ 0.123934] [<ffffffff813f2549>] dmar_parse_one_drhd+0x4f9/0x550
[ 0.124096] [<ffffffff813f1129>] dmar_walk_remapping_entries+0x29/0x140
[ 0.124260] [<ffffffff81907be6>] dmar_table_init+0xb9/0x138
[ 0.124421] [<ffffffff813f2050>] ? dmar_free_dev_scope+0xb0/0xb0
[ 0.124918] [<ffffffff813f12d0>] ? warn_invalid_dmar+0x90/0x90
[ 0.127042] dmar: IOMMU: failed to map dmar0
[ 0.127201] dmar: parse DMAR table failure.
[ 0.000000] ACPI: DMAR 0x00000000BFE880C0 000090 (v01 AMI OEMDMAR
00000001 MSFT 00000097)
[ 0.000000] WARNING: CPU: 0 PID: 0 at drivers/iommu/dmar.c:829
warn_invalid_dmar+0x7c/0x90()
[ 0.000000] Your BIOS is broken; DMAR reported at address fed90000
returns all ones!
[ 0.000000] [<ffffffff813f12bc>] warn_invalid_dmar+0x7c/0x90
[ 0.000000] [<ffffffff815749a0>] dmar_validate_one_drhd+0xb0/0xf0
[ 0.000000] [<ffffffff813f1129>] dmar_walk_remapping_entries+0x29/0x140
[ 0.120132] dmar: Host address width 36
[ 0.120291] dmar: DRHD base: 0x000000fed90000 flags: 0x1
[ 0.120472] dmar: IOMMU: failed to map dmar0
[ 0.120631] dmar: parse DMAR table failure.
can't communicate with VirtualBox.
Now that I think about it, I did update the AMI BIOS several weeks ago. It
went from 1102 to 2101 - a bit of a step. Maybe that's what's broken my
system - well, this bit of it, anyway.
Could very well be the case.

I get the following in my dmesg:

# dmesg | grep -i iomm
[ 0.344602] dmar: IOMMU 0: reg_base_addr fed90000 ver 1:0 cap
c0000020660462 ecap f0101a
[ 0.344607] dmar: IOMMU 1: reg_base_addr fed91000 ver 1:0 cap
d2008020660462 ecap f010da
[ 0.344688] IOMMU: dmar0 using Queued invalidation
[ 0.344690] IOMMU: dmar1 using Queued invalidation
[ 0.344691] IOMMU: Setting RMRR:
[ 0.344700] IOMMU: Setting identity map for device 0000:00:02.0 [0xcd000000
- 0xcf1fffff]
[ 0.344887] IOMMU: Setting identity map for device 0000:00:14.0 [0xcbea9000
- 0xcbeb7fff]
[ 0.344908] IOMMU: Setting identity map for device 0000:00:1a.0 [0xcbea9000
- 0xcbeb7fff]
[ 0.344926] IOMMU: Setting identity map for device 0000:00:1d.0 [0xcbea9000
- 0xcbeb7fff]
[ 0.344939] IOMMU: Prepare 0-16MiB unity mapping for LPC
[ 0.344946] IOMMU: Setting identity map for device 0000:00:1f.0 [0x0 -
0xffffff]
[ 165.978643] vboxpci: IOMMU found
[14502.509549] created IOMMU domain ffff88009d275748


Also, not sure if the following might help:
# zgrep -i iomm /proc/config.gz
CONFIG_GART_IOMMU=y
# CONFIG_CALGARY_IOMMU is not set
CONFIG_IOMMU_HELPER=y
CONFIG_IOMMU_API=y
CONFIG_IOMMU_SUPPORT=y
# Generic IOMMU Pagetable Support
CONFIG_IOMMU_IOVA=y
# CONFIG_AMD_IOMMU is not set
CONFIG_INTEL_IOMMU=y
CONFIG_INTEL_IOMMU_DEFAULT_ON=y
CONFIG_INTEL_IOMMU_FLOPPY_WA=y
# CONFIG_IOMMU_DEBUG is not set
# CONFIG_IOMMU_STRESS is not set

# zgrep -i dmar /proc/config.gz
CONFIG_DMAR_TABLE=y


--
Joost
Peter Humphrey
2016-02-18 15:30:02 UTC
Permalink
--->8
Post by J. Roeleveld
Post by Peter Humphrey
Now that I think about it, I did update the AMI BIOS several weeks ago.
It went from 1102 to 2101 - a bit of a step. Maybe that's what's broken
my system - well, this bit of it, anyway.
Could very well be the case.
In which case I'm stuck, because the BIOS's ez-flash utility won't let me go
backwards in versions. Meanwhile I've flashed the latest one again just to
see if it would make any difference (it hasn't), this time remembering to
reset to defaults first.

There is a BIOS option called "Addon ROM display mode" which seems to ask
whether an expansion card's ROM should override the installed default,
though it's hard to tell with the "pidgin" English. I'll try flipping that
and see what happens. Later: nothing, as far as I can see.
Post by J. Roeleveld
# zgrep -i iomm /proc/config.gz
CONFIG_GART_IOMMU=y
# CONFIG_CALGARY_IOMMU is not set
CONFIG_IOMMU_HELPER=y
CONFIG_IOMMU_API=y
CONFIG_IOMMU_SUPPORT=y
# Generic IOMMU Pagetable Support
CONFIG_IOMMU_IOVA=y
# CONFIG_AMD_IOMMU is not set
CONFIG_INTEL_IOMMU=y
CONFIG_INTEL_IOMMU_DEFAULT_ON=y
CONFIG_INTEL_IOMMU_FLOPPY_WA=y
# CONFIG_IOMMU_DEBUG is not set
# CONFIG_IOMMU_STRESS is not set
Mine's the same.
Post by J. Roeleveld
# zgrep -i dmar /proc/config.gz
CONFIG_DMAR_TABLE=y
Ditto.

My options now seem to be to replace the motherboard, replace the display
card, both of which are now just over six years old - or drop BOINC projects
that use VirtualBox.

Thanks for the help, Joost. If anyone else has any ideas I'd be grateful to
hear them too.
--
Rgds
Peter
J. Roeleveld
2016-02-18 15:50:02 UTC
Permalink
Post by Peter Humphrey
--->8
Post by J. Roeleveld
Post by Peter Humphrey
Now that I think about it, I did update the AMI BIOS several weeks ago.
It went from 1102 to 2101 - a bit of a step. Maybe that's what's broken
my system - well, this bit of it, anyway.
Could very well be the case.
In which case I'm stuck, because the BIOS's ez-flash utility won't let me go
backwards in versions. Meanwhile I've flashed the latest one again just to
see if it would make any difference (it hasn't), this time remembering to
reset to defaults first.
There is a BIOS option called "Addon ROM display mode" which seems to ask
whether an expansion card's ROM should override the installed default,
though it's hard to tell with the "pidgin" English. I'll try flipping that
and see what happens. Later: nothing, as far as I can see.
You could try (depending on age and how helpful supplier is) a different method
to downgrade the BIOS.
Some mainboards have the option to downgrade by adding a different flash-rom
with an older version and/or you could have it flashed differently.
Post by Peter Humphrey
Post by J. Roeleveld
# zgrep -i iomm /proc/config.gz
CONFIG_GART_IOMMU=y
# CONFIG_CALGARY_IOMMU is not set
CONFIG_IOMMU_HELPER=y
CONFIG_IOMMU_API=y
CONFIG_IOMMU_SUPPORT=y
# Generic IOMMU Pagetable Support
CONFIG_IOMMU_IOVA=y
# CONFIG_AMD_IOMMU is not set
CONFIG_INTEL_IOMMU=y
CONFIG_INTEL_IOMMU_DEFAULT_ON=y
CONFIG_INTEL_IOMMU_FLOPPY_WA=y
# CONFIG_IOMMU_DEBUG is not set
# CONFIG_IOMMU_STRESS is not set
Mine's the same.
Post by J. Roeleveld
# zgrep -i dmar /proc/config.gz
CONFIG_DMAR_TABLE=y
Ditto.
My options now seem to be to replace the motherboard, replace the display
card, both of which are now just over six years old - or drop BOINC projects
that use VirtualBox.
Thanks for the help, Joost. If anyone else has any ideas I'd be grateful to
hear them too.
Current thoughts:

I/O APIC in the VM settings. Try toggling it (same as other options)

Especially if they are different between VMs that work and don't work.


My kernel version:
# uname -a
Linux andromeda 4.1.12-gentoo #1 SMP PREEMPT Wed Nov 25 20:47:48 CET 2015
x86_64 Intel(R) Core(TM) i7-4800MQ CPU @ 2.70GHz GenuineIntel GNU/Linux

Haven't upgraded this system yet to a new kernel. That is planned for next
week. I run Gentoo-stable on this laptop.

--
Joost
Mick
2016-02-18 18:30:03 UTC
Permalink
Post by Peter Humphrey
In which case I'm stuck, because the BIOS's ez-flash utility won't let me
go backwards in versions. Meanwhile I've flashed the latest one again just
to see if it would make any difference (it hasn't), this time remembering
to reset to defaults first.
Downgrading the BIOS firmware can be a risky business, but if you use the
appropriate process and tools it should be achievable. Get the firmware of
one version *prior* to the version you want to end up with; i.e. go back two
steps in version terms not just one. If the downgrade is successful, then you
will need to re-flash it with the version you intend to end up with.

On ASUS boards EZ-Flash will read the version in the file name of the ROM
image file and refuse to upload it. If you rename the file so as to remove
the version from the file name, EZ-Flash should accept it. For example, on an
ASUS PC of mine let's say I currently run:

A88XM-PLUS-ASUS-2401.CAP

To downgrade to A88XM-PLUS-ASUS-2400.CAP I will need to obtain a version
earlier that that, i.e. A88XM-PLUS-ASUS-2399.CAP, to remove "-2399" from the
name and try to flash the BIOS with the renamed file. Then upgrade to next
version -2400 which I want to run the MoBo with. The naming convention is
particular to the BIOS make and model, so search your MoBo/BIOS manufacturer's
website for detailed instructions and tools.

Whatever you do, once you start flashing the ROM do not interrupt the process,
or you will most likely brick it. Alternatively, it may be easier to wait for
a while until a later firmware version is released and try that to see if it
fixes any regression bugs of the current version.
--
Regards,
Mick
Peter Humphrey
2016-02-19 10:50:01 UTC
Permalink
Post by Mick
Post by Peter Humphrey
In which case I'm stuck, because the BIOS's ez-flash utility won't let me
go backwards in versions. Meanwhile I've flashed the latest one again
just to see if it would make any difference (it hasn't), this time
remembering to reset to defaults first.
Downgrading the BIOS firmware can be a risky business, but if you use the
appropriate process and tools it should be achievable. Get the firmware
of one version *prior* to the version you want to end up with; i.e. go
back two steps in version terms not just one. If the downgrade is
successful, then you will need to re-flash it with the version you intend
to end up with.
Ooh, sneaky!
Post by Mick
On ASUS boards EZ-Flash will read the version in the file name of the ROM
image file and refuse to upload it. If you rename the file so as to
remove the version from the file name, EZ-Flash should accept it.
It didn't occur to me that it might be so simple as the file name; I supposed
EZ-Flash must read the content of the file. I'll give it a try anyway.
Post by Mick
A88XM-PLUS-ASUS-2401.CAP
To downgrade to A88XM-PLUS-ASUS-2400.CAP I will need to obtain a version
earlier that that, i.e. A88XM-PLUS-ASUS-2399.CAP, to remove "-2399" from
the name and try to flash the BIOS with the renamed file. Then upgrade
to next version -2400 which I want to run the MoBo with. The naming
convention is particular to the BIOS make and model, so search your
MoBo/BIOS manufacturer's website for detailed instructions and tools.
The process seems straightforward; I'm not so sure about the risk.
Post by Mick
Whatever you do, once you start flashing the ROM do not interrupt the
process, or you will most likely brick it.
Yes, of course.
Post by Mick
Alternatively, it may be easier to wait for a while until a later firmware
version is released and try that to see if it fixes any regression bugs of
the current version.
Could be, yes. Meanwhile I'll see if the system builder, Armari, can offer
any suggestions.

Thanks for the tip!
--
Rgds
Peter
Loading...