Tags are not automatically copied from the source_ami. You can use tags and
the templating feature *) for that.

Packer creates an new AMI in the region where you build and then copies
that AMI to the ami_regions. If the only thing you want is to copy an
existing AMI from one region to another it simpler to use the cli.

On Sat, Feb 9, 2019, 16:55 <[email protected] wrote:

> Hi Rickard,
>
> Thanks for the reply.
> I am using the latest 1.3.4 packer version.  I have 4 tags in the src
> ami in us-east-1  and when tried copying to ap-northeast-1,  it creates 2
> ami's one in us-east-1 again and 1 ami in ap-northeast-1, when logged in to
> aws console and search for the new ami id's I do not see the tags which are
> present in src ami.
>
> As suggested I re-ran the ami copy with PACKER_LOG=1, and below is the
> logs.
>
> Please note I have masked the ami, sg  ids for security purpose.
>
> My Packer command
> ==============
> ["PACKER_LOG=1 PACKER_LOG_PATH='/tmp/copy_packer_logs.log' packer build
> --only=copier-hvm", '-machine-readable', '-var region=us-east-1', '-var
> hvm_src_ami=ami-xxxxxx', '-var hvm_deeplearning_src_ami=ami-xxxx', '-var
> al2_src_ami=ami-xxxxx', '-var copy_regions=ap-northeast-1',
> '/media/ebs1/workspace/copy-cluster-ami-subcommand/ops/local/lib/python2.7/site-packages/qweez/packer/cluster/aws/release/copy_config.json']
>
>
> packer debug logs
> ==============
> -bash-4.2$ cat copy_packer_logs.log
> 2019/02/09 15:23:36 [INFO] Packer version: 1.3.4
> 2019/02/09 15:23:36 Packer Target OS/Arch: linux amd64
> 2019/02/09 15:23:36 Built with Go Version: go1.11.4
> 2019/02/09 15:23:36 Detected home directory from env var: /home/ec2-user
> 2019/02/09 15:23:36 Using internal plugin for docker
> 2019/02/09 15:23:36 Using internal plugin for ncloud
> 2019/02/09 15:23:36 Using internal plugin for virtualbox-ovf
> 2019/02/09 15:23:36 Using internal plugin for null
> 2019/02/09 15:23:36 Using internal plugin for oneandone
> 2019/02/09 15:23:36 Using internal plugin for openstack
> 2019/02/09 15:23:36 Using internal plugin for parallels-pvm
> 2019/02/09 15:23:36 Using internal plugin for qemu
> 2019/02/09 15:23:36 Using internal plugin for triton
> 2019/02/09 15:23:36 Using internal plugin for amazon-chroot
> 2019/02/09 15:23:36 Using internal plugin for azure-arm
> 2019/02/09 15:23:36 Using internal plugin for digitalocean
> 2019/02/09 15:23:36 Using internal plugin for file
> 2019/02/09 15:23:36 Using internal plugin for googlecompute
> 2019/02/09 15:23:36 Using internal plugin for hcloud
> 2019/02/09 15:23:36 Using internal plugin for oracle-oci
> 2019/02/09 15:23:36 Using internal plugin for scaleway
> 2019/02/09 15:23:36 Using internal plugin for alicloud-ecs
> 2019/02/09 15:23:36 Using internal plugin for amazon-ebs
> 2019/02/09 15:23:36 Using internal plugin for cloudstack
> 2019/02/09 15:23:36 Using internal plugin for lxc
> 2019/02/09 15:23:36 Using internal plugin for lxd
> 2019/02/09 15:23:36 Using internal plugin for tencentcloud-cvm
> 2019/02/09 15:23:36 Using internal plugin for oracle-classic
> 2019/02/09 15:23:36 Using internal plugin for profitbricks
> 2019/02/09 15:23:36 Using internal plugin for hyperv-vmcx
> 2019/02/09 15:23:36 Using internal plugin for amazon-ebssurrogate
> 2019/02/09 15:23:36 Using internal plugin for amazon-instance
> 2019/02/09 15:23:36 Using internal plugin for parallels-iso
> 2019/02/09 15:23:36 Using internal plugin for vmware-vmx
> 2019/02/09 15:23:36 Using internal plugin for amazon-ebsvolume
> 2019/02/09 15:23:36 Using internal plugin for hyperv-iso
> 2019/02/09 15:23:36 Using internal plugin for virtualbox-iso
> 2019/02/09 15:23:36 Using internal plugin for vmware-iso
> 2019/02/09 15:23:36 Using internal plugin for ansible-local
> 2019/02/09 15:23:36 Using internal plugin for breakpoint
> 2019/02/09 15:23:36 Using internal plugin for chef-client
> 2019/02/09 15:23:36 Using internal plugin for converge
> 2019/02/09 15:23:36 Using internal plugin for salt-masterless
> 2019/02/09 15:23:36 Using internal plugin for shell-local
> 2019/02/09 15:23:36 Using internal plugin for windows-restart
> 2019/02/09 15:23:36 Using internal plugin for ansible
> 2019/02/09 15:23:36 Using internal plugin for file
> 2019/02/09 15:23:36 Using internal plugin for powershell
> 2019/02/09 15:23:36 Using internal plugin for windows-shell
> 2019/02/09 15:23:36 Using internal plugin for shell
> 2019/02/09 15:23:36 Using internal plugin for chef-solo
> 2019/02/09 15:23:36 Using internal plugin for puppet-masterless
> 2019/02/09 15:23:36 Using internal plugin for puppet-server
> 2019/02/09 15:23:36 Using internal plugin for vagrant
> 2019/02/09 15:23:36 Using internal plugin for artifice
> 2019/02/09 15:23:36 Using internal plugin for docker-import
> 2019/02/09 15:23:36 Using internal plugin for docker-save
> 2019/02/09 15:23:36 Using internal plugin for googlecompute-import
> 2019/02/09 15:23:36 Using internal plugin for docker-tag
> 2019/02/09 15:23:36 Using internal plugin for shell-local
> 2019/02/09 15:23:36 Using internal plugin for alicloud-import
> 2019/02/09 15:23:36 Using internal plugin for amazon-import
> 2019/02/09 15:23:36 Using internal plugin for compress
> 2019/02/09 15:23:36 Using internal plugin for docker-push
> 2019/02/09 15:23:36 Using internal plugin for checksum
> 2019/02/09 15:23:36 Using internal plugin for vagrant-cloud
> 2019/02/09 15:23:36 Using internal plugin for vsphere
> 2019/02/09 15:23:36 Using internal plugin for vsphere-template
> 2019/02/09 15:23:36 Using internal plugin for googlecompute-export
> 2019/02/09 15:23:36 Using internal plugin for manifest
> 2019/02/09 15:23:36 Detected home directory from env var: /home/ec2-user
> 2019/02/09 15:23:36 Attempting to open config file:
> /home/ec2-user/.packerconfig
> 2019/02/09 15:23:36 [WARN] Config file doesn't exist:
> /home/ec2-user/.packerconfig
> 2019/02/09 15:23:36 Packer config: &{DisableCheckpoint:false
> DisableCheckpointSignature:false PluginMinPort:10000 PluginMaxPort:25000
> Builders:map[openstack:/usr/local/packer/1.3.4/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-openstack
> alicloud-ecs:/usr/local/packer/1.3.4/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-alicloud-ecs
> vmware-vmx:/usr/local/packer/1.3.4/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-vmware-vmx
> virtualbox-ovf:/usr/local/packer/1.3.4/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-virtualbox-ovf
> triton:/usr/local/packer/1.3.4/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-triton
> hcloud:/usr/local/packer/1.3.4/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-hcloud
> scaleway:/usr/local/packer/1.3.4/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-scaleway
> amazon-ebs:/usr/local/packer/1.3.4/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-amazon-ebs
> azure-arm:/usr/local/packer/1.3.4/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-azure-arm
> profitbricks:/usr/local/packer/1.3.4/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-profitbricks
> qemu:/usr/local/packer/1.3.4/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-qemu
> cloudstack:/usr/local/packer/1.3.4/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-cloudstack
> tencentcloud-cvm:/usr/local/packer/1.3.4/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-tencentcloud-cvm
> amazon-ebssurrogate:/usr/local/packer/1.3.4/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-amazon-ebssurrogate
> oneandone:/usr/local/packer/1.3.4/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-oneandone
> amazon-chroot:/usr/local/packer/1.3.4/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-amazon-chroot
> file:/usr/local/packer/1.3.4/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-file
> oracle-oci:/usr/local/packer/1.3.4/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-oracle-oci
> amazon-instance:/usr/local/packer/1.3.4/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-amazon-instance
> parallels-iso:/usr/local/packer/1.3.4/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-parallels-iso
> amazon-ebsvolume:/usr/local/packer/1.3.4/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-amazon-ebsvolume
> hyperv-iso:/usr/local/packer/1.3.4/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-hyperv-iso
> docker:/usr/local/packer/1.3.4/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-docker
> ncloud:/usr/local/packer/1.3.4/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-ncloud
> digitalocean:/usr/local/packer/1.3.4/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-digitalocean
> lxd:/usr/local/packer/1.3.4/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-lxd
> hyperv-vmcx:/usr/local/packer/1.3.4/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-hyperv-vmcx
> virtualbox-iso:/usr/local/packer/1.3.4/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-virtualbox-iso
> vmware-iso:/usr/local/packer/1.3.4/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-vmware-iso
> null:/usr/local/packer/1.3.4/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-null
> parallels-pvm:/usr/local/packer/1.3.4/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-parallels-pvm
> googlecompute:/usr/local/packer/1.3.4/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-googlecompute
> lxc:/usr/local/packer/1.3.4/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-lxc
> oracle-classic:/usr/local/packer/1.3.4/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-oracle-classic]
> PostProcessors:map[alicloud-import:/usr/local/packer/1.3.4/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-alicloud-import
> checksum:/usr/local/packer/1.3.4/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-checksum
> vagrant-cloud:/usr/local/packer/1.3.4/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-vagrant-cloud
> manifest:/usr/local/packer/1.3.4/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-manifest
> vagrant:/usr/local/packer/1.3.4/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-vagrant
> artifice:/usr/local/packer/1.3.4/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-artifice
> googlecompute-import:/usr/local/packer/1.3.4/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-googlecompute-import
> shell-local:/usr/local/packer/1.3.4/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-shell-local
> docker-import:/usr/local/packer/1.3.4/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-docker-import
> docker-save:/usr/local/packer/1.3.4/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-docker-save
> docker-tag:/usr/local/packer/1.3.4/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-docker-tag
> amazon-import:/usr/local/packer/1.3.4/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-amazon-import
> docker-push:/usr/local/packer/1.3.4/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-docker-push
> vsphere-template:/usr/local/packer/1.3.4/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-vsphere-template
> compress:/usr/local/packer/1.3.4/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-compress
> vsphere:/usr/local/packer/1.3.4/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-vsphere
> googlecompute-export:/usr/local/packer/1.3.4/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-googlecompute-export]
> Provisioners:map[ansible-local:/usr/local/packer/1.3.4/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-ansible-local
> breakpoint:/usr/local/packer/1.3.4/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-breakpoint
> chef-client:/usr/local/packer/1.3.4/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-chef-client
> windows-restart:/usr/local/packer/1.3.4/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-windows-restart
> salt-masterless:/usr/local/packer/1.3.4/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-salt-masterless
> ansible:/usr/local/packer/1.3.4/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-ansible
> shell:/usr/local/packer/1.3.4/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-shell
> chef-solo:/usr/local/packer/1.3.4/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-chef-solo
> shell-local:/usr/local/packer/1.3.4/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-shell-local
> powershell:/usr/local/packer/1.3.4/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-powershell
> puppet-masterless:/usr/local/packer/1.3.4/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-puppet-masterless
> converge:/usr/local/packer/1.3.4/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-converge
> file:/usr/local/packer/1.3.4/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-file
> windows-shell:/usr/local/packer/1.3.4/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-windows-shell
> puppet-server:/usr/local/packer/1.3.4/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-puppet-server]}
> 2019/02/09 15:23:36 Detected home directory from env var: /home/ec2-user
> 2019/02/09 15:23:36 Setting cache directory:
> /media/ebs1/workspace/copy-cluster-ami-subcommand/ops/lib/python2.7/site-packages/qweez/packer/cluster/aws/release/packer_cache
> 2019/02/09 15:23:36 Detected home directory from env var: /home/ec2-user
> 2019/02/09 15:23:36 Loading builder: amazon-ebs
> 2019/02/09 15:23:36 Plugin could not be found. Checking same directory as
> executable.
> 2019/02/09 15:23:36 Current exe path: /usr/local/packer/1.3.4/packer
> 2019/02/09 15:23:36 Creating plugin client for path:
> /usr/local/packer/1.3.4/packer
> 2019/02/09 15:23:36 Starting plugin: /usr/local/packer/1.3.4/packer
> []string{"/usr/local/packer/1.3.4/packer", "plugin",
> "packer-builder-amazon-ebs"}
> 2019/02/09 15:23:36 Waiting for RPC address for:
> /usr/local/packer/1.3.4/packer
> 2019/02/09 15:23:36 packer: 2019/02/09 15:23:36 [INFO] Packer version:
> 1.3.4
> 2019/02/09 15:23:36 packer: 2019/02/09 15:23:36 Packer Target OS/Arch:
> linux amd64
> 2019/02/09 15:23:36 packer: 2019/02/09 15:23:36 Built with Go Version:
> go1.11.4
> 2019/02/09 15:23:36 packer: 2019/02/09 15:23:36 Detected home directory
> from env var: /home/ec2-user
> 2019/02/09 15:23:36 packer: 2019/02/09 15:23:36 Attempting to open config
> file: /home/ec2-user/.packerconfig
> 2019/02/09 15:23:36 packer: 2019/02/09 15:23:36 [WARN] Config file doesn't
> exist: /home/ec2-user/.packerconfig
> 2019/02/09 15:23:36 packer: 2019/02/09 15:23:36 Packer config:
> &{DisableCheckpoint:false DisableCheckpointSignature:false
> PluginMinPort:10000 PluginMaxPort:25000 Builders:map[] PostProcessors:map[]
> Provisioners:map[]}
> 2019/02/09 15:23:36 packer: 2019/02/09 15:23:36 Detected home directory
> from env var: /home/ec2-user
> 2019/02/09 15:23:36 packer: 2019/02/09 15:23:36 Setting cache directory:
> /media/ebs1/workspace/copy-cluster-ami-subcommand/ops/lib/python2.7/site-packages/qweez/packer/cluster/aws/release/packer_cache
> 2019/02/09 15:23:36 packer: 2019/02/09 15:23:36 Detected home directory
> from env var: /home/ec2-user
> 2019/02/09 15:23:36 packer: 2019/02/09 15:23:36 args:
> []string{"packer-builder-amazon-ebs"}
> 2019/02/09 15:23:36 packer: 2019/02/09 15:23:36 Plugin minimum port: 10000
> 2019/02/09 15:23:36 packer: 2019/02/09 15:23:36 Plugin maximum port: 25000
> 2019/02/09 15:23:36 packer: 2019/02/09 15:23:36 Plugin address: unix
> /tmp/packer-plugin752845721
> 2019/02/09 15:23:36 packer: 2019/02/09 15:23:36 Waiting for connection...
> 2019/02/09 15:23:36 packer: 2019/02/09 15:23:36 Serving a plugin
> connection...
> 2019/02/09 15:23:36 Build debug mode: false
> 2019/02/09 15:23:36 Force build: false
> 2019/02/09 15:23:36 On error:
> 2019/02/09 15:23:36 Preparing build: copier-hvm
> 2019/02/09 15:23:36 Waiting on builds to complete...
> 2019/02/09 15:23:36 Starting build run: copier-hvm
> 2019/02/09 15:23:36 Running builder: amazon-ebs
> 2019/02/09 15:23:36 [INFO] (telemetry) Starting builder amazon-ebs
> 2019/02/09 15:23:36 packer: 2019/02/09 15:23:36 Found region us-east-1
> 2019/02/09 15:23:36 packer: 2019/02/09 15:23:36 [INFO] AWS Auth provider
> used: "EnvConfigCredentials"
> 2019/02/09 15:23:36 packer: 2019/02/09 15:23:36 [WARNING] (aws): env var
> AWS_TIMEOUT_SECONDS is deprecated in favor of AWS_MAX_ATTEMPTS. If you have
> not explicitly set AWS_POLL_DELAY_SECONDS, we are defaulting to a poll
> delay of 2 seconds, regardless of the AWS waiter's default.
> 2019/02/09 15:23:37 packer: 2019/02/09 15:23:37 Using AMI Filters {
> 2019/02/09 15:23:37 packer:   ImageIds: ["ami-xxxxxxxxx"]
> 2019/02/09 15:23:37 packer: }
> 2019/02/09 15:23:38 packer: 2019/02/09 15:23:38 [DEBUG] Waiting for
> temporary security group: sg-xxxxxx
> 2019/02/09 15:23:38 packer: 2019/02/09 15:23:38 [DEBUG] Found security
> group sg-xxxxxx
> 2019/02/09 15:23:38 packer: 2019/02/09 15:23:38 [DEBUG] base64 encoding
> user data...
> 2019/02/09 15:24:10 packer: 2019/02/09 15:24:10 [INFO] Not using winrm
> communicator, skipping get password...
> 2019/02/09 15:24:10 packer: 2019/02/09 15:24:10 [INFO] Waiting for SSH, up
> to timeout: 15m0s
> 2019/02/09 15:24:13 packer: 2019/02/09 15:24:13 [DEBUG] TCP connection to
> SSH ip/port failed: dial tcp 10.71.132.153:22: connect: no route to host
> 2019/02/09 15:24:21 packer: 2019/02/09 15:24:21 [DEBUG] TCP connection to
> SSH ip/port failed: dial tcp 10.71.132.153:22: connect: no route to host
> 2019/02/09 15:24:26 packer: 2019/02/09 15:24:26 [DEBUG] TCP connection to
> SSH ip/port failed: dial tcp 10.71.132.153:22: connect: connection refused
> 2019/02/09 15:24:31 packer: 2019/02/09 15:24:31 [DEBUG] TCP connection to
> SSH ip/port failed: dial tcp 10.71.132.153:22: connect: connection refused
> 2019/02/09 15:24:36 packer: 2019/02/09 15:24:36 [DEBUG] TCP connection to
> SSH ip/port failed: dial tcp 10.71.132.153:22: connect: connection refused
> 2019/02/09 15:24:41 packer: 2019/02/09 15:24:41 [DEBUG] TCP connection to
> SSH ip/port failed: dial tcp 10.71.132.153:22: connect: connection refused
> 2019/02/09 15:24:46 packer: 2019/02/09 15:24:46 [DEBUG] TCP connection to
> SSH ip/port failed: dial tcp 10.71.132.153:22: connect: connection refused
> 2019/02/09 15:24:51 packer: 2019/02/09 15:24:51 [INFO] Attempting SSH
> connection...
> 2019/02/09 15:24:51 packer: 2019/02/09 15:24:51 [DEBUG] reconnecting to
> TCP connection for SSH
> 2019/02/09 15:24:51 packer: 2019/02/09 15:24:51 [DEBUG] handshaking with
> SSH
> 2019/02/09 15:24:51 packer: 2019/02/09 15:24:51 [DEBUG] handshake complete!
> 2019/02/09 15:24:51 packer: 2019/02/09 15:24:51 [INFO] no local agent
> socket, will not connect agent
> 2019/02/09 15:24:51 packer: 2019/02/09 15:24:51 Running the provision hook
> 2019/02/09 15:36:26 [INFO] (telemetry) ending amazon-ebs
> 2019/02/09 15:36:26 Builds completed. Waiting on interrupt barrier...
> 2019/02/09 15:36:26 [INFO] (telemetry) Finalizing.
> 2019/02/09 15:36:26 waiting for all plugin processes to complete...
> 2019/02/09 15:36:26 /usr/local/packer/1.3.4/packer: plugin process exited
>
>
>
>
>
>
> My packer logs
> ===========
> 1549725816,,ui,say,==> copier-hvm: Prevalidating AMI Name:
> qbol-hvm-2019-02-09 23-23-36
> 1549725817,,ui,message,    copier-hvm: Found Image ID: ami-xxxxxxx
> 1549725817,,ui,say,==> copier-hvm: Creating temporary keypair:
> packer_5c5ef078-327e-20eb-7049-9df459192832
> 1549725817,,ui,say,==> copier-hvm: Creating temporary security group for
> this instance: packer_5c5ef079-e320-6758-71e0-ea5f0444bb29
> 1549725818,,ui,say,==> copier-hvm: Authorizing access to port 22 from
> 0.0.0.0/0 in the temporary security group...
> 1549725818,,ui,say,==> copier-hvm: Launching a source AWS instance...
> 1549725818,,ui,say,==> copier-hvm: Adding tags to source instance
> 1549725818,,ui,message,    copier-hvm: Adding tag: "Name": "Packer Builder"
> 1549725819,,ui,message,    copier-hvm: Instance ID: i-xxxxxx
> 1549725819,,ui,say,==> copier-hvm: Waiting for instance (i-xxxxxx) to
> become ready...
> 1549725850,,ui,say,==> copier-hvm: Using ssh communicator to connect:
> xxxxxxxx.compute-1.amazonaws.com
> 1549725850,,ui,say,==> copier-hvm: Waiting for SSH to become available...
> 1549725891,,ui,say,==> copier-hvm: Connected to SSH!
> 1549725891,,ui,say,==> copier-hvm: Stopping the source instance...
> 1549725891,,ui,message,    copier-hvm: Stopping instance%!(PACKER_COMMA)
> attempt 1
> 1549725891,,ui,say,==> copier-hvm: Waiting for the instance to stop...
> 1549725919,,ui,say,==> copier-hvm: Creating unencrypted AMI
> qbol-hvm-2019-02-09 23-23-36 from instance i-xxxxxx
> 1549725919,,ui,message,    copier-hvm: AMI: ami-xxxxx
> 1549725919,,ui,say,==> copier-hvm: Waiting for AMI to become ready...
> 1549725961,,ui,say,==> copier-hvm: Copying AMI (ami-xxxxx) to other
> regions...
> 1549725961,,ui,message,    copier-hvm: Copying to: ap-northeast-1
> 1549725961,,ui,message,    copier-hvm: Waiting for all copies to
> complete...
> 1549726578,,ui,say,==> copier-hvm: Modifying attributes on AMI
> (ami-xxxxxx)...
> 1549726578,,ui,message,    copier-hvm: Modifying: groups
> 1549726579,,ui,say,==> copier-hvm: Modifying attributes on AMI
> (ami-xxxxxx)...
> 1549726579,,ui,message,    copier-hvm: Modifying: groups
> 1549726579,,ui,say,==> copier-hvm: Modifying attributes on snapshot
> (snap-xxxxx)...
> 1549726579,,ui,say,==> copier-hvm: Modifying attributes on snapshot
> (snap-xxxxxx)...
> 1549726579,,ui,say,==> copier-hvm: Terminating the source AWS instance...
> 1549726586,,ui,say,==> copier-hvm: Cleaning up any extra volumes...
> 1549726586,,ui,say,==> copier-hvm: No volumes to clean up%!(PACKER_COMMA)
> skipping
> 1549726586,,ui,say,==> copier-hvm: Deleting temporary security group...
> 1549726586,,ui,say,==> copier-hvm: Deleting temporary keypair...
> 1549726586,,ui,say,Build 'copier-hvm' finished.
> 1549726586,,ui,say,\n==> Builds finished. The artifacts of successful
> builds are:
> 1549726586,copier-hvm,artifact-count,1
> 1549726586,copier-hvm,artifact,0,builder-id,mitchellh.amazonebs
>
> 1549726586,copier-hvm,artifact,0,id,ap-northeast-1:ami-xxxxxx%!(PACKER_COMMA)us-east-1:ami-xxxxxx
> 1549726586,copier-hvm,artifact,0,string,AMIs were
> created:\nap-northeast-1: ami-xxxxxx\nus-east-1: ami-xxxxxx\n
> 1549726586,copier-hvm,artifact,0,files-count,0
> 1549726586,copier-hvm,artifact,0,end
> 1549726586,,ui,say,--> copier-hvm: AMIs were created:\nap-northeast-1:
> ami-xxxxxx\nus-east-1: ami-xxxxxx\n
>
>
> On Friday, February 8, 2019 at 8:32:03 PM UTC+5:30, Rickard von Essen
> wrote:
>>
>> They should. What version of packer did you use? And what did you do to
>> come the conclusion that the regional AMI's are not tagged?
>>
>> If you rerun the build with PACKER_LOG=1 and post the full output here we
>> can tell if there is something wrong.
>>
>> On Fri, Feb 8, 2019 at 3:28 PM <[email protected]> wrote:
>>
>>> my packer config is as below
>>> I am passing list of destination regions as variables, though the ami is
>>> copied the tags are not getting copied.
>>>
>>> copy_regions is list passed below.
>>>
>>>
>>> {
>>>   "description": "packer recipe for copying the Qubole cluster image",
>>>     "variables" : {
>>>       "hvm_src_ami" : "",
>>>       "hvm_deeplearning_src_ami" : "",
>>>       "copy_regions": ""
>>>     },
>>>     "builders": [
>>>     {
>>>       "name": "copier-hvm",
>>>       "type": "amazon-ebs",
>>>       "region": "{{user `region`}}",
>>>       "source_ami": "{{user `hvm_src_ami`}}",
>>>       "instance_type": "m3.medium",
>>>       "ssh_username": "ec2-user",
>>>       "ssh_timeout": "15m",
>>>       "ami_name": "qbol-hvm-{{isotime \"2006-01-02 13-04-05\" | 
>>> clean_ami_name}}",
>>>       "ami_groups": ["all"],
>>>       "ami_regions": "{{user `copy_regions`}}",
>>>       "user_data_file": "scripts/base_amzn_cloud_config"
>>>     },
>>>
>>>
>>>
>>> my packer command triggered
>>>
>>> ['packer build --only=copier-hvm', '-machine-readable', '-var 
>>> region=us-east-1', '-var hvm_src_ami=ami-xxxxx',   '-var 
>>> copy_regions=ap-northeast-1', 
>>> '/media/ebs1/workspace/copy-cluster-ami-subcommand/ops/local/lib/python2.7/site-packages/qweez/packer/cluster/aws/release/copy_config.json']
>>>
>>>
>>>
>>>
>>> please suggest what is the solution.
>>>
>>> As per the packer documentation the tags should also be copied
>>>
>>> https://www.packer.io/docs/builders/amazon-ebs.html#ami_regions
>>>
>>> --
>>> This mailing list is governed under the HashiCorp Community Guidelines -
>>> https://www.hashicorp.com/community-guidelines.html. Behavior in
>>> violation of those guidelines may result in your removal from this mailing
>>> list.
>>>
>>> GitHub Issues: https://github.com/mitchellh/packer/issues
>>> IRC: #packer-tool on Freenode
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "Packer" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/packer-tool/790465a8-c306-41b0-9f3b-07afe4a072eb%40googlegroups.com
>>> <https://groups.google.com/d/msgid/packer-tool/790465a8-c306-41b0-9f3b-07afe4a072eb%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
> This mailing list is governed under the HashiCorp Community Guidelines -
> https://www.hashicorp.com/community-guidelines.html. Behavior in
> violation of those guidelines may result in your removal from this mailing
> list.
>
> GitHub Issues: https://github.com/mitchellh/packer/issues
> IRC: #packer-tool on Freenode
> ---
> You received this message because you are subscribed to the Google Groups
> "Packer" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/packer-tool/b8b47f8b-6011-482d-ac54-58167758d00a%40googlegroups.com
> <https://groups.google.com/d/msgid/packer-tool/b8b47f8b-6011-482d-ac54-58167758d00a%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/CALz9Rt_hXAt-2cL5MkCPdxwkyrnNgy0Wy1rzT2UQuqtzSHxxMw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to