Vagrant: Unable to set hostname with Ubuntu 15.10 box

Created on 23 Nov 2015  路  4Comments  路  Source: hashicorp/vagrant

I am using the ubuntu/wily64 box from here: https://atlas.hashicorp.com/ubuntu/boxes/wily64

In my vagrantfile, I have:

config.vm.hostname = "wily64-test"

After booting up, setting the hostname fails:

==> default: 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:

mesg: ttyname failed: Inappropriate ioctl for device
Failed to start hostname.service: Unit hostname.service is masked.

Vagrant is 1.7.4 running on Windows 8.1 64-bit. VirtualBox is 5.0.10.

bug guesubuntu

Most helpful comment

I'm still seeing this issue today on 15.10 after doing an init with ubuntu/wily64

All 4 comments

I think this should have been fixed by https://github.com/mitchellh/vagrant/pull/5937, but will do further testing to verify.

Just verified with that same box - setting the hostname works as expected! :smile:

UPDATE: have taken to #6871

@sethvargo This still seems to be failing for me

==> dev: Setting hostname...
==> dev: Configuring and enabling network interfaces...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

/sbin/ip addr flush dev eth1 2> /dev/null

Stdout from the command:



Stderr from the command:

mesg: ttyname failed: Inappropriate ioctl for device


gabriel at Etruscan in ~/Projects/devbox on master [!]
$ vagrant -v
Vagrant 1.8.1

I'm still seeing this issue today on 15.10 after doing an init with ubuntu/wily64

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mpontillo picture mpontillo  路  3Comments

cbednarski picture cbednarski  路  3Comments

barkingfoodog picture barkingfoodog  路  3Comments

jazzfog picture jazzfog  路  3Comments

DreadPirateShawn picture DreadPirateShawn  路  3Comments