VirtualBox and Hardware Virtualization Not Detected

Help with projects and applications, client configuration, system software tweaks.
The pinboard for cheat sheets.
Post Reply
crashtech
TAAT Member
Reactions:
Posts: 1544
Joined: Sun Sep 15, 2019 4:45 pm
Location: Idaho, USA

VirtualBox and Hardware Virtualization Not Detected

Post by crashtech »

I'm having some trouble with one of my Xeon boxes. Seems that neither Cosmo nor LHC can detect CPU virtualization:

http://www.cosmologyathome.org/show_hos ... tid=414605

https://lhcathome.cern.ch/lhcathome/sho ... d=10636521

And BOINC says that VirtualBox is not installed, but it is. Also see the output of lscpu which shows hardware virtualization enabled:

https://i.postimg.cc/g0VgPTwH/Screensho ... -43-58.png

Not sure where to look for a more detailed error log or solution, Google has not been terribly helpful.
User avatar
biodoc
TAAT Member
Reactions:
Posts: 1014
Joined: Sun Sep 15, 2019 3:22 pm
Location: Massachusetts, USA

Re: VirtualBox and Hardware Virtualization Not Detected

Post by biodoc »

How did you install virtualbox? I just went through this on ubuntu 19.1. Installing virtualbox (sudo apt install virtualbox) didn't work for me.

Installing the "metapackage for virtualbox-savvy projects" did work.
sudo apt install boinc-virtualbox

Reboot was required.
crashtech
TAAT Member
Reactions:
Posts: 1544
Joined: Sun Sep 15, 2019 4:45 pm
Location: Idaho, USA

Re: VirtualBox and Hardware Virtualization Not Detected

Post by crashtech »

biodoc wrote: Wed Mar 11, 2020 6:29 am How did you install virtualbox? I just went through this on ubuntu 19.1. Installing virtualbox (sudo apt install virtualbox) didn't work for me.

Installing the "metapackage for virtualbox-savvy projects" did work.
sudo apt install boinc-virtualbox

Reboot was required.
Thanks, biodoc. I used the Software Manager in the GUI to install that same thing:

https://i.postimg.cc/02M7LncF/mint-screen-031120.png

I wonder if it's some kind of permissions issue.
User avatar
biodoc
TAAT Member
Reactions:
Posts: 1014
Joined: Sun Sep 15, 2019 3:22 pm
Location: Massachusetts, USA

Re: VirtualBox and Hardware Virtualization Not Detected

Post by biodoc »

boinc should be a member of vboxusers.

mark@linux-x32:~$ groups boinc
boinc : boinc video render vboxusers

Also in the client_state.xml file I have this line near the top of the file.

<p_vm_extensions_disabled>0</p_vm_extensions_disabled>

If the value is 1, then try shutting down boinc and then edit and change to 0 and then restart boinc.
crashtech
TAAT Member
Reactions:
Posts: 1544
Joined: Sun Sep 15, 2019 4:45 pm
Location: Idaho, USA

Re: VirtualBox and Hardware Virtualization Not Detected

Post by crashtech »

biodoc wrote: Wed Mar 11, 2020 10:32 am boinc should be a member of vboxusers.

mark@linux-x32:~$ groups boinc
boinc : boinc video render vboxusers

Also in the client_state.xml file I have this line near the top of the file.

<p_vm_extensions_disabled>0</p_vm_extensions_disabled>

If the value is 1, then try shutting down boinc and then edit and change to 0 and then restart boinc.
"groups boinc" returns "boinc video vboxusers".

I did check the vm_extensions line in the client_state file before posting, that is one thing that I knew even coming from WIndows.

I'm really stumped on this one. Getting ready to nuke and pave after the Sprint if I can't figure it out. This machine happens to be the one that was inadvertently damaged, though I don't think the second socket being vacant and perhaps broken should affect hardware virtualization... should it?
User avatar
biodoc
TAAT Member
Reactions:
Posts: 1014
Joined: Sun Sep 15, 2019 3:22 pm
Location: Massachusetts, USA

Re: VirtualBox and Hardware Virtualization Not Detected

Post by biodoc »

crashtech wrote: Wed Mar 11, 2020 10:51 am I'm really stumped on this one. Getting ready to nuke and pave after the Sprint if I can't figure it out. This machine happens to be the one that was inadvertently damaged, though I don't think the second socket being vacant and perhaps broken should affect hardware virtualization... should it?
I don't know. Is it worth flashing the bios on that board?

One more diagnostic checking vbox modules:
mark@linux-x32:~$ lsmod | grep vbox
vboxpci 24576 0
vboxnetadp 28672 0
vboxnetflt 28672 0
vboxdrv 487424 3 vboxpci,vboxnetadp,vboxnetflt
crashtech
TAAT Member
Reactions:
Posts: 1544
Joined: Sun Sep 15, 2019 4:45 pm
Location: Idaho, USA

Re: VirtualBox and Hardware Virtualization Not Detected

Post by crashtech »

biodoc wrote: Wed Mar 11, 2020 11:14 am
One more diagnostic checking vbox modules:
mark@linux-x32:~$ lsmod | grep vbox
vboxpci 24576 0
vboxnetadp 28672 0
vboxnetflt 28672 0
vboxdrv 487424 3 vboxpci,vboxnetadp,vboxnetflt
Hmm, "lsmod | grep vbox" returns nothing at all!
User avatar
biodoc
TAAT Member
Reactions:
Posts: 1014
Joined: Sun Sep 15, 2019 3:22 pm
Location: Massachusetts, USA

Re: VirtualBox and Hardware Virtualization Not Detected

Post by biodoc »

maybe try installing:

sudo apt install virtualbox-dkms
crashtech
TAAT Member
Reactions:
Posts: 1544
Joined: Sun Sep 15, 2019 4:45 pm
Location: Idaho, USA

Re: VirtualBox and Hardware Virtualization Not Detected

Post by crashtech »

biodoc wrote: Wed Mar 11, 2020 11:43 am maybe try installing:

sudo apt install virtualbox-dkms

Code: Select all

z10pcd8-2@Z10PCD8-2:~$ sudo apt install virtualbox-dkms
[sudo] password for z10pcd8-2:         
Reading package lists... Done
Building dependency tree       
Reading state information... Done
virtualbox-dkms is already the newest version (5.2.34-dfsg-0~ubuntu18.04.1).
virtualbox-dkms set to manually installed.
The following packages were automatically installed and are no longer required:
  libllvm8:i386 linux-headers-4.15.0-76 linux-headers-4.15.0-76-generic
  linux-image-4.15.0-76-generic linux-modules-4.15.0-76-generic
  linux-modules-extra-4.15.0-76-generic
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
StefanR5R
TAAT Member
Reactions:
Posts: 1661
Joined: Wed Sep 25, 2019 4:32 pm

Re: VirtualBox and Hardware Virtualization Not Detected

Post by StefanR5R »

I don't remember how I installed virtualbox on Mint and OpenSuse.
The vbox driver(s) should probably already be loaded into the kernel at the time when boinc-client is started.

How about...
$ sudo modprobe vboxdrv
$ lsmod | grep vbox
$ sudo service boinc-client restart
crashtech
TAAT Member
Reactions:
Posts: 1544
Joined: Sun Sep 15, 2019 4:45 pm
Location: Idaho, USA

Re: VirtualBox and Hardware Virtualization Not Detected

Post by crashtech »

StefanR5R wrote: Wed Mar 11, 2020 5:14 pm I don't remember how I installed virtualbox on Mint and OpenSuse.
The vbox driver(s) should probably already be loaded into the kernel at the time when boinc-client is started.

How about...
$ sudo modprobe vboxdrv
$ lsmod | grep vbox
$ sudo service boinc-client restart
Thanks, Stefan, I'll see if I can try this later. It's been a busy day and evening for me!
crashtech
TAAT Member
Reactions:
Posts: 1544
Joined: Sun Sep 15, 2019 4:45 pm
Location: Idaho, USA

Re: VirtualBox and Hardware Virtualization Not Detected

Post by crashtech »

StefanR5R wrote: Wed Mar 11, 2020 5:14 pm I don't remember how I installed virtualbox on Mint and OpenSuse.
The vbox driver(s) should probably already be loaded into the kernel at the time when boinc-client is started.

How about...
$ sudo modprobe vboxdrv
$ lsmod | grep vbox
$ sudo service boinc-client restart
Cut off at the knees:
"modprobe: ERROR: could not insert 'vboxdrv': Operation not permitted"

Perhaps that presents a clue to the initiated, though?
StefanR5R
TAAT Member
Reactions:
Posts: 1661
Joined: Wed Sep 25, 2019 4:32 pm

Re: VirtualBox and Hardware Virtualization Not Detected

Post by StefanR5R »

crashtech wrote: Wed Mar 11, 2020 9:42 pm"modprobe: ERROR: could not insert 'vboxdrv': Operation not permitted"
Two thoughts:

Maybe another hypervisor is already loaded, e.g. kvm. Show us the output of lsmod. There can be only one hypervisor running. If you see something obvious, try to unload it with "sudo modprobe -r ......".

Or maybe "secure computing" or however it is called is enabled in the BIOS, such that only signed kernels can be booted and only signed kernel modules can be loaded. Reboot and check the BIOS options.
crashtech
TAAT Member
Reactions:
Posts: 1544
Joined: Sun Sep 15, 2019 4:45 pm
Location: Idaho, USA

Re: VirtualBox and Hardware Virtualization Not Detected

Post by crashtech »

StefanR5R wrote: Thu Mar 12, 2020 1:23 am Maybe another hypervisor is already loaded, e.g. kvm. Show us the output of lsmod. There can be only one hypervisor running. If you see something obvious, try to unload it with "sudo modprobe -r ......".

Or maybe "secure computing" or however it is called is enabled in the BIOS, such that only signed kernels can be booted and only signed kernel modules can be loaded. Reboot and check the BIOS options.
Looks like you are right:

Code: Select all

z10pcd8-2@Z10PCD8-2:~$ lsmod
Module                  Size  Used by
binfmt_misc            24576  1
ccm                    20480  6
ipmi_ssif              32768  0
nls_iso8859_1          16384  1
intel_rapl_msr         20480  0
intel_rapl_common      24576  1 intel_rapl_msr
sb_edac                28672  0
x86_pkg_temp_thermal    20480  0
intel_powerclamp       20480  0
coretemp               20480  0
kvm_intel             241664  0
kvm                   651264  1 kvm_intel
irqbypass              16384  1 kvm
crct10dif_pclmul       16384  1
crc32_pclmul           16384  0
ghash_clmulni_intel    16384  0
aesni_intel           372736  4
aes_x86_64             20480  1 aesni_intel
crypto_simd            16384  1 aesni_intel
cryptd                 24576  2 crypto_simd,ghash_clmulni_intel
glue_helper            16384  1 aesni_intel
carl9170               94208  0
ath                    36864  1 carl9170
intel_cstate           20480  0
mac80211              847872  1 carl9170
cfg80211              704512  3 carl9170,ath,mac80211
joydev                 28672  0
input_leds             16384  0
libarc4                16384  1 mac80211
intel_rapl_perf        20480  0
mei_me                 40960  0
lpc_ich                24576  0
mei                   102400  1 mei_me
ipmi_si                61440  0
ipmi_devintf           20480  0
ipmi_msghandler       102400  3 ipmi_devintf,ipmi_si,ipmi_ssif
acpi_pad              184320  0
mac_hid                16384  0
sch_fq_codel           20480  13
parport_pc             40960  0
ppdev                  24576  0
lp                     20480  0
parport                53248  3 parport_pc,lp,ppdev
ip_tables              32768  0
x_tables               40960  1 ip_tables
autofs4                45056  2
btrfs                1236992  0
xor                    24576  1 btrfs
zstd_compress         163840  1 btrfs
raid6_pq              114688  1 btrfs
libcrc32c              16384  1 btrfs
dm_mirror              24576  0
dm_region_hash         20480  1 dm_mirror
dm_log                 20480  2 dm_region_hash,dm_mirror
hid_generic            16384  0
usbhid                 53248  0
hid                   131072  2 usbhid,hid_generic
ast                    53248  1
drm_vram_helper        20480  1 ast
ttm                   102400  1 drm_vram_helper
drm_kms_helper        180224  1 ast
syscopyarea            16384  1 drm_kms_helper
sysfillrect            16384  1 drm_kms_helper
sysimgblt              16384  1 drm_kms_helper
fb_sys_fops            16384  1 drm_kms_helper
drm                   491520  6 drm_kms_helper,drm_vram_helper,ast,ttm
igb                   221184  0
mpt3sas               245760  0
ahci                   40960  2
dca                    16384  1 igb
i2c_algo_bit           16384  2 igb,ast
libahci                32768  1 ahci
raid_class             16384  1 mpt3sas
scsi_transport_sas     40960  1 mpt3sas
wmi                    32768  0
Though I do not know why they are there. Are the two kvm entries the only things that are obvious?
StefanR5R
TAAT Member
Reactions:
Posts: 1661
Joined: Wed Sep 25, 2019 4:32 pm

