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

Setting the hostname using Vagrant 1.7.2 boxes #5694

Closed
codeATbusiness opened this issue May 8, 2015 · 2 comments
Closed

Setting the hostname using Vagrant 1.7.2 boxes #5694

codeATbusiness opened this issue May 8, 2015 · 2 comments

Comments

@codeATbusiness
Copy link

I'm using the multi-machine options from Vagrant but I cannot set the hostname for each machine.

    # -*- mode: ruby -*-
    # vi: set ft=ruby :

    VAGRANT_API_VERSION = "2"

    # Boxes Configuration
    Vagrant.configure(VAGRANT_API_VERSION) do |config|
        # WebServer Machine 1
        config.vm.define "web1" do |web|
            web.vm.box = "ubuntu/vivid64"
            web.vm.hostname = "webserver1.dev"
            web.vm.network "private_network", ip: 192.168.50.5
            web.vm.provider "virtualbox" do |v|
                v.name = "WebServer 1"
                v.cpus = 1
                v.memory = 1024
            end
            web.vm.network "forwarded_port", guest: 80, host: 8080
        end
    end

This results with the following error:

     ==> ansible: Setting hostname...
    The following SSH command responded with a non-zero exit status.
    Vagrant assumes that this means the command failed!

    service hostname start

    Stdout from the command:

    Stderr from the command:

    stdin: is not a tty
    Failed to start hostname.service: Unit hostname.service is masked.
@codeATbusiness codeATbusiness changed the title Issue setting the hostname using Vagrant 1.7.2 boxes Setting the hostname using Vagrant 1.7.2 boxes May 8, 2015
@devjatkin
Copy link

IMHO this issue is duplicate of #5673

@sethvargo
Copy link
Contributor

Closing as a dupe, thanks!

@ghost ghost locked and limited conversation to collaborators Apr 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants