成功流浪后不能流浪ssh?

时间:2016-05-25 16:11:09

标签: vagrant virtualbox

我在OSX El Capitan上,使用Vagrant 1.8.1和Virtualbox 5.0.20(两种情况下都是最新版本)。我正在尝试set up a VM as described here

我运行vagrant up时没有明显错误:

$ vagrant up

Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'trusty32'...
==> default: Matching MAC address for NAT networking...
==> default: Setting the name of the VM: pybossa-jujucharm_default_1464189010793_35912
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
==> default: Forwarding ports...
    default: 8000 (guest) => 8000 (host) (adapter 1)
    default: 7000 (guest) => 7000 (host) (adapter 1)
    default: 7001 (guest) => 7001 (host) (adapter 1)
    default: 22 (guest) => 2222 (host) (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:2222
    default: SSH username: vagrant
    default: SSH auth method: private key
    default:
    default: Vagrant insecure key detected. Vagrant will automatically replace
    default: this with a newly generated keypair for better security.
    default:
    default: Inserting generated public key within guest...
    default: Removing insecure key from the guest if it's present...
    default: Key inserted! Disconnecting and reconnecting using new SSH key...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
    default: The guest additions on this VM do not match the installed version of
    default: VirtualBox! In most cases this is fine, but in rare cases it can
    default: prevent things such as shared folders from working properly. If you see
    default: shared folder errors, please make sure the guest additions within the
    default: virtual machine match the version of VirtualBox you have installed on
    default: your host and reload your VM.
    default:
    default: Guest Additions Version: 4.3.36
    default: VirtualBox Version: 5.0
TLD but no host_name given. No patterns will be configured.
pid-file for killed process 60204 found (/Users/anna/.vagrant.d/tmp/dns/daemon/vagrant-dns.pid), deleting.
==> default: Restarted DNS Service
==> default: Mounting shared folders...
    default: /vagrant => /Users/anna/Experiments/pybossa-jujucharm
==> default: Running provisioner: shell...
    default: Running: /var/folders/hd/nfp3wlg90ms2ksf9ttkjymtr0000gn/T/vagrant-shell20160525-60263-1tuxdig.sh
==> default: stdin: is not a tty
==> default: + apt-get update -y
==> default: Get:1 http://security.ubuntu.com trusty-security InRelease [65.9 kB]
==> default: Ign http://archive.ubuntu.com trusty InRelease
==> default: Get:2 http://archive.ubuntu.com trusty-updates InRelease [65.9 kB]
==> default: Get:3 http://archive.ubuntu.com trusty-backports InRelease [65.9 kB]
==> default: Hit http://archive.ubuntu.com trusty Release.gpg
==> default: Get:4 http://security.ubuntu.com trusty-security/main Sources [115 kB]

但我不能ssh:

$ vagrant ssh
VM must be created before running this command. Run `vagrant up` first.

vagrant status表示没有创建任何内容:

$ vagrant status
Current machine states:

default                   not created (virtualbox)

The environment has not yet been created. Run `vagrant up` to
create the environment. If a machine is not created, only the
default provider will be shown. So if a provider is not listed,
then the machine is not created for that environment.

我做错了什么?

更新:来自同一目录:

$ vboxmanage list runningvms
$ vboxmanage showvminfo pybossa-jujucharm_default_1464189010793_35912
VBoxManage: error: Could not find a registered machine named 'pybossa-jujucharm_default_1464189010793_35912'
VBoxManage: error: Details: code VBOX_E_OBJECT_NOT_FOUND (0x80bb0001), component VirtualBoxWrap, interface IVirtualBox, callee nsISupports
VBoxManage: error: Context: "FindMachine(Bstr(VMNameOrUuid).raw(), machine.asOutParam())" at line 2719 of file VBoxManageInfo.cpp

我没有安装Virtualbox的多个副本(至少不是我在Applications中看到的)。这是我打开Virtualbox时看到的内容:

enter image description here

0 个答案:

没有答案