-1

CentOS 7 host o/s, guest o/s.

VirtualBox-6.0-6.0.4_128413_el7-1.x86_64

Virtualbox Guest Additions 6.0.4

Host kernel 3.10.0-957.1.3.el7.x86_64

Guest kernel 3.10.0-957.10.1.el7.x86_64

Guest file systems are ext4. Verified that "d_type=true"

We've provisioned a Virtual Box VM, are able to "vagrant halt", "vagrant up" and "vagrant ssh", no problems.

Next, installed docker-ce in the guest.

vagrant halt, vagrant up, we get this: The configured shell (config.ssh.shell) is invalid and unable to properly execute commands.

We've been using this VM for a couple of years now, looking to determined what has changed.

The docker version is a bit older, docker-ce-17.09.1.ce-1.el7.centos

Next step, upgrade docker in the VM, docker-ce-18.09.5-3.el7.x86_64

Same problem:

The configured shell (config.ssh.shell) is invalid and unable to properly execute commands.

  • Additional observation: vagrant ssh Last login: Mon Apr 15 17:38:09 2019 from 10.0.2.2 Welcome to your Vagrant-built virtual machine. /bin/bash: Permission denied Connection to 127.0.0.1 closed. – Tom Emerson Apr 15 at 17:44
  • What is the current value of config.ssh.shell that Vagrant is trying to use? You should have config.ssh.shell set somewhere in your Vagrantfile. According to your comment, it is possibly set to /bin/bash so seeing the permissions on that file (inside the VM) may help too. – GracefulRestart Apr 15 at 18:39
  • I don't have config.ssh.shell set. Before installing Docker in the VM, vagrant ssh is OK, no error. After the problem presented, I did try setting config.ssh.shell to 'sh', but, in redhat derived centos, IIRC, /bin/sh is a link to /bin/bash. (and found that in the VMDK virtual disk file, mounting to a running VM, /bin/bash permissions are OK. Whatever the problem is, it is quite perplexing!) – Tom Emerson Apr 15 at 19:13
  • OK, I've won the dummy award! selinux was on, but restorecon was not run at all. – Tom Emerson Apr 15 at 19:48
  • Thank you to GracefulRestart for sending me in the right direction. – Tom Emerson Apr 15 at 19:49
0

selinux was on, but restorecon was not run at all. Somehow in our provisioning this happened, possibly yum install'ing docker-ce.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.