Solved FreeBSD 13.1-RELEASE - Oracle VirtualBox 6.1.36 - Error "VERR_ACCESS_DENIED"

Good Winter everyone!

I have a fresh FreeBSD 13.1-RELEASE installation with LXDE and I have installed Oracle VirtualBox 6.1.36 and I am experiencing the following error regardless of my User being added to the following groups "wheel,vboxusers".

I originally installed using:

Code:
# pkg install virtualbox-ose

Then using the search engines online tried a remedy that worked for someone in 2015, I believe. Said everything was fixed once built from /usr/ports/ which I also did (took most of the night & some morning) to complete.

I have tried unloading linux kernel module and re-loading it as follows:

Code:
# kldload linux

Code:
# kldunload linux

All to no avail...

Code:
Could not launch the VM process for the machine 'pfsense-CE-2.6.0' (VERR_ACCESS_DENIED).


[TABLE]
[TR]
[TD]Result Code:[/TD]

[TD]VBOX_E_IPRT_ERROR (0x80BB0005)[/TD]
[/TR]
[TR]
[TD]Component:[/TD]

[TD]MachineWrap[/TD]
[/TR]
[TR]
[TD]Interface:[/TD]

[TD]IMachine {85632c68-b5bb-4316-a900-5eb28d3413df}[/TD]
[/TR]
[/TABLE]

Any pointers would be greatly appreciated! Thank you!
 
Linux modules have nothing to do with virtualbox. Did you install virtualbox-ose-kmod too?
_martin,

I just checked!

Code:
/usr/ports/emulators/virtualbox-ose-kmod # make install clean

Already installed output:

Code:
se/bin/src/vboxnetflt/vboxnetflt.ko /usr/ports/emulators/virtualbox-ose-kmod/work/stage/boot/modules
====> Compressing man pages (compress-man)
===> Staging rc.d startup script(s)
===>  Installing for virtualbox-ose-kmod-6.1.36
===>  Checking if virtualbox-ose-kmod is already installed
===>   virtualbox-ose-kmod-6.1.36 is already installed
      You may wish to ``make deinstall'' and install this port again
      by ``make reinstall'' to upgrade it properly.
      If you really wish to overwrite the old port of virtualbox-ose-kmod
      without deleting it first, set the variable "FORCE_PKG_REGISTER"
      in your environment or the "make install" command line.
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/emulators/virtualbox-ose-kmod
*** Error code 1

Stop.
make: stopped in /usr/ports/emulators/virtualbox-ose-kmod

Thank you Sir! Of course it couldn't be an easy remedy! :)
 
Well you don't need to check by installing it. To check it you can do pkg info virtualbox\*. Can you show if you have those modules loaded? kldstat |grep vbox.
 
Well you don't need to check by installing it. To check it you can do pkg info virtualbox\*. Can you show if you have those modules loaded? kldstat |grep vbox.
_martin,

Good to know. Thank you!

I have run the command as you instructed... I am coming back null...

Code:
root@workstation:/usr/ports/emulators/virtualbox-ose-kmod # kldstat | grep vbox
root@workstation:/usr/ports/emulators/virtualbox-ose-kmod # kldstat |grep vbox
root@workstation:/usr/ports/emulators/virtualbox-ose-kmod #

What module needs to be manually loaded using kldload _modulename_ ?
 
When you installed virtualbox it showed you the message what you suppose to do. You can see it again with pkg info -D virtualbox-ose. Most likely you'd need these two:
Code:
You need to load the vboxdrv kernel module via /boot/loader.conf:

vboxdrv_load="YES"

For bridged networking please add the following line to your /etc/rc.conf:

vboxnet_enable="YES"
 
When you installed virtualbox it showed you the message what you suppose to do. You can see it again with pkg info -D virtualbox-ose. Most likely you'd need these two:
Code:
You need to load the vboxdrv kernel module via /boot/loader.conf:

vboxdrv_load="YES"

For bridged networking please add the following line to your /etc/rc.conf:

vboxnet_enable="YES"
_martin,

Great knowledge to know!

I have followed the output instructions; added my user to "operator" for USB support.

Added the vboxdrv kernel module to /boot/loader.conf as well as bridged networking support with the rc.conf enable.

Much obliged!

I restarted and My Virtual Machine started and then immediately generated another error. That error is as follows:

