Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upUnable to set hostname on Ubuntu 16.04 box #7288
Comments
sethvargo
added
bug
guest/ubuntu
labels
May 4, 2016
This comment has been minimized.
This comment has been minimized.
macnibblet
commented
May 4, 2016
I have the same issue, pretty much blocking my development |
This comment has been minimized.
This comment has been minimized.
krzysbaranski
commented
May 4, 2016
•
it's likely that this is box issue not vagrant bug.
Another thing in xenial #7241 is that vagrant expects eth1 & eth2 interfaces in box, to fix that run
|
This comment has been minimized.
This comment has been minimized.
Hi @krzysbaranski, I'm not sure if it's an issue with the box or with Vagrant. Thanks to your comment I've realised there are even more issues that this one is related to. For future reference: #7155 #7241 Thanks for the workaround, btw! |
This comment has been minimized.
This comment has been minimized.
jaraco
commented
May 5, 2016
How does one implement this temporary fix? I tried adding the code to the provisioning script, but |
This comment has been minimized.
This comment has been minimized.
krzysbaranski
commented
May 5, 2016
@jaraco you have to run this manually ( |
This comment has been minimized.
This comment has been minimized.
macnibblet
commented
May 6, 2016
I'm not having any success with the workaround. Anyone have any ideas on the main issue ? |
This comment has been minimized.
This comment has been minimized.
nhojpatrick
commented
May 19, 2016
I'm seeing the same issue from the box provided by ubuntu. https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-vagrant.box |
This comment has been minimized.
This comment has been minimized.
landam
commented
May 28, 2016
I have also the same issue with the latest box provided by ubuntu... |
This comment has been minimized.
This comment has been minimized.
krzysbaranski
commented
May 28, 2016
You can try this proposed fix #7318 |
This comment has been minimized.
This comment has been minimized.
nhojpatrick
commented
May 29, 2016
That patch is for Debian not Ubuntu. |
This comment has been minimized.
This comment has been minimized.
nhojpatrick
commented
May 29, 2016
Looking at the ubuntu files I think the fixes for Vivid also need to be done for Wily and Xenial. Will look into do a patch. |
This comment has been minimized.
This comment has been minimized.
nhojpatrick
commented
May 31, 2016
The file (plugins/guests/ubuntu/cap/change_host_name.rb) already in master fixes host name change for ubuntu vivid, wily and also xenial as it now uses systemd. I also believe it needs the #7318 patch applied as well. |
sethvargo
added this to the
1.8.2 milestone
May 31, 2016
This comment has been minimized.
This comment has been minimized.
spotlightishere
commented
Jun 2, 2016
There's a patch (#7253) that fixed this for me. It takes a little bit more to start up boxes on the first time you start up a box (further |
sethvargo
closed this
in
#7393
Jun 6, 2016
added a commit
to php-coder/mystamps
that referenced
this issue
Jun 17, 2016
added a commit
to php-coder/mystamps
that referenced
this issue
Jun 17, 2016
added a commit
to cssru/mystamps
that referenced
this issue
Aug 24, 2016
tdonohue
referenced this issue
Aug 29, 2016
Merged
Major Upgrade to use puppet-dspace and Ubuntu 16.04 #49
DiegoPino
referenced this issue
Sep 22, 2016
Closed
Vagrant Documentation must mention vagrant 1.8.5 or higher for Ubuntu 16.04 #378
This comment has been minimized.
This comment has been minimized.
mowings
commented
Nov 3, 2016
I realize it's a bit late for this, but if you are having issues with setting hostname on xenial, you can install libnss-myhostname in the container. This may prove useful if you don't want to upgrade vagrant to a later version. You may also want to unlink /lib/systemd/system/hostname.service (in the container) -- this will re-enable the hostname service so that you older versions of vagrant can properly set the hostname on xenial. |
josebolos commentedMay 4, 2016
I am using the ubuntu/xenial64 box from here: https://atlas.hashicorp.com/ubuntu/boxes/xenial64
In my vagrantfile, I have:
config.vm.hostname = "xenial1234"
After booting up, setting the hostname fails:
Changing to trusty64 fixes the problem.
Vagrant version
Vagrant 1.8.1
Host operating system
OS X 10.11.4
Guest operating system
Ubuntu 16.04 Xenial Xerus
Virtualisation software
VirtualBox 5.0.20
Vagrantfile
Debug
https://gist.github.com/joseluisbolos/889e7925a23d7fa0f19b4ae920b081e9
References
This seems to be similar (but not necessarily the same) to: #4784 #5947 #6577 #6616