kernel module fuse for lxc

RobFantini

Famous Member
May 24, 2012
2,023
107
133
Boston,Mass
Hello,
I'm trying to setup an x2go server in a lxc.

For remote printing kernel module 'fuse' is needed.

So I tried to load the module at pve host, however the module is not avail:
Code:
modinfo fuse
modinfo: ERROR: Module fuse not found.

Is possible to have the module in a standard pve kernel? If not will use kvm for x2go server.

best regards, rob f.
 
Hi!

Post edit: I previously suggested to rename kernel/fs/fuse/cuse.ko to kernel/fs/fuse/fuse.ko. It's not a good thing. There is no typo error.

Solution just below.
 
Last edited:
To activate fuse in LXC container, it's necessary to create the corresponding dev node. With root:
Code:
mknod -m 666 /dev/fuse c 10 229
 
Last edited:
  • Like
Reactions: imadk95
I just ran into this today trying to use fuse in an ubuntu lxc.... is there a fix to get this working?
 
is there a functioning work around to get fuse working in an lxc container? no movement on the bug report it seems
 
did you try the suggestion from post #4 above?
Yes I made a copy

Code:
modules/4.2.2-1-pve/kernel/fs/fuse# cp cuse.ko fuse.ko

but trying to make an encfs mount errors with:

Code:
fuse: device not found, try 'modprobe fuse' first
fuse failed.  Common problems:
- fuse kernel module not installed (modprobe fuse)
- invalid options -- see usage message

and trying to mount with acd_cli (https://github.com/yadayada/acd_cli) fails with

Code:
fuse: device not found, try 'modprobe fuse' first
Traceback (most recent call last):
  File "/usr/local/bin/acd_cli", line 9, in <module>
    load_entry_point('acdcli==0.3.1', 'console_scripts', 'acd_cli')()
  File "/usr/local/bin/acd_cli.py", line 1437, in main
    sys.exit(args.func(args))
  File "/usr/local/bin/acd_cli.py", line 959, in mount_action
    allow_root=args.allow_root, allow_other=args.allow_other)
  File "/usr/local/lib/python3.4/dist-packages/acdcli/acd_fuse.py", line 686, in mount
    **kwargs
  File "/usr/local/lib/python3.4/dist-packages/acdcli/bundled/fuse.py", line 416, in __init__
    raise RuntimeError(err)
RuntimeError: 1
 
on pve host 'modprobe fuse' completes
trying it in an ubuntu lxc container:
Code:
# modprobe fuse
modprobe: ERROR: ../libkmod/libkmod.c:556 kmod_search_moddep() could not open moddep file '/lib/modules/4.2.2-1-pve/modules.dep.bin'

and I still get the same errors I posted above when trying to use fuse in a container
 
modprobe does not need to be done in the container.
ok, but doing it on pve host still didn't make it work in the container, maybe I'm missing something basic? Tried rebooting pve host after copying cuse.ko to fuse.io and doing modprobe fuse on host but still not working in container :(
 
I think it may be a bug with lxc . Lets see if one of the devs will reply.

It smells like a bug. There were some updates that came up within last day for pve-testing
try upgrading debs [ there is a kernel upgrade so reboot] then if still an issue file a bug report ?
 
I appear to be up to date via dist-upgrade (I'm not on testing repo)

I just tried this fix in the container https://github.com/lxc/lxc/issues/80

Code:
# mknod -m 666 /dev/fuse c 10 229

looks like it's working now! Guess I just needed the combo of renaming cuse.ko on pve and adding the fuse node in the container.
 
  • Like
Reactions: JānisE
great!

And in that link 'kernel/fs/fuse/cuse.ko' is listed. I guess that is not a typo as suggested in post 4 above..

fuse is built in to the kernel so probably all that is needed to fix the issue is the mknod. no need fro modprobe to fix the issue.

thank you for finding the solution!
 
didn't work for me...

on host (Linux 4.2.6-1-pve):
  • dist-upgraded (I have no subscription, so I used apt.source
    "deb http://download.proxmox.com/debian jessie pve-no-subscription")
  • copied cuse.ko to fuse.ko in /lib/modules/4.2.6-1-pve/kernel/fs/fuse
  • rebooted

in container (latest, freshly dist-upgraded Debian too – here I want to use sshfs which requires fuse) on calling sshfs, I get:
Code:
# fuse: device not found, try 'modprobe fuse' first
# modprobe fuse
modprobe: ERROR: ../libkmod/libkmod.c:557 kmod_search_moddep() could not open moddep file '/lib/modules/4.2.6-1-pve/modules.dep.bin'

I will preliminary use a VM instead of a CT, still I guess this should be fixed (or maybe s.o. can give us a lil hint) :)

Thanks,
R.
 
Last edited:
didn't work for me...

on host (Linux 4.2.6-1-pve):
  • dist-upgraded (I have no subscription, so I used apt.source
    "deb http://download.proxmox.com/debian jessie pve-no-subscription")
  • copied cuse.ko to fuse.ko in /lib/modules/4.2.6-1-pve/kernel/fs/fuse
  • rebooted

in container (latest, freshly dist-upgraded Debian too – here I want to use sshfs which requires fuse) on calling sshfs, I get:
Code:
# fuse: device not found, try 'modprobe fuse' first
# modprobe fuse
modprobe: ERROR: ../libkmod/libkmod.c:557 kmod_search_moddep() could not open moddep file '/lib/modules/4.2.6-1-pve/modules.dep.bin'

I will preliminary use a VM instead of a CT, still I guess this should be fixed (or maybe s.o. can give us a lil hint) :)

Thanks,
R.

can you try running this command in your container as root?
Code:
mknod -m 666 /dev/fuse c 10 229
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!