简体   繁体   中英

Ubuntu vivid box not running with vagrant

I am using ubuntu vivid with Vagrant

https://vagrantcloud.com/ubuntu/boxes/vivid64

when i do vagrant up

i get this

==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> 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:

stdin: is not a tty
Failed to start hostname.service: Unit hostname.service is masked.

Is there any way to use vivid64 . i even tried

https://atlas.hashicorp.com/larryli/vivid64

but same result

Seems as though Vagrant is throwing out an error relating to the hostname... try adding this to your vagrant file:

#host.vm.hostname = "[HOSTNAMEVM]"
host.vm.provision :shell, inline: "hostnamectl set-hostname [HOSTNAMEVM]"

Of course, set [HOSTNAMEVM] to your hostname.

What we are doing here is manually asking Vagrant to provision with a specific hostname, to attempt to fix the issue with the hostname service failing to start.

If this doesn't work, a pastebin with your Vagrantfile might help us see what might be the actual cause here.

At first, try disabling the line with "hostname" on Vagrantfile.

change the line like

config.vm.hostname = "abcd"

to

# config.vm.hostname = "abcd"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM