Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

viPrintf() when called within LXC Linux container

Solved!
Go to solution

I am having an issue with using NI-VISA API from within an LXC Linux Container. Specifically, calling the viPrintf() leads to the program aborting with the following trace.

"

libnipalu.so failed to initialize
Verify that nipalk.ko is built and loaded.
Aborted (core dumped)

"

 

Further investigation points to the fact that I can't write to /dev/nipalk when inside the container

"

/home/agent/build# echo 0 > /dev/nipalk
bash: /dev/nipalk: Operation not permitted

"

 

The program works fine from my native OS but not within the container. My setup:

Host OS: Ubuntu 20.04

Container: Ubuntu 22.04

 

I am also asking on the LXC forum but also trying my luck here. Some comments on what nipalk is doing underneath would also be nice.

The test program used is attached below.

0 Kudos
Message 1 of 2
(682 Views)
Solution
Accepted by topic author yijietao

This is an LXC setting issue and has been resolved. For reference see the LXC thread: https://discuss.linuxcontainers.org/t/writing-to-dev-nipalk-permission-not-permitted/18427/3

0 Kudos
Message 2 of 2
(656 Views)