Well! I just tried with the following 
  config.vm.provision "shell", inline: "echo hello"
And it fails - log here. 
<https://gist.github.com/ujwalkomarla/6e527dde6f4629ff9dd645e2e5951c3e>

The first error comes from a `chown -R /tmp/vagrant-shell'. It retries 
creating /tmp, uploads the inline script to VM and execute it - when it 
fails again.

I have two questions:

   - Is the folder that Vagrant uses to upload files i.e., '/tmp' 
   configurable?
   EXOS 'jails' the user and exposes limited number of user directories to 
   work with.
   - When the log says uploading as below, is it doing an scp?
        DEBUG ssh: Uploading: 
   
/var/folders/py/znngg9_x643gmt1thx5g08q4vvypnx/T/vagrant-shell20190312-8359-138g02q.ps1
 
   to /tmp/vagrant-shell
   If so, we can skip over the guest additions missing issue.
   Also, scp is hacked to allow upload of files only in certain places!



On Tuesday, 12 March 2019 22:58:45 UTC-4, Ujwal Komarla wrote:
>
> No. 
>
> It is a Network OS from Extreme Networks, called EXOS, and limits what I 
> can do with it.
> So, it doesn't have guest additions installed. I think, it will be a work 
> item for the future.
>
> My main concern was that, I didn't have the config.ssh.shell properly 
> configured, more than the synced folder issue.
>
> Instead of testing for synced folder, I should try something simpler - 
> like a shell provision.
>
>
> On Tuesday, 12 March 2019 19:20:26 UTC-4, Brian Cain wrote:
>>
>> 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/596d94fc-a2a1-4eb1-a39c-cd37d8816dd4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to