2015-07-04 23 views
1

我使用Ubuntu的生動與流浪Ubuntu的生動盒不是無業遊民

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

當我做無業遊民了

運行我得到這個

==> 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. 

有什麼辦法使用vivid64。我甚至試過

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

但同樣的結果

回答

1

好像流浪拋出了關於該主機的錯誤...嘗試添加這對您的無業遊民文件:

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

當然,將[HOSTNAMEVM]設置爲您的主機名。

我們在這裏做的是手動要求Vagrant使用特定的主機名進行配置,以嘗試解決主機名服務無法啓動的問題。

如果這不起作用,使用Vagrantfile的pastebin可能會幫助我們查看可能是什麼原因。

1

首先,嘗試在Vagrantfile上禁用帶有「主機名」的行。

變化線等

config.vm.hostname = "abcd" 

# config.vm.hostname = "abcd"