Re: VirtualBox and Hardware Virtualization Not Detected

Post by StefanR5R »

Hmm, I am seeing something unexpected on my own machines now:
kvm and kvmintel are present in the kernel simultaneously while vboxdrv, vboxnetadp,vboxnetflt,vboxpci are present too. So I was mistaken about the exclusivity of kvm vs. vbox.

Check the "secure computing" thing in the BIOS when you have an opportunity to go there.
User avatar
biodoc
TAAT Member
Reactions:
Posts: 1014
Joined: Sun Sep 15, 2019 3:22 pm
Location: Massachusetts, USA

Re: VirtualBox and Hardware Virtualization Not Detected

Post by biodoc »

Is it worth checking secure boot in the bios too? I've read that should be disabled.
crashtech
TAAT Member
Reactions:
Posts: 1544
Joined: Sun Sep 15, 2019 4:45 pm
Location: Idaho, USA

Re: VirtualBox and Hardware Virtualization Not Detected

Post by crashtech »

biodoc wrote: Fri Mar 13, 2020 7:06 am Is it worth checking secure boot in the bios too? I've read that should be disabled.
Something happened to this machine after the partial motherboard failure, and it would no longer boot from the SSD like it always had. So I started throwing switches in the BIOS until something changed. I thought that secure boot had either been inadvertently turned off or on, I've seen that cause boot failure before. I think secure boot IS on right now. Will that really prevent virtualization from working?
crashtech
TAAT Member
Reactions:
Posts: 1544
Joined: Sun Sep 15, 2019 4:45 pm
Location: Idaho, USA

Re: VirtualBox and Hardware Virtualization Not Detected

Post by crashtech »

StefanR5R wrote: Thu Mar 12, 2020 2:02 pm Hmm, I am seeing something unexpected on my own machines now:
kvm and kvmintel are present in the kernel simultaneously while vboxdrv, vboxnetadp,vboxnetflt,vboxpci are present too. So I was mistaken about the exclusivity of kvm vs. vbox.

Check the "secure computing" thing in the BIOS when you have an opportunity to go there.
Intel TXT "Trusted Execution Technology" was on, I turned it off but it didn't help.
User avatar
biodoc
TAAT Member
Reactions:
Posts: 1014
Joined: Sun Sep 15, 2019 3:22 pm
Location: Massachusetts, USA

Re: VirtualBox and Hardware Virtualization Not Detected

Post by biodoc »

Once you make a bios change, you may need to reinstall vbox to recompile the modules. Just a guess.
StefanR5R
TAAT Member
Reactions:
Posts: 1661
Joined: Wed Sep 25, 2019 4:32 pm

Re: VirtualBox and Hardware Virtualization Not Detected

Post by StefanR5R »

StefanR5R wrote: Thu Mar 12, 2020 2:02 pm Check the "secure computing" thing in the BIOS when you have an opportunity to go there.
biodoc wrote: Fri Mar 13, 2020 7:06 am Is it worth checking secure boot in the bios too? I've read that should be disabled.
Right, Secure Boot --- that's what I was thinking of.

This is what prohibits booting an unsigned kernel, as well as booting a signed kernel but then loading unsigned kernel modules. Mainstream Linux distributions ship signed kernels and modules.* But 3rd party kernel modules for such distributions might still be unsigned. Modprobe failing with EPERM sounds just like this.

*) Signed with keys which are known to mainstream BIOSes as they are shipped, that is. Such as a Microsoft key. I haven't followed the news what other keys are supported these days.
crashtech
TAAT Member
Reactions:
Posts: 1544
Joined: Sun Sep 15, 2019 4:45 pm
Location: Idaho, USA

Re: VirtualBox and Hardware Virtualization Not Detected

Post by crashtech »

Thanks guys, I'll give it a go later on today. Seems to me that enabling Secure Boot is what let it start working again, if Linux was installed with that feature enabled, I'm not yet sure how to disable it and still allow the SSD to boot.
Post Reply