我已使用以下命令删除了一个实例:
gcloud compute instances delete --keep-disks jupyter-test
现在,我要使用保存的磁盘创建一个实例。
起初我用过:
gcloud compute instances create-with-container jupyter-test --container-image jupyter/datascience-notebook
我收到以下错误消息:
The resource 'projects/PROJECT/zones/europe-west1-b/disks/jupyter-test' already exists
然后我尝试了:
gcloud compute instances create-with-container jupyter-test --disk name=jupyter-test --container-image jupyter/datascience-notebook
但是我得到了相同的错误消息。我知道它已经存在,这就是为什么我要再次使用它!
答案 0 :(得分:1)
我试图重现您的问题,并发现在命令标志中--disk缺少“等于”。此外,我需要将命令作为beta运行以使其起作用。
以下命令有效:
gcloud beta计算实例名称与容器一起创建jupyter-test --disk = name = NAME--容器图像IMAGE