我在无头ubuntu 14.04上的虚拟框4.3上运行vagrant(1.7.4)-salt。 Salt是独立的。我使用这些版本的原因是因为我本地的ubuntu上的工作。
在 vagrant up 上,我得到以下输出:
==> default: Importing base box 'phusion/ubuntu-14.04-amd64'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'phusion/ubuntu-14.04-amd64' is up to date...
==> default: Setting the name of the VM: drupal_default_1452863894453_19933
==> default: Clearing any previously set forwarded ports...
==> default: Fixed port collision for 22 => 2222. Now on port 2201.
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly
==> default: Forwarding ports...
default: 22 => 2201 (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2201
default: SSH username: vagrant
default: SSH auth method: private key
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
vagrant ssh-config 给出:
Host default
HostName 127.0.0.1
User vagrant
Port 2201
UserKnownHostsFile /dev/null
StrictHostKeyChecking no
PasswordAuthentication no
IdentityFile /home/user/.vagrant.d/insecure_private_key
IdentitiesOnly yes
LogLevel FATAL
我的Vagrantfile是:
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.host_name = "site#{rand(0..999999)}"
config.vm.provider "virtualbox" do |v|
config.ssh.insert_key = false
v.memory = 2048
v.cpus = 1
end
## For masterless, mount your salt file root
config.vm.synced_folder "salt/roots/","/srv/salt/"
# Network
config.vm.network :private_network, ip: "172.16.0.100"
# Server provisioner
config.vm.provision :salt do |salt|
salt.masterless = true
salt.minion_config = "salt/minion"
salt.run_highstate = true
salt.bootstrap_options = "-P"
end
# Provisioning scripts
config.vm.provision "dbsync", type: "shell", path: "provision/db.sh"
end
可能错过了什么?任何ubuntu网络配置?任何ssh配置?