Running nbd-client as non-root produces this error:
Error: Failed to setup device, check dmesg
dmesg has nothing in it, however.
As it turns out, the actual error here was that I forgot to run nbd-client as root.
It does look like the netlink error that comes back from the kernel has an -EPERM in it.
Please consider either:
1) Using a netlink API that gives back this error from the kernel, and displays the corresponding message, or
2) When this error occurs, checking if the user has permissions, and if not, giving the hint that this may be a permission error, or
3) Making this error message more generic, and just always showing the hint to check permissions.
Running nbd-client as non-root produces this error:
dmesg
has nothing in it, however.As it turns out, the actual error here was that I forgot to run nbd-client as root.
It does look like the netlink error that comes back from the kernel has an
-EPERM
in it.Please consider either: 1) Using a netlink API that gives back this error from the kernel, and displays the corresponding message, or 2) When this error occurs, checking if the user has permissions, and if not, giving the hint that this may be a permission error, or 3) Making this error message more generic, and just always showing the hint to check permissions.