Code:
Failed to attach the network LUN (VERR_PDM_DRIVER_NOT_FOUND).


[TABLE]
[TR]
[TD]Result Code:[/TD]

[TD]NS_ERROR_FAILURE (0x80004005)[/TD]
[/TR]
[TR]
[TD]Component:[/TD]

[TD]ConsoleWrap[/TD]
[/TR]
[TR]
[TD]Interface:[/TD]

[TD]IConsole {872da645-4a9b-1727-bee2-5585105b9eed}[/TD]
[/TR]
[/TABLE]
 
I'm assuming you verified modules are loaded with the command above and that that's ok. Under the user you are starting VM from, from the list of defined VMs: VBoxManage list vms share the config of the VM: VBoxManage showvminfo $name where $name is the actual name of the VM from the list.
 
I'm assuming you verified modules are loaded with the command above and that that's ok. Under the user you are starting VM from, from the list of defined VMs: VBoxManage list vms share the config of the VM: VBoxManage showvminfo $name where $name is the actual name of the VM from the list.
_martin,

The modules are as follows using the command you provided: "kldstat grep | vbox":

Code:
root@workstation~ # kldstat |grep vbox
 4    3 0xffffffff8215e000    8cc90 vboxdrv.ko
 7    2 0xffffffff82c3c000     4240 vboxnetflt.ko
10    1 0xffffffff82c50000     55e0 vboxnetadp.ko
root@workstation:~ #


The configuration of the VM "pfsense-CE-2.6.0" says the following with "VBoxManage showvminfo pfsense-CE-2.6.0":

The name in VirtualBox-OSE says "pfsense-CE-2.6.0" ... however it doesn't output this... says incorrect name:
Code:
root@workstation:~ # VBoxManage showvminfo pfsense-CE-2.6.0
VBoxManage: error: Could not find a registered machine named 'pfsense-CE-2.6.0'
VBoxManage: error: Details: code VBOX_E_OBJECT_NOT_FOUND (0x80bb0001), component VirtualBoxWrap, interface IVirtualBox, callee nsISupports
VBoxManage: error: Context: "FindMachine(Bstr(VMNameOrUuid).raw(), machine.asOutParam())" at line 2774 of file VBoxManageInfo.cpp
root@workstation:~ #

Much obliged... Not sure why it's not taking the name as it's shown in the GUI.
 
Was that the name from that list vms command I shared ? From your previous errors I see ID of that VM is 85632c68-b5bb-4316-a900-5eb28d3413df, you can use even that. VBoxManage showvminfo 85632c68-b5bb-4316-a900-5eb28d3413df.
Make sure you're executing it under the same user as you're running GUI from (so not root most likely).
 
Was that the name from that list vms command I shared ? From your previous errors I see ID of that VM is 85632c68-b5bb-4316-a900-5eb28d3413df, you can use even that. VBoxManage showvminfo 85632c68-b5bb-4316-a900-5eb28d3413df.
Make sure you're executing it under the same user as you're running GUI from (so not root most likely).
_martin,

I missed that 1st command! Again, much obliged!

I have received the configuration file now using the commands you provided:

Code:
user@workstation:~ % VBoxManage list vms
"pfsense-CE-2.6.0" {51b33cf2-e5c1-476c-856d-51d4176ad75d}

The output of the configuration is:

Code:
user@workstation:~ % VBoxManage showvminfo 51b33cf2-e5c1-476c-856d-51d4176ad75d
Name:                        pfsense-CE-2.6.0
Groups:                      /
Guest OS:                    Other Linux (64-bit)
UUID:                        51b33cf2-e5c1-476c-856d-51d4176ad75d
Config file:                 /home/user/VirtualBox_VMs/pfsense-CE-2.6.0/pfsense-CE-2.6.0.vbox
Snapshot folder:             /home/user/VirtualBox_VMs/pfsense-CE-2.6.0/Snapshots
Log folder:                  /home/user/VirtualBox_VMs/pfsense-CE-2.6.0/Logs
Hardware UUID:               51b33cf2-e5c1-476c-856d-51d4176ad75d
Memory size:                 1024MB
Page Fusion:                 disabled
VRAM size:                   16MB
CPU exec cap:                100%
HPET:                        disabled
CPUProfile:                  host
Chipset:                     piix3
Firmware:                    BIOS
Number of CPUs:              1
PAE:                         enabled
Long Mode:                   enabled
Triple Fault Reset:          disabled
APIC:                        enabled
X2APIC:                      enabled
Nested VT-x/AMD-V:           disabled
CPUID Portability Level:     0
CPUID overrides:             None
Boot menu mode:              message and menu
Boot Device 1:               Floppy
Boot Device 2:               DVD
Boot Device 3:               HardDisk
Boot Device 4:               Not Assigned
ACPI:                        enabled
IOAPIC:                      enabled
BIOS APIC mode:              APIC
Time offset:                 0ms
RTC:                         UTC
Hardware Virtualization:     enabled
Nested Paging:               enabled
Large Pages:                 enabled
VT-x VPID:                   enabled
VT-x Unrestricted Exec.:     enabled
Paravirt. Provider:          Default
Effective Paravirt. Prov.:   KVM
State:                       powered off (since 2022-12-14T00:11:51.654000000)
Graphics Controller:         VMSVGA
Monitor count:               1
3D Acceleration:             disabled
2D Video Acceleration:       disabled
Teleporter Enabled:          disabled
Teleporter Port:             0
Teleporter Address:          
Teleporter Password:         
Tracing Enabled:             disabled
Allow Tracing to Access VM:  disabled
Tracing Configuration:       
Autostart Enabled:           disabled
Autostart Delay:             0
Default Frontend:            
VM process priority:         default
Storage Controller Name (0):            IDE
Storage Controller Type (0):            PIIX4
Storage Controller Instance Number (0): 0
Storage Controller Max Port Count (0):  2
Storage Controller Port Count (0):      2
Storage Controller Bootable (0):        on
IDE (0, 0): /home/user/VirtualBox_VMs/pfsense-CE-2.6.0/pfsense.vdi (UUID: 3d574fa5-2670-4044-b3d1-dd56c031edbd)
IDE (1, 0): /usr/home/user/ISO_Images/pfSense-CE-2.6.0-RELEASE-amd64.iso (UUID: 50734f8a-769e-40ae-b209-0a1b7a82134e)
NIC 1:                       MAC: 080027DC2D1B, Attachment: NAT, Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: deny, Bandwidth group: none
NIC 1 Settings:  MTU: 0, Socket (send: 64, receive: 64), TCP Window (send:64, receive: 64)
NIC 2:                       MAC: 08002796CD37, Attachment: Generic 'ure0' {  }, Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: deny, Bandwidth group: none
NIC 3:                       MAC: 080027DFD739, Attachment: Generic 'ure1' {  }, Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: deny, Bandwidth group: none
NIC 4:                       disabled
NIC 5:                       disabled
NIC 6:                       disabled
NIC 7:                       disabled
NIC 8:                       disabled
Pointing Device:             USB Tablet
Keyboard Device:             PS/2 Keyboard
UART 1:                      disabled
UART 2:                      disabled
UART 3:                      disabled
UART 4:                      disabled
LPT 1:                       disabled
LPT 2:                       disabled
Audio:                       enabled (Driver: OSS, Controller: AC97, Codec: STAC9700)
Audio playback:              enabled
Audio capture:               disabled
Clipboard Mode:              HostToGuest
Drag and drop Mode:          disabled
VRDE:                        disabled
OHCI USB:                    enabled
EHCI USB:                    disabled
xHCI USB:                    disabled

USB Device Filters:

<none>

Bandwidth groups:  <none>

Shared folders:<none>

Guest:

Configured memory balloon size: 0MB


user@workstation:~ %
 
It seems NIC2 and NIC3 are not properly connected. I'd assume there would be name of the network interface (possibly bridge) between {}. Did you start the /usr/local/etc/rc.d/vboxnet service? Using ifconfig can you see vboxnet0 (or other #) interface?
 
It seems NIC2 and NIC3 are not properly connected. I'd assume there would be name of the network interface (possibly bridge) between {}. Did you start the /usr/local/etc/rc.d/vboxnet service? Using ifconfig can you see vboxnet0 (or other #) interface?
_martin,

Awesome! Solved! I mis-configured my USB NIC's; once changing them to NAT I was able to start the VM without errors. I sure appreciate the walk-through!

God bless, You're great! Merry Christmas, Happy New Years!

Best Regards,

Brandon!
 
Back
Top