Re: problem with /tmp/vagrant-shell on a Windows machine

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Re: problem with /tmp/vagrant-shell on a Windows machine

Meredith Broussard
Where is this /tmp/vagrant-shell file? On which file is this :set ff change supposed to be made? Tried it on the Vagrantfile, but no change in the output, provision still returns this output.

On Friday, September 21, 2012 8:33:30 PM UTC-4, Pete Hodgson wrote:
I am seeing this same issue with ^M line endings in /tmp/vagrant-shell when running `vagrant provision` on a windows machine.

From looking at lib/vagrant/provisioners/shell.rb it looks like vagrant-shell is being written out on the windows side and then transfered over to /tmp/vagrant-shell on the VM. That would explain why the line-endings are borked. It also looks like lib/vagrant/util/line_ending_helpers.rb could be easily used to resolve this. 

I'd like to contribute a pull request with a fix for this, but I'm not sure if I should do that against the 1.0.5 branch or off of master. If I did it off of master can someone point me to where the Vagrant::Provisioners::Shell functionality has moved to in master?


On Sunday, July 17, 2011 7:43:36 PM UTC-7, Mitchell Hashimoto wrote:

On Fri, Jul 15, 2011 at 2:18 AM, TOBY <[hidden email]> wrote:

If vagrant-shell file has CRLF in the end of line, maybe you should save as LF only, not CRLF.

[default] bash: /tmp/vagrant-shell: /bin/bash^M: bad interpreter: No

"^M" feel me fishy :))

Good catch. I'm going to look into this.


2011/7/9 nil <[hidden email]>
It boots the VM but encounters an issue while provisioning. I'm using
VirtualBox Version 4.0.6  (in order to match the Guest Additions
Version), but this happens with VirtualBox 4.0.10 as well. I'm on a
Windows machine. What should I do? Let me know if you need more info
(I'm new to Vagrant)

$ vagrant up
[default] Provisioning enabled with shell...
[default] Importing base box 'natty32'...
[default] Matching MAC address for NAT networking...
[default] Running any VM customizations...
[default] Clearing any previously set forwarded ports...
[default] Forwarding ports...
[default] -- ssh: 22 => 2222 (adapter 1)
[default] Creating shared folders metadata...
[default] Booting VM...
[default] Waiting for VM to boot. This can take a few minutes.
[default] VM booted and ready for use!
[default] Mounting shared folders...
[default] -- v-root: /vagrant
[default] Running provisioner: Vagrant::Provisioners::Shell...
[default] stdin: is not a tty
[default] bash: /tmp/vagrant-shell: /bin/bash^M: bad interpreter: No
such file or directory
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

chmod +x /tmp/vagrant-shell

The output of the command prior to failing is outputted below:

[no output]

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 [hidden email].
For more options, visit