Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Setting Hostname #173

Open
certaincents opened this issue Aug 26, 2016 · 1 comment
Open

Error Setting Hostname #173

certaincents opened this issue Aug 26, 2016 · 1 comment

Comments

@certaincents
Copy link

I'm not sure if this is due to something I did or an update with vagrant/apache.

I recently tried to spin up a second box using an identical vagrantfile (based on this original https://github.com/beporter/CakePHP-EnvAwareness/blob/master/app-cake2/Vagrantfile) and now every time I try to spin a box up I get the following error:

==> default: Setting hostname...
Vagrant attempted to execute the capability 'change_host_name'
on the detect guest OS 'linux', but the guest doesn't
support that capability. This capability is required for your
configuration of Vagrant. Please either reconfigure Vagrant to
avoid this capability or fix the issue by creating the capability.

I've verified that vagrant as well as virtualbox are upgraded to the latest versions, but I haven't been able to get the box to spin up successfully anymore.

I can't seem to figure out what is causing this so I don't really know what is causing the issue or even if it belongs here.

@chronon
Copy link
Member

chronon commented Aug 27, 2016

The issue is an incompatibility between Vagrant v1.8.5 (and possibly earlier and later versions) and Ubuntu 12.04.5 boxes. You can either update the box to Ubuntu 14.04.5, or if you need to use 12.04.5 for some reason the following steps should get it running:

  1. vagrant up (and get the error message).

  2. vagrant ssh to login to the guest machine.

  3. From inside the VM, create the file /etc/os-release with the following content:

    NAME="Ubuntu"
    VERSION="12.04 LTS, Precise Pangolin"
    ID=ubuntu
    ID_LIKE=debian
    PRETTY_NAME="Ubuntu precise (12.04 LTS)"
    VERSION_ID="12.04"
    
  4. Exit the VM, run vagrant reload to reboot and confirm the previous error message does not appear.

  5. vagrant ssh and remove the previously created etc/os-release file.

  6. Exit the VM, run vagrant provision to provision the machine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants