iscsi and device passthrough

omgs

Renowned Member
Aug 19, 2016
79
5
73
58
Hi.

I'm creating a test lab where I intend to have a privileged (or unprivileged if possible) lxc container. This ct uses tgtd for sharing iscsi luns to other hosts in the bridge. So, in the proxmox host, I have an unused raw disk (/dev/sdb, with an unformatted partition sdb1) whose only purpose is to handle the data. So, I've added the passthrough device in the resources menu to pass the /dev/sdb1 as dev0. In the ct, I can see directly /dev/sdb1, but not only that, all the dev/sdX in the host. I've searched and haven't found accurate info about how to manage passthrough devices, so I've freezed that test and now I'm on the way to do the same with an unprivileged container, because I guess the privileged feature is related. Am I doing wrong assumptions, or have done anything wrong?

Thanks in advance.
 
containers are not designed to handle hardware that way. just format and mount the iscsi share on the host and attach it to the container as a mountpoint.

Alternatively, deploy it as a virtual machine and then you dont need to worry about it at all- you can address the iscsi device directly from the virtual machine.
 
I understand what you mean. But I wonder, what's the proper use of the device passtrough option in containers?
 
o, I've added the passthrough device in the resources menu to pass the /dev/sdb1 as dev0. In the ct, I can see directly /dev/sdb1, but not only that, all the dev/sdX in the host
this sounds strange, can you post the container config? (e.g. ich tried the same here, and in only get the '/dev/sda1' device in the container)

I understand what you mean. But I wonder, what's the proper use of the device passtrough option in containers?
there are a few things that is good for, e.g. passing through a specific tty device, a gpu (/dev/dri/renderDXXX) and so on (for instance i have an jellyfin container at home where i pass through the renderdevice of the host gpu for transcoding)