首页 文章

Google计算引擎列表/实例删除失败正则表达式

提问于
浏览
0

我创建了一个名为primecoin01的Google计算引擎永久磁盘的私有映像 . 后来,我'm trying to create a new image. It fails by saying the regexp is invalid both in listing the images and during gcloud.compute.instances.delete - the 1st step in using my persistent disk to create an image. It let me create the image name and now I'm无法使用命令gcloud compute images list或gcloud compute instances delete instance-0 --keep-disks boot . 我不知道从列表中删除此图像的方法 .
primecoin01肯定符合正则表达式标准,我不知道为什么它将图像命名为``primecoin01所有帮助非常感谢 .

详情如下:

C:\Program Files\Google\Cloud SDK>gcloud compute images list
NAME                                PROJECT           ALIAS              DEPRECATED STATUS
centos-6-v20141021                  centos-cloud      centos-6                      READY
centos-7-v20141021                  centos-cloud      centos-7                      READY
coreos-alpha-494-0-0-v20141108      coreos-cloud                                    READY
coreos-beta-444-5-0-v20141016       coreos-cloud                                    READY
coreos-stable-444-5-0-v20141016     coreos-cloud      coreos                        READY
backports-debian-7-wheezy-v20141021 debian-cloud      debian-7-backports            READY
debian-7-wheezy-v20141021           debian-cloud      debian-7                      READY
container-vm-v20141016              google-containers container-vm                  READY
opensuse-13-1-v20141102             opensuse-cloud    opensuse-13                   READY
rhel-6-v20141021                    rhel-cloud        rhel-6                        READY
rhel-7-v20141021                    rhel-cloud        rhel-7                        READY
sles-11-sp3-v20140930               suse-cloud        sles-11                       READY
sles-11-sp3-v20141105               suse-cloud        sles-11                       READY
sles-12-v20141023                   suse-cloud                                      READY
ERROR: (gcloud.compute.images.list) Some requests did not succeed:
 - Invalid value '``primecoin01'. Values must match the following regular expression:     '(?:(?:[-a-z0-9]{1,63}\.)*(?:[a-z]
(?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))'

C:\Program Files\Google\Cloud SDK>gcloud compute instances delete instance-0  --keep-disks boot
ERROR: (gcloud.compute.instances.delete) Unable to fetch a list of zones. Specifying  [--zone] may fix this issue:
 - Invalid value '``primecoin01'. Values must match the following regular expression: '(?:(?:[-a-z0-9]{1,63}\.)*(?:[a-z]  (?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))'

C:\Program Files\Google\Cloud SDK>gcloud compute instances delete instance-0  --keep-disks boot --zone us-central1-b
The following instances will be deleted. Attached disks configured to
be auto-deleted will be deleted unless they are attached to any other
instances. Deleting a disk is irreversible and any data on the disk
will be lost.
 - [instance-0] in [us-central1-b]

Do you want to continue (Y/n)?  y

ERROR: (gcloud.compute.instances.delete) Failed to fetch some instances:
 - Invalid value '``primecoin01'. Values must match the following regular expression: '(?:(?:[-a-z0-9]{1,63}\.)*(?:[a-z]
(?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))'

1 回答

  • 1

    创建磁盘时,这似乎是一个验证错误,并且名称不正确 . 你还有同样的问题吗?创建磁盘'snapshot'的方法是使用dd Linux命令刻录映像,然后将文件从此文件tar转到create an image .

相关问题