Skip to content
This repository has been archived by the owner on Nov 24, 2022. It is now read-only.

Wrong IP address in Debian box templates #91

Closed
stucki opened this issue Jun 6, 2013 · 5 comments · Fixed by #92
Closed

Wrong IP address in Debian box templates #91

stucki opened this issue Jun 6, 2013 · 5 comments · Fixed by #92

Comments

@stucki
Copy link
Contributor

stucki commented Jun 6, 2013

I was trying to run a Debian Squeeze box created using the included tasks, but it fails during setup of the machine:

➜  $ git:(master) ✗ vagrant up test --provider=lxc
Bringing machine 'test' up with 'lxc' provider...
[test] Importing base box 'debian-6-amd64'...
[test] Setting up mount entries for shared folders...
[test] -- /vagrant
...
[test] Setting hostname...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

hostname --fqdn > /etc/mailname

After doing some research on the issue, I found out that Vagrant expects any alias for localhost to use 127.0.1.1 not 127.0.0.1: https://github.com/mitchellh/vagrant/blob/master/plugins/guests/debian/cap/change_host_name.rb

For more details, take a look at the Debian manual: http://www.debian.org/doc/manuals/debian-reference/ch05.en.html#_the_hostname_resolution

@fgrehm
Copy link
Owner

fgrehm commented Jun 6, 2013

@stucki just checking, is your host a Debian machine as well? If not, you might be want to have a look at this Vagrant PR: hashicorp/vagrant#1685. I remember having trouble setting up Debian containers from my Ubuntu host because of that.

@stucki
Copy link
Contributor Author

stucki commented Jun 6, 2013

Well, I think I have the solution ready. Just finishing the pull request, hold on for a minute... :-)

@stucki
Copy link
Contributor Author

stucki commented Jun 6, 2013

Btw. regarding hashicorp/vagrant#1685: I already applied that fix locally.

@stucki
Copy link
Contributor Author

stucki commented Jun 6, 2013

... and btw. my host machine is running Ubuntu 13.04. Shouldn't make a difference though.

@fgrehm
Copy link
Owner

fgrehm commented Jun 9, 2013

@stucki if you have the patch applied it doesnt, let's continue the discussion from the PR ;-)

@fgrehm fgrehm closed this as completed Jun 9, 2013
fgrehm added a commit that referenced this issue Sep 21, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants