Ssh 从快照创建实例

Ssh 从快照创建实例,ssh,google-compute-engine,Ssh,Google Compute Engine,我有一个f1 micro实例,我一直在测试docker,它是这样创建的: $ gcloud compute instances create dockerbox \ --image container-vm-v20140731 \ --image-project google-containers \ --zone europe-west1-b \ --machine-type f1-micro 这一切都很好 我现在正在升级到一个更大的google计算引擎VM。我已经拍摄了一张

我有一个f1 micro实例,我一直在测试docker,它是这样创建的:

$ gcloud compute instances create dockerbox \
  --image container-vm-v20140731 \
  --image-project google-containers \
  --zone europe-west1-b \
  --machine-type f1-micro
这一切都很好

我现在正在升级到一个更大的google计算引擎VM。我已经拍摄了一张fi micro dockerbox的快照,然后将其用作更大的n1-standard-8虚拟机的启动源。。。在我尝试使用ssh连接到它之前,这似乎不会产生任何问题

通过命令行:

$ gcloud compute --project "secure-electron-631" ssh --zone "europe-west1-b" "me@biggerbox"
ssh: connect to host xx.xx.xx.xx port 22: Connection timed out
ERROR: (gcloud.compute.ssh) Your SSH key has not propagated to your instance yet. Try running this command again.
通过浏览器,我可以获得ssh连接:

Connection Failed
We are unable to connect to the VM on port 22. Please check that the VM is healthy and the SSH server is running.
我试了好几次,结果都一样


我已经确认biggerbox正在运行。对sshd不太确定

好的,问题似乎源于我拍摄快照时没有将微实例从已装入的持久性磁盘上分离。分离并卸载PD卷,再次快照微实例,并基于新的n1-standard-8。现在一切正常

仅供参考,对于GCE实例ssh的故障排除也很方便: