小编Dar*_*l B的帖子

Packer 无法将 aws 映像打包到 VPC 中

我正在尝试制作打包机映像,但在我们的亚马逊帐户中,我们没有默认 VPC。它已被移除。并且在尝试打包图像时出现此错误:

==> amazon-instance: Inspecting the source AMI...
==> amazon-instance: Creating temporary keypair: packer 54cfd9c9-61ef-5f8f-4091-d27e731a8a4d
==> amazon-instance: Creating temporary security group for this instance...
==> amazon-instance: No default VPC for this user (VPCIdNotSpecified)
==> amazon-instance: Deleting temporary keypair...
Build 'amazon-instance' finished.
Run Code Online (Sandbox Code Playgroud)

因此我应该指定一个默认的 VPC id 或子网 id。

我两个都试过了

{
  "variables": {
    "vpc_id ": "vpc-962438f4",
    "subnet_id": "subnet-1c5d5c68"
    },
  "builders": [{
    "type": "amazon-instance",
    "access_key": "somekey"
    "secret_key": "somekey"
    "account_id": "AccountIDNUMBER"
    "region": "ap-southeast-2",
    "source_ami": "ami-b7eb9e8d",
    "s3_bucket": "layer2amis",
    "x509_cert_path": "packer/cert-x509.pem",
    "x509_key_path": "packer/key-x509.pem",
    "instance_type": "t2.medium",
    "ssh_username": "ubuntu", …
Run Code Online (Sandbox Code Playgroud)

amazon-web-services packer

5
推荐指数
1
解决办法
9430
查看次数

标签 统计

amazon-web-services ×1

packer ×1