mitchellh/vagrant — Issue #727: Windows Host creates ifcfg-ethX files with CRLF which don't work in SUSE
Author: muggle-hat
Created: 2012-02-09 16:35:44+00:00
State: open

I have a windows 7 host and a SUSE guest. The ifcfg-ethX files that vagrant creates on the windows host contain CRLF line endings. The files are transferred to the SUSE guest including these CRLF line endings. The SUSE guest then cannot bring up the interfaces, because it stumbles upon these line endings.

Fix could be:
In
lib/vagrant/guest/redhat.rb
add
vm.channel.sudo("/usr/bin/dos2unix /tmp/vagrant-network-entry_#{network[:interface]}")
after
vm.channel.upload(temp.path, "/tmp/vagrant-network-entry_#{network[:interface]}")
(~ line 35)

Or do it in ruby somehow beforehand (probably faster).

It might be a good idea to do this for all linux guests.