Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-cloud-platform/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google cloud platform 将以前创建的持久性磁盘附加到Google Compute实例_Google Cloud Platform_Google Compute Engine - Fatal编程技术网

Google cloud platform 将以前创建的持久性磁盘附加到Google Compute实例

Google cloud platform 将以前创建的持久性磁盘附加到Google Compute实例,google-cloud-platform,google-compute-engine,Google Cloud Platform,Google Compute Engine,我已使用以下命令删除了一个实例: gcloud compute instances delete --keep-disks jupyter-test 现在我想用我保存的磁盘创建一个实例 起初,我使用: gcloud compute instances create-with-container jupyter-test --container-image jupyter/datascience-notebook 我收到以下错误消息: The resource 'projects/PROJE

我已使用以下命令删除了一个实例:

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

但我收到了同样的错误信息。我知道它已经存在了,这就是为什么我想再次使用它

我试图重现您的问题,发现在您的命令标志中--磁盘缺少一个“等于”。此外,我需要以测试版的形式运行该命令,以使其正常工作

下面的命令起作用了:

gcloud beta计算实例名称使用容器jupyter test创建 --disk=name=name--container image image

您是否尝试过此选项:--boot disk device name=,您尝试的是使用一个已经存在的引导磁盘,而不仅仅是附加一个磁盘。