F fdcastel Member Sep 28, 2021 16 2 8 Aug 22, 2024 #1 Given these two LXC features (keyctl and nesting): there is a way to programmatically query them from inside the container? I found /sys/module/kvm_intel/parameters/nested but unfortunately it returns "Y" for both nesting=0 and nesting=1 containers.
Given these two LXC features (keyctl and nesting): there is a way to programmatically query them from inside the container? I found /sys/module/kvm_intel/parameters/nested but unfortunately it returns "Y" for both nesting=0 and nesting=1 containers.
P pikey New Member Aug 19, 2024 18 2 3 Aug 22, 2024 #2 Keyctl Code: keyctl show nesting Code: sudo unshare --mount --pid --fork --mount-proc bash The last on didn't work without nesting. Reactions: fdcastel
Keyctl Code: keyctl show nesting Code: sudo unshare --mount --pid --fork --mount-proc bash The last on didn't work without nesting.
F fdcastel Member Sep 28, 2021 16 2 8 Aug 23, 2024 #3 Thank you very much @pikey!!! Unfortunately keyctl needs an additional package installed into container: Bash: # keyctl Command 'keyctl' not found, but can be installed with: apt install keyutils Do you know any alternate way that doesn't require additional packages? pikey said: nesting Code: sudo unshare --mount --pid --fork --mount-proc bash The last on didn't work without nesting. Click to expand... Perfect! For the record, I used: Bash: unshare --mount --pid --fork --mount-proc true which will return 0 (ok) if nesting is enabled and 1 (error) otherwise. Reactions: Kingneutron
Thank you very much @pikey!!! Unfortunately keyctl needs an additional package installed into container: Bash: # keyctl Command 'keyctl' not found, but can be installed with: apt install keyutils Do you know any alternate way that doesn't require additional packages? pikey said: nesting Code: sudo unshare --mount --pid --fork --mount-proc bash The last on didn't work without nesting. Click to expand... Perfect! For the record, I used: Bash: unshare --mount --pid --fork --mount-proc true which will return 0 (ok) if nesting is enabled and 1 (error) otherwise.
K Kingneutron Active Member Feb 21, 2024 653 179 43 github.com Aug 23, 2024 #4 > Do you know any alternate way that doesn't require additional packages? If it's a container and you have root on the box, why not just install the package...?
> Do you know any alternate way that doesn't require additional packages? If it's a container and you have root on the box, why not just install the package...?
F fdcastel Member Sep 28, 2021 16 2 8 Aug 23, 2024 #5 Just being picky. You know... The less, the better. Changing a system just to query a single option seems excessive. That's why I'm interested in alternative ways to get this.
Just being picky. You know... The less, the better. Changing a system just to query a single option seems excessive. That's why I'm interested in alternative ways to get this.