Are you using the Vagrant box "centos/7"? I noticed in the debug output it says that it doesn't have guest additions installed.
I get a different error about Vagrant failing to properly mount the share folder, but I am wondering if switching to a different box that has proper guest additions installed will fix your issue. Perhaps try "bento/centos-7" instead? On Tue, Mar 12, 2019 at 12:04 PM Ujwal Komarla <[email protected]> wrote: > I think, I read this log message wrong. > > DEBUG ssh: stderr: 41e57d38-b4f7-4e46-9c38-13873d338b86-vagrant-ssh > DEBUG ssh: stderr: /bin/sh: > DEBUG ssh: stderr: id: not found > DEBUG ssh: stderr: > INFO ssh: Execute: id -u vagrant (sudo=false) > > > I'm certain the folder doesn't exist. Also, I confirmed that 'mkdir -p' > return 0 when the folder already exists. > > > Only the Vagrantfile packed into the vagrant box file has this line. > config.vm.synced_folder ".", "/usr/local/cfg/vagrant", disabled: false > > The Vagrantfile I am using to bring the VMs up doesn't have any > 'synced_folder' setting. > > > > On Monday, 11 March 2019 12:18:16 UTC-4, Brian Cain wrote: >> >> Hey there, >> >> I don't see where you are seeing '/bin/sh' not found. It looks like your >> script is failing because the folder >> you are trying to create probably already exists from your synced folder >> option. >> >> config.vm.synced_folder ".", "/usr/local/cfg/vagrant", disabled: false >> This will create that folder already on your guest, so I'm guessing >> running mkdir is failing because the folder already exists. >> >> On Sat, Mar 9, 2019 at 9:30 PM Ujwal Komarla <[email protected]> wrote: >> >>> I have a Custom Network OS(EXOS) Vagrant Box with the following >>> Vagrantfile >>> <https://gist.github.com/ujwalkomarla/d31f7c11e354e76e1ddc8219a57729c2> >>> built-in the box with bash.py >>> <https://gist.github.com/ujwalkomarla/fde91546ff69aad5550da6a757c6aacb>. >>> The vagrant up fails with SSH command returning non-zero exit status - full >>> log >>> <https://gist.github.com/ujwalkomarla/cce8df277212839782d0ef6c50b808e2> >>> obtained with debug mode - I, see '/bin/sh' not found in log. >>> However, when I ssh into the switch as 'Vagrant' user, the following >>> works fine - >>> >>> 1. run script bash.py >>> 2. mkdir -p /usr/local/cfg/vagrant >>> >>> What am I missing with the 'config.ssh.shell' configuration? >>> >>> -- >>> This mailing list is governed under the HashiCorp Community Guidelines - >>> https://www.hashicorp.com/community-guidelines.html. Behavior in >>> violation of those guidelines may result in your removal from this mailing >>> list. >>> >>> GitHub Issues: https://github.com/mitchellh/vagrant/issues >>> IRC: #vagrant on Freenode >>> --- >>> You received this message because you are subscribed to the Google >>> Groups "Vagrant" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/vagrant-up/9e45f8aa-3776-465b-9ca6-a5aab2301214%40googlegroups.com >>> <https://groups.google.com/d/msgid/vagrant-up/9e45f8aa-3776-465b-9ca6-a5aab2301214%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> >> -- >> Brian Cain >> > -- > This mailing list is governed under the HashiCorp Community Guidelines - > https://www.hashicorp.com/community-guidelines.html. Behavior in > violation of those guidelines may result in your removal from this mailing > list. > > GitHub Issues: https://github.com/mitchellh/vagrant/issues > IRC: #vagrant on Freenode > --- > You received this message because you are subscribed to the Google Groups > "Vagrant" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/vagrant-up/21bc39ec-2c55-4549-8587-ce5c9856413c%40googlegroups.com > <https://groups.google.com/d/msgid/vagrant-up/21bc39ec-2c55-4549-8587-ce5c9856413c%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Brian Cain -- This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list. GitHub Issues: https://github.com/mitchellh/vagrant/issues IRC: #vagrant on Freenode --- You received this message because you are subscribed to the Google Groups "Vagrant" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/CADHESCW5Zr-MNtwSncVxBmBsjQ6y7LX709sVpGwKbPwEd%2By%2Bgg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
