Iscsid not starting on a centos6 docker on MacOS host

I am trying to run iscsid on a centos docker. But the command fails with, “FATAL: Could not load /lib/modules/4.9.13-moby/modules.dep: No such file or directory”

[root@7627d06541cc opt]# iscsiadm -m node -o new -T bilbo:cdisk0 -p 127.0.0.1
Starting iscsid: FATAL: Could not load /lib/modules/4.9.13-moby/modules.dep: No such file or directory
FATAL: Could not load /lib/modules/4.9.13-moby/modules.dep: No such file or directory
FATAL: Could not load /lib/modules/4.9.13-moby/modules.dep: No such file or directory
FATAL: Could not load /lib/modules/4.9.13-moby/modules.dep: No such file or directory
                                                       [  OK  ]
iscsiadm: can not connect to iSCSI daemon (111)!
New iSCSI node [tcp:[hw=,ip=,net_if=,iscsi_if=default] 127.0.0.1,3260,-1 bilbo:cdisk0] added

Docker is being started using,

  • Get Docker Container CPU Usage as Percentage
  • How can I link a container spawned by one compose file to a container which is spawned by another compose file?
  • libcontainer - system programmers perspective
  • How does coreos compare to triton?
  • How can I make sure to always connect to the same docker container?
  • Docker container delete from Jenkins hangs
  • msingh$ docker run -it cent6 bash
    

    Info Inside the docker

    [root@7627d06541cc opt]# uname -a
    Linux 7627d06541cc 4.9.13-moby #1 SMP Sat Mar 25 02:48:44 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
    [root@7627d06541cc opt]# ls /lib/modules/
    2.6.32-642.13.1.el6.x86_64
    

    I have also tried creating a soft link from

    [root@7627d06541cc opt]# ln -s /lib/modules/2.6.32-642.13.1.el6.x86_64 /lib/modules/4.9.13-moby
    

    However iscsid still fails with

    [root@7627d06541cc opt]# iscsiadm -m node -o new -T bilbo:cdisk0 -p 127.0.0.1
    Starting iscsid: FATAL: Error inserting iscsi_tcp (/lib/modules/4.9.13-moby/kernel/drivers/scsi/iscsi_tcp.ko): Invalid module format
    FATAL: Error inserting ib_iser (/lib/modules/4.9.13-moby/kernel/drivers/infiniband/ulp/iser/ib_iser.ko): Invalid module format
    FATAL: Error inserting cxgb3i (/lib/modules/4.9.13-moby/kernel/drivers/scsi/cxgbi/cxgb3i/cxgb3i.ko): Invalid module format
    FATAL: Error inserting cxgb4i (/lib/modules/4.9.13-moby/kernel/drivers/scsi/cxgbi/cxgb4i/cxgb4i.ko): Invalid module format
    FATAL: Error inserting bnx2i (/lib/modules/4.9.13-moby/kernel/drivers/scsi/bnx2i/bnx2i.ko): Invalid module format
    FATAL: Error inserting be2iscsi (/lib/modules/4.9.13-moby/kernel/drivers/scsi/be2iscsi/be2iscsi.ko): Invalid module format
    

  • Docker: Setting up a GUI in a Docker Container on a Raspberry Pi
  • Amazon container registry login
  • How to share a Laravel app codebase in a Docker container while preserving permissions?
  • “No such file or directory” when starting convolutional.py script on tensorflow docker image
  • TensorFlow with Docker
  • 404 while serving static files via docker nginx
  • One Solution collect form web for “Iscsid not starting on a centos6 docker on MacOS host”

    –privileged should fix this issue. But, you should use –privileged only using docker run and not during docker build.

    docker run –privileged -d –name stack stack:latest

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.