Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to start if VirtualBox is installed #1589

Open
Kolous opened this issue Nov 10, 2024 · 8 comments
Open

Fails to start if VirtualBox is installed #1589

Kolous opened this issue Nov 10, 2024 · 8 comments
Labels
1. Bug Something isn't working

Comments

@Kolous
Copy link

Kolous commented Nov 10, 2024

Describe the bug
Toolbox created but is not running. Default configuration Fedora 41. Refering to missing libnvidia-ml.so but I don't have Nvidia in my laptop.

DEBU Running as real user ID 1000                 
DEBU Resolved absolute path to the executable as /usr/bin/toolbox 
DEBU Running on a cgroups v2 host                 
DEBU Looking up sub-GID and sub-UID ranges for user fedora 
DEBU TOOLBX_DELAY_ENTRY_POINT is                  
DEBU TOOLBX_FAIL_ENTRY_POINT is                   
DEBU TOOLBOX_PATH is /usr/bin/toolbox             
DEBU Migrating to newer Podman                    
DEBU Toolbx config directory is /home/fedora/.config/toolbox 
DEBU Current Podman version is 5.2.5              
DEBU Creating runtime directory /run/user/1000/toolbox 
DEBU Old Podman version is 5.2.5                  
DEBU Migration not needed: Podman version 5.2.5 is unchanged 
DEBU Setting up configuration                     
DEBU Setting up configuration: file /home/fedora/.config/containers/toolbox.conf not found 
DEBU Resolving container and image names          
DEBU Container: ''                                
DEBU Distribution (CLI): ''                       
DEBU Image (CLI): ''                              
DEBU Release (CLI): ''                            
DEBU Resolved container and image names           
DEBU Container: 'fedora-toolbox-41'               
DEBU Image: 'fedora-toolbox:41'                   
DEBU Release: '41'                                
DEBU Resolving container and image names          
DEBU Container: ''                                
DEBU Distribution (CLI): ''                       
DEBU Image (CLI): ''                              
DEBU Release (CLI): ''                            
DEBU Resolved container and image names           
DEBU Container: 'fedora-toolbox-41'               
DEBU Image: 'fedora-toolbox:41'                   
DEBU Release: '41'                                
DEBU Checking if container fedora-toolbox-41 exists 
DEBU Inspecting container fedora-toolbox-41       
DEBU Entry point of container fedora-toolbox-41 is toolbox (PID=0) 
DEBU Inspecting mounts of container fedora-toolbox-41 
DEBU Generating Container Device Interface for NVIDIA 
DEBU Generating Container Device Interface for NVIDIA: Management Library not found: could not load NVML library: libnvidia-ml.so.1: cannot open shared object file: No such file or directory 
DEBU Generating Container Device Interface for NVIDIA: not a Tegra system: /sys/devices/soc0/family file not found 
DEBU Generating Container Device Interface for NVIDIA: skipping 
DEBU Starting container fedora-toolbox-41         
Error: failed to start container fedora-toolbox-41

Steps how to reproduce the behaviour

  1. toolbox enter

Output of toolbox --version (v0.0.90+)
toolbox version 0.1.0

Toolbx package info (rpm -q toolbox)
toolbox-0.1.0-1.fc41.x86_64

Output of podman version

Client:       Podman Engine
Version:      5.2.5
API Version:  5.2.5
Go Version:   go1.23.2
Built:        Fri Oct 18 02:00:00 2024
OS/Arch:      linux/amd64

Podman package info (rpm -q podman)
podman-5.2.5-1.fc41.x86_64

Info about your OS
Fedora 41

@Kolous Kolous added the 1. Bug Something isn't working label Nov 10, 2024
@zevlee
Copy link

zevlee commented Nov 16, 2024

I found a solution that worked for me. It happened to be for distrobox, but it works in the case of toolbox too, apparently.

You have to give permissions to every folder that is appearing until the run command launches

sudo chmod o+rx /dev/vboxusb
sudo chmod o+rx /dev/vboxusb/003
sudo chmod o+rx /dev/vboxusb/005

And so on.

Source: 89luca89/distrobox#904 (comment)

@Kolous
Copy link
Author

Kolous commented Nov 16, 2024

Works for me, thank you. Just wodering what does podman to do with Virtualbox USB device files?

@zevlee
Copy link

zevlee commented Nov 18, 2024

I'm not entirely sure. It seems that having virtualbox installed causes problems with podman.

@debarshiray
Copy link
Member

Interesting. Will it be possible for you to show the original permissions of the files that were causing this bug?

I don't usually use VirtualBox. I could install it, but having a ready list of the files and their permissions will make life easier for me. :)

@debarshiray debarshiray changed the title Error: failed to start container fedora-toolbox-41 Fails to start if VirtualBox is installed Nov 21, 2024
@zevlee
Copy link

zevlee commented Nov 21, 2024

Interesting. Will it be possible for you to show the original permissions of the files that were causing this bug?

Of course. With Virtualbox installed, I ran the following commands.

ls -al /dev results in the following relevant line:

drwxr-x---.  3 root vboxusers         60 Nov 21 13:09 vboxusb

ls -al /dev/vboxusers results in the following relevant line:

drwxr-x---.  2 root vboxusers  160 Nov 21 13:09 001

By giving both of the aforementioned directories read and execute permissions, I am able to successfully execute toolbox enter. That is, I use the command sudo chmod o+rx /dev/vboxusers && sudo chmod o+rx /dev/vboxusers/*

Naturally, since this is the /dev directory, I need to apply this workaround every time I reboot since the permissions are reset.

@Kolous
Copy link
Author

Kolous commented Nov 22, 2024

I see following files:

$ ls /dev/vbox* -la
crw-------. 1 root root      10, 123 21. lis 17.52 /dev/vboxdrv
crw-rw-rw-. 1 root root      10, 122 21. lis 17.52 /dev/vboxdrvu
crw-------. 1 root root      10, 121 21. lis 17.52 /dev/vboxnetctl

/dev/vboxusb:
celkem 0
drwxr-x---.  4 root vboxusers   80 21. lis 17.52 .
drwxr-xr-x. 21 root root      4320 22. lis 14.47 ..
drwxr-x---.  2 root vboxusers   80 22. lis 14.47 001
drwxr-x---.  2 root vboxusers   80 21. lis 17.52 003```

@debarshiray
Copy link
Member

debarshiray commented Nov 28, 2024

Thanks for the list of files and their permissions.

After a quick comparison with what I have in my /dev without VirtualBox, I am guessing that these files aren't the problem:

crw-------. 1 root root      10, 123 21. lis 17.52 /dev/vboxdrv
crw-------. 1 root root      10, 121 21. lis 17.52 /dev/vboxnetctl

... because, I have:

crw-------.  1 root  root     10,   124 Nov 28 13:56 /dev/cpu_dma_latency
crw-------.  1 root  root     10,   203 Nov 28 13:55 /dev/cuse
crw-------.  1 root  root    236,     0 Nov 28 13:55 /dev/drm_dp_aux0
...
...

... and I don't have any problems with podman start. I suppose the problem lies with:

drwxr-x---.  3 root vboxusers         60 Nov 21 13:09 /dev/vboxusb

I wonder if it will be enough to loosen the permissions of only the /dev/vboxusb directory, but not the files inside it.

@Kolous
Copy link
Author

Kolous commented Dec 1, 2024

I have tested one by one and need to change permissions on 3 files to run the toolbox container.

/dev/vboxusb
/dev/vboxusb/003
/dev/vboxusb/001

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants