Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No alicloud image was found matching filters: centos_7_9_x64_20G_alibase_20211027.vhd #78

Open
wwyhy opened this issue Nov 17, 2021 · 9 comments

Comments

@wwyhy
Copy link

wwyhy commented Nov 17, 2021

Hi,

We are trying to build a image base on official image, and using the official published image from page https://help.aliyun.com/document_detail/100410.html

But we got the error "no matching image found". Please help on this. thanks!


+ packer build base.json
�[1;32malicloud-ecs: output will be in this color.�[0m

�[1;32m==> alicloud-ecs: Prevalidating source region and copied regions...�[0m
�[1;32m==> alicloud-ecs: Prevalidating image name...�[0m
�[1;31m==> alicloud-ecs: No alicloud image was found matching filters: centos_7_9_x64_20G_alibase_20211027.vhd�[0m
�[1;31mBuild 'alicloud-ecs' errored after 855 milliseconds 521 microseconds: No alicloud image was found matching filters: centos_7_9_x64_20G_alibase_20211027.vhd�[0m

==> Wait completed after 855 milliseconds 711 microseconds

==> Some builds didn't complete successfully and had errors:
--> alicloud-ecs: No alicloud image was found matching filters: centos_7_9_x64_20G_alibase_20211027.vhd
@alexyueer
Copy link
Collaborator

centos_7_9_x64_20G_alibase_20211027.vhd is not online in zhangjiakou, it will publish soon.

@wwyhy
Copy link
Author

wwyhy commented Nov 18, 2021

@alexyueer

Thanks for your quickly response,

I tried change to another one, but latest 4 images are NOT working.
and the centos_7_9_x64_20G_alibase_20210623.vhd is worked in Sep 2021. now it is also not working.

please suggest how can i proceed this? thanks in advance!

@wangweihong
Copy link

wangweihong commented Oct 11, 2023

Got same error. No alicloud image was found matching filters: centos_7_9_x64_20G_alibase_20230815.vhd

image exists by call DescribeImages.

{
  "TotalCount": 1,
  "PageSize": 10,
  "RequestId": "C0FD71A1-40EA-55DB-B965-DB3B96808F79",
  "PageNumber": 1,
  "Images": {
    "Image": [
      {
        "ImageOwnerAlias": "system",
        "Description": "Kernel version is 3.10.0-1160.92.1.el7.x86_64, 2023.8.17",
        "IsSelfShared": "",
        "Platform": "CentOS",
        "ResourceGroupId": "",
        "Size": 20,
        "IsSubscribed": false,
        "BootMode": "BIOS",
        "OSName": "CentOS  7.9 64位",
        "IsPublic": true,
        "ImageId": "centos_7_9_x64_20G_alibase_20230815.vhd",
        "DetectionOptions": {},
        "Features": {
          "NvmeSupport": "supported"
        },
        "OSNameEn": "CentOS  7.9 64 bit",
        "Tags": {
          "Tag": []
        },
        "LoginAsNonRootSupported": true,
        "Status": "Available",
        "Progress": "100%",
        "Usage": "instance",
        "Architecture": "x86_64",
        "ProductCode": "",
        "IsCopied": false,
        "ImageFamily": "acs:centos_7_9_x64",
        "IsSupportIoOptimized": true,
        "IsSupportCloudinit": true,
        "ImageName": "centos_7_9_x64_20G_alibase_20230815.vhd",
        "DiskDeviceMappings": {
          "DiskDeviceMapping": []
        },
        "ImageVersion": "v2023.8.17",
        "OSType": "linux",
        "CreationTime": "2023-08-24T07:09:57Z"
      }
    ]
  },
  "RegionId": "cn-shenzhen"
}

@alexyueer
Copy link
Collaborator

Got same error. No alicloud image was found matching filters: centos_7_9_x64_20G_alibase_20230815.vhd

image exists by call DescribeImages.

{
  "TotalCount": 1,
  "PageSize": 10,
  "RequestId": "C0FD71A1-40EA-55DB-B965-DB3B96808F79",
  "PageNumber": 1,
  "Images": {
    "Image": [
      {
        "ImageOwnerAlias": "system",
        "Description": "Kernel version is 3.10.0-1160.92.1.el7.x86_64, 2023.8.17",
        "IsSelfShared": "",
        "Platform": "CentOS",
        "ResourceGroupId": "",
        "Size": 20,
        "IsSubscribed": false,
        "BootMode": "BIOS",
        "OSName": "CentOS  7.9 64位",
        "IsPublic": true,
        "ImageId": "centos_7_9_x64_20G_alibase_20230815.vhd",
        "DetectionOptions": {},
        "Features": {
          "NvmeSupport": "supported"
        },
        "OSNameEn": "CentOS  7.9 64 bit",
        "Tags": {
          "Tag": []
        },
        "LoginAsNonRootSupported": true,
        "Status": "Available",
        "Progress": "100%",
        "Usage": "instance",
        "Architecture": "x86_64",
        "ProductCode": "",
        "IsCopied": false,
        "ImageFamily": "acs:centos_7_9_x64",
        "IsSupportIoOptimized": true,
        "IsSupportCloudinit": true,
        "ImageName": "centos_7_9_x64_20G_alibase_20230815.vhd",
        "DiskDeviceMappings": {
          "DiskDeviceMapping": []
        },
        "ImageVersion": "v2023.8.17",
        "OSType": "linux",
        "CreationTime": "2023-08-24T07:09:57Z"
      }
    ]
  },
  "RegionId": "cn-shenzhen"
}

centos_7_9_x64_20G_alibase_20230919.vhd

Got same error. No alicloud image was found matching filters: centos_7_9_x64_20G_alibase_20230815.vhd

image exists by call DescribeImages.

{
  "TotalCount": 1,
  "PageSize": 10,
  "RequestId": "C0FD71A1-40EA-55DB-B965-DB3B96808F79",
  "PageNumber": 1,
  "Images": {
    "Image": [
      {
        "ImageOwnerAlias": "system",
        "Description": "Kernel version is 3.10.0-1160.92.1.el7.x86_64, 2023.8.17",
        "IsSelfShared": "",
        "Platform": "CentOS",
        "ResourceGroupId": "",
        "Size": 20,
        "IsSubscribed": false,
        "BootMode": "BIOS",
        "OSName": "CentOS  7.9 64位",
        "IsPublic": true,
        "ImageId": "centos_7_9_x64_20G_alibase_20230815.vhd",
        "DetectionOptions": {},
        "Features": {
          "NvmeSupport": "supported"
        },
        "OSNameEn": "CentOS  7.9 64 bit",
        "Tags": {
          "Tag": []
        },
        "LoginAsNonRootSupported": true,
        "Status": "Available",
        "Progress": "100%",
        "Usage": "instance",
        "Architecture": "x86_64",
        "ProductCode": "",
        "IsCopied": false,
        "ImageFamily": "acs:centos_7_9_x64",
        "IsSupportIoOptimized": true,
        "IsSupportCloudinit": true,
        "ImageName": "centos_7_9_x64_20G_alibase_20230815.vhd",
        "DiskDeviceMappings": {
          "DiskDeviceMapping": []
        },
        "ImageVersion": "v2023.8.17",
        "OSType": "linux",
        "CreationTime": "2023-08-24T07:09:57Z"
      }
    ]
  },
  "RegionId": "cn-shenzhen"
}

for shenzhen, centos_7_9_x64_20G_alibase_20230815.vhd is the lastest image and centos_7_9_x64_20G_alibase_20230919.vhd will be online soon.
for hangzhou, centos_7_9_x64_20G_alibase_20230815.vhd is deprecated and centos_7_9_x64_20G_alibase_20230919.vhd is the lastest image.

@wangweihong
Copy link

I tried both image. but failed. I wonder if I can use aliyun public image to packer new image?

my packer version

root@wwhvw:/home/wwhvw# packer version
Packer v1.9.4

plugin installed

root@wwhvw:/home/wwhvw/packer-demo/aliyun# packer plugins installed
/root/.config/packer/plugins/github.com/hashicorp/alicloud/packer-plugin-alicloud_v1.1.0_x5.0_linux_amd64

hcl template

variable "access_key" {
  type    = string
  default = "${env("ALICLOUD_ACCESS_KEY")}"
}

variable "secret_key" {
  type    = string
  default = "${env("ALICLOUD_SECRET_KEY")}"
}

source "alicloud-ecs" "aliyun-test" {
  access_key           = "${var.access_key}"
  image_name           = "packer_basic{{timestamp}}"
  instance_type        = "ecs.t5-lc1m1.small"
  internet_charge_type = "PayByTraffic"
  io_optimized         = "true"
  region               = "cn-shenzhen"
  secret_key           = "${var.secret_key}"
  #source_image         = "centos_7_9_x64_20G_alibase_20230815.vhd"
  source_image         = "centos_7_9_x64_20G_alibase_20230919.vhd"
  ssh_username         = "root"
  run_tags = {
    "Built by"   = "Packer"
    "Managed by" = "Packer"
  }
}

build {
  sources = ["source.alicloud-ecs.aliyun-test"]

  provisioner "shell" {
    inline = ["sleep 30", "yum install redis.x86_64 -y"]
  }

}

@alexyueer
Copy link
Collaborator

Try to use image_family, and you can find os related image_family.
Any error, please copy the execution detail.

@wangweihong
Copy link

still fail.

source "alicloud-ecs" "aliyun-test" {
  access_key           = "${var.access_key}"
  image_name           = "packer_basic{{timestamp}}"
  instance_type        = "ecs.t5-lc1m1.small"
  internet_charge_type = "PayByTraffic"
  io_optimized         = "true"
  region               = "cn-shenzhen"
  secret_key           = "${var.secret_key}"
  #source_image         = "centos_7_9_x64_20G_alibase_20230815.vhd"
  #source_image         = "centos_7_9_x64_20G_alibase_20230919.vhd"
  image_family          = "acs:centos_7_9_x64"
  ssh_username         = "root"
  run_tags = {
    "Built by"   = "Packer"
    "Managed by" = "Packer"
  }
}

2023/10/12 08:13:02 Starting build run: alicloud-ecs.aliyun-test
2023/10/12 08:13:02 Running builder:
2023/10/12 08:13:02 [INFO] (telemetry) Starting builder alicloud-ecs.aliyun-test
==> alicloud-ecs.aliyun-test: Prevalidating source region and copied regions...
==> alicloud-ecs.aliyun-test: Prevalidating image name...
==> alicloud-ecs.aliyun-test: No alicloud image was found matching image family: acs:centos_7_9_x64
2023/10/12 08:13:07 [INFO] (telemetry) ending alicloud-ecs.aliyun-test
==> Wait completed after 4 seconds 496 milliseconds
2023/10/12 08:13:07 machine readable: error-count []string{"1"}
==> Some builds didn't complete successfully and had errors:
2023/10/12 08:13:07 machine readable: alicloud-ecs.aliyun-test,error []string{"No alicloud image was found matching image family: acs:centos_7_9_x64"}
==> Builds finished but no artifacts were created.
2023/10/12 08:13:07 [INFO] (telemetry) Finalizing.
Build 'alicloud-ecs.aliyun-test' errored after 4 seconds 495 milliseconds: No alicloud image was found matching image family: acs:centos_7_9_x64

==> Wait completed after 4 seconds 496 milliseconds

==> Some builds didn't complete successfully and had errors:
--> alicloud-ecs.aliyun-test: No alicloud image was found matching image family: acs:centos_7_9_x64

==> Builds finished but no artifacts were created.
2023/10/12 08:13:09 [WARN] (telemetry) Error finalizing report. This is safe to ignore. Post "https://checkpoint-api.hashicorp.com/v1/telemetry/packer": context deadline exceeded
2023/10/12 08:13:09 waiting for all plugin processes to complete...
2023/10/12 08:13:09 /root/.config/packer/plugins/github.com/hashicorp/alicloud/packer-plugin-alicloud_v1.1.0_x5.0_linux_amd64: plugin process exited
2023/10/12 08:13:09 /usr/bin/packer: plugin process exited

image

@alexyueer
Copy link
Collaborator

The specified sub account used in packer is not authorized.

@wangweihong
Copy link

wangweihong commented Oct 12, 2023

@alexyueer OMG. Thanks a lot! You save my life.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants