Skip to content

Instantly share code, notes, and snippets.

@sfdc-afraley
Last active February 9, 2019 01:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sfdc-afraley/98e0115f9d2937d438255277cd73b9a5 to your computer and use it in GitHub Desktop.
Save sfdc-afraley/98e0115f9d2937d438255277cd73b9a5 to your computer and use it in GitHub Desktop.

json

{
  "variables": {
    "iso_path": "http://mirrors.kernel.org/centos/7.4.1708/isos/x86_64/CentOS-7-x86_64-DVD-1708.iso",
    "iso_sha256": "ec7500d4b006702af6af023b1f8f1b890b6c7ee54400bb98cef968b883cd6546",
    "ks_file": "ks.cfg",
    "target_region": "us-west-2",
    "aws_vmimport_role": "REDACTED",
    "s3_artifact_bucket": "REDACTED"
  },
  "builders": [
    {
      "type": "virtualbox-iso",
      "name": "import_test",
      "boot_command": [
        "<tab> text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{user `ks_file`}}<enter><wait>"
      ],
      "boot_wait": "10s",
      "disk_size": 30000,
      "guest_additions_mode": "disable",
      "guest_os_type": "RedHat_64",
      "hard_drive_interface": "sata",
      "headless": true,
      "http_directory": "kickstart",
      "iso_checksum": "{{user `iso_sha256`}}",
      "iso_checksum_type": "sha256",
      "iso_url": "{{user `iso_path`}}",
      "shutdown_command": "echo 'vagrant' | sudo -S /sbin/halt -h -p",
      "ssh_password": "packer",
      "ssh_port": 22,
      "ssh_username": "root",
      "ssh_wait_timeout": "10000s",
      "vboxmanage": [
        [ "modifyvm", "{{.Name}}", "--memory", "1048" ],
        [ "modifyvm", "{{.Name}}", "--cpus", "2" ]
      ],
      "vm_name": "import_test",
      "format": "ova"
    }
  ],
  "post-processors": [
    {
      "type": "amazon-import",
      "ami_name": "import_test",
      "region": "{{ user `target_region` }}",
      "s3_bucket_name": "{{ user `s3_artifact_bucket` }}",
      "role_name": "{{ user `aws_vmimport_role` }}"
    },
    {"type":"manifest"}
  ]
}

packer-manifest.json

{
  "builds": [
    {
      "name": "import_test",
      "builder_type": "virtualbox-iso",
      "build_time": 1549666519,
      "files": [
        {
          "name": "output-import_test/import_test.ova",
          "size": 608272384
        }
      ],
      "artifact_id": "VM",
      "packer_run_uuid": "9f1568dc-3f10-2c69-a150-4671ad408487"
    }
  ],
  "last_run_uuid": "9f1568dc-3f10-2c69-a150-4671ad408487"

Packer Output

 $ PACKER_LOG=1 packer build importtest.json
2019/02/08 17:07:21 [INFO] Packer version: 1.3.2
2019/02/08 17:07:21 Packer Target OS/Arch: darwin amd64
2019/02/08 17:07:21 Built with Go Version: go1.11.1
2019/02/08 17:07:21 Detected home directory from env var: /Users/afraley
2019/02/08 17:07:21 Using internal plugin for digitalocean
2019/02/08 17:07:21 Using internal plugin for parallels-iso
2019/02/08 17:07:21 Using internal plugin for triton
2019/02/08 17:07:21 Using internal plugin for cloudstack
2019/02/08 17:07:21 Using internal plugin for oneandone
2019/02/08 17:07:21 Using internal plugin for parallels-pvm
2019/02/08 17:07:21 Using internal plugin for amazon-ebsvolume
2019/02/08 17:07:21 Using internal plugin for amazon-ebs
2019/02/08 17:07:21 Using internal plugin for amazon-instance
2019/02/08 17:07:21 Using internal plugin for file
2019/02/08 17:07:21 Using internal plugin for oracle-classic
2019/02/08 17:07:21 Using internal plugin for virtualbox-iso
2019/02/08 17:07:21 Using internal plugin for virtualbox-ovf
2019/02/08 17:07:21 Using internal plugin for vmware-vmx
2019/02/08 17:07:21 Using internal plugin for alicloud-ecs
2019/02/08 17:07:21 Using internal plugin for amazon-ebssurrogate
2019/02/08 17:07:21 Using internal plugin for docker
2019/02/08 17:07:21 Using internal plugin for hyperv-vmcx
2019/02/08 17:07:21 Using internal plugin for lxc
2019/02/08 17:07:21 Using internal plugin for openstack
2019/02/08 17:07:21 Using internal plugin for profitbricks
2019/02/08 17:07:21 Using internal plugin for amazon-chroot
2019/02/08 17:07:21 Using internal plugin for oracle-oci
2019/02/08 17:07:21 Using internal plugin for hcloud
2019/02/08 17:07:21 Using internal plugin for vmware-iso
2019/02/08 17:07:21 Using internal plugin for lxd
2019/02/08 17:07:21 Using internal plugin for qemu
2019/02/08 17:07:21 Using internal plugin for scaleway
2019/02/08 17:07:21 Using internal plugin for azure-arm
2019/02/08 17:07:21 Using internal plugin for hyperv-iso
2019/02/08 17:07:21 Using internal plugin for ncloud
2019/02/08 17:07:21 Using internal plugin for null
2019/02/08 17:07:21 Using internal plugin for googlecompute
2019/02/08 17:07:21 Using internal plugin for ansible
2019/02/08 17:07:21 Using internal plugin for file
2019/02/08 17:07:21 Using internal plugin for puppet-masterless
2019/02/08 17:07:21 Using internal plugin for windows-restart
2019/02/08 17:07:21 Using internal plugin for powershell
2019/02/08 17:07:21 Using internal plugin for puppet-server
2019/02/08 17:07:21 Using internal plugin for windows-shell
2019/02/08 17:07:21 Using internal plugin for ansible-local
2019/02/08 17:07:21 Using internal plugin for chef-client
2019/02/08 17:07:21 Using internal plugin for chef-solo
2019/02/08 17:07:21 Using internal plugin for converge
2019/02/08 17:07:21 Using internal plugin for shell
2019/02/08 17:07:21 Using internal plugin for shell-local
2019/02/08 17:07:21 Using internal plugin for salt-masterless
2019/02/08 17:07:21 Using internal plugin for googlecompute-import
2019/02/08 17:07:21 Using internal plugin for vagrant
2019/02/08 17:07:21 Using internal plugin for vagrant-cloud
2019/02/08 17:07:21 Using internal plugin for alicloud-import
2019/02/08 17:07:21 Using internal plugin for amazon-import
2019/02/08 17:07:21 Using internal plugin for docker-push
2019/02/08 17:07:21 Using internal plugin for docker-import
2019/02/08 17:07:21 Using internal plugin for docker-tag
2019/02/08 17:07:21 Using internal plugin for shell-local
2019/02/08 17:07:21 Using internal plugin for artifice
2019/02/08 17:07:21 Using internal plugin for checksum
2019/02/08 17:07:21 Using internal plugin for compress
2019/02/08 17:07:21 Using internal plugin for googlecompute-export
2019/02/08 17:07:21 Using internal plugin for manifest
2019/02/08 17:07:21 Using internal plugin for vsphere
2019/02/08 17:07:21 Using internal plugin for docker-save
2019/02/08 17:07:21 Using internal plugin for vsphere-template
2019/02/08 17:07:21 Detected home directory from env var: /Users/afraley
2019/02/08 17:07:21 Attempting to open config file: /Users/afraley/.packerconfig
2019/02/08 17:07:21 [WARN] Config file doesn't exist: /Users/afraley/.packerconfig
2019/02/08 17:07:21 Packer config: &{DisableCheckpoint:false DisableCheckpointSignature:false PluginMinPort:10000 PluginMaxPort:25000 Builders:map[digitalocean:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-digitalocean cloudstack:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-cloudstack oneandone:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-oneandone virtualbox-iso:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-virtualbox-iso lxd:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-lxd azure-arm:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-azure-arm vmware-iso:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-vmware-iso googlecompute:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-googlecompute amazon-ebsvolume:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-amazon-ebsvolume amazon-ebs:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-amazon-ebs hyperv-vmcx:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-hyperv-vmcx profitbricks:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-profitbricks ncloud:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-ncloud amazon-ebssurrogate:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-amazon-ebssurrogate hcloud:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-hcloud hyperv-iso:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-hyperv-iso triton:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-triton virtualbox-ovf:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-virtualbox-ovf vmware-vmx:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-vmware-vmx docker:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-docker openstack:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-openstack qemu:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-qemu null:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-null lxc:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-lxc parallels-pvm:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-parallels-pvm amazon-instance:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-amazon-instance file:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-file alicloud-ecs:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-alicloud-ecs oracle-oci:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-oracle-oci scaleway:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-scaleway parallels-iso:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-parallels-iso oracle-classic:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-oracle-classic amazon-chroot:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-amazon-chroot] PostProcessors:map[vsphere:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-vsphere vsphere-template:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-vsphere-template vagrant:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-vagrant shell-local:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-shell-local manifest:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-manifest docker-save:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-docker-save alicloud-import:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-alicloud-import amazon-import:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-amazon-import compress:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-compress checksum:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-checksum googlecompute-export:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-googlecompute-export vagrant-cloud:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-vagrant-cloud docker-push:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-docker-push artifice:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-artifice googlecompute-import:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-googlecompute-import docker-import:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-docker-import docker-tag:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-docker-tag] Provisioners:map[powershell:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-powershell shell-local:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-shell-local puppet-server:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-puppet-server windows-shell:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-windows-shell ansible-local:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-ansible-local chef-client:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-chef-client chef-solo:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-chef-solo file:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-file converge:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-converge salt-masterless:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-salt-masterless ansible:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-ansible puppet-masterless:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-puppet-masterless windows-restart:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-windows-restart shell:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-shell]}
2019/02/08 17:07:21 Detected home directory from env var: /Users/afraley
2019/02/08 17:07:21 Setting cache directory: /Users/afraley/git/packer_bug_test/packer_cache
2019/02/08 17:07:21 Detected home directory from env var: /Users/afraley
2019/02/08 17:07:21 Loading builder: virtualbox-iso
2019/02/08 17:07:21 Plugin could not be found. Checking same directory as executable.
2019/02/08 17:07:21 Current exe path: /usr/local/bin/packer
2019/02/08 17:07:21 Creating plugin client for path: /usr/local/bin/packer
2019/02/08 17:07:21 Starting plugin: /usr/local/bin/packer []string{"/usr/local/bin/packer", "plugin", "packer-builder-virtualbox-iso"}
2019/02/08 17:07:21 Waiting for RPC address for: /usr/local/bin/packer
2019/02/08 17:07:21 packer: 2019/02/08 17:07:21 [INFO] Packer version: 1.3.2
2019/02/08 17:07:21 packer: 2019/02/08 17:07:21 Packer Target OS/Arch: darwin amd64
2019/02/08 17:07:21 packer: 2019/02/08 17:07:21 Built with Go Version: go1.11.1
2019/02/08 17:07:21 packer: 2019/02/08 17:07:21 Detected home directory from env var: /Users/afraley
2019/02/08 17:07:21 packer: 2019/02/08 17:07:21 Attempting to open config file: /Users/afraley/.packerconfig
2019/02/08 17:07:21 packer: 2019/02/08 17:07:21 [WARN] Config file doesn't exist: /Users/afraley/.packerconfig
2019/02/08 17:07:21 packer: 2019/02/08 17:07:21 Packer config: &{DisableCheckpoint:false DisableCheckpointSignature:false PluginMinPort:10000 PluginMaxPort:25000 Builders:map[] PostProcessors:map[] Provisioners:map[]}
2019/02/08 17:07:21 packer: 2019/02/08 17:07:21 Detected home directory from env var: /Users/afraley
2019/02/08 17:07:21 packer: 2019/02/08 17:07:21 Setting cache directory: /Users/afraley/git/packer_bug_test/packer_cache
2019/02/08 17:07:21 packer: 2019/02/08 17:07:21 Detected home directory from env var: /Users/afraley
2019/02/08 17:07:21 packer: 2019/02/08 17:07:21 args: []string{"packer-builder-virtualbox-iso"}
2019/02/08 17:07:21 packer: 2019/02/08 17:07:21 Plugin minimum port: 10000
2019/02/08 17:07:21 packer: 2019/02/08 17:07:21 Plugin maximum port: 25000
2019/02/08 17:07:21 packer: 2019/02/08 17:07:21 Plugin address: unix /var/folders/1d/xlp72ghn7w1b5p_6jlyfnmkc5qpfrw/T/packer-plugin339170963
2019/02/08 17:07:21 packer: 2019/02/08 17:07:21 Waiting for connection...
2019/02/08 17:07:21 packer: 2019/02/08 17:07:21 Serving a plugin connection...
2019/02/08 17:07:21 Loading post-processor: amazon-import
2019/02/08 17:07:21 Plugin could not be found. Checking same directory as executable.
2019/02/08 17:07:21 Current exe path: /usr/local/bin/packer
2019/02/08 17:07:21 Creating plugin client for path: /usr/local/bin/packer
2019/02/08 17:07:21 Starting plugin: /usr/local/bin/packer []string{"/usr/local/bin/packer", "plugin", "packer-post-processor-amazon-import"}
2019/02/08 17:07:21 Waiting for RPC address for: /usr/local/bin/packer
2019/02/08 17:07:21 packer: 2019/02/08 17:07:21 [INFO] Packer version: 1.3.2
2019/02/08 17:07:21 packer: 2019/02/08 17:07:21 Packer Target OS/Arch: darwin amd64
2019/02/08 17:07:21 packer: 2019/02/08 17:07:21 Built with Go Version: go1.11.1
2019/02/08 17:07:21 packer: 2019/02/08 17:07:21 Detected home directory from env var: /Users/afraley
2019/02/08 17:07:21 packer: 2019/02/08 17:07:21 Attempting to open config file: /Users/afraley/.packerconfig
2019/02/08 17:07:21 packer: 2019/02/08 17:07:21 [WARN] Config file doesn't exist: /Users/afraley/.packerconfig
2019/02/08 17:07:21 packer: 2019/02/08 17:07:21 Packer config: &{DisableCheckpoint:false DisableCheckpointSignature:false PluginMinPort:10000 PluginMaxPort:25000 Builders:map[] PostProcessors:map[] Provisioners:map[]}
2019/02/08 17:07:21 packer: 2019/02/08 17:07:21 Detected home directory from env var: /Users/afraley
2019/02/08 17:07:21 packer: 2019/02/08 17:07:21 Setting cache directory: /Users/afraley/git/packer_bug_test/packer_cache
2019/02/08 17:07:21 packer: 2019/02/08 17:07:21 Detected home directory from env var: /Users/afraley
2019/02/08 17:07:21 packer: 2019/02/08 17:07:21 args: []string{"packer-post-processor-amazon-import"}
2019/02/08 17:07:21 packer: 2019/02/08 17:07:21 Plugin minimum port: 10000
2019/02/08 17:07:21 packer: 2019/02/08 17:07:21 Plugin maximum port: 25000
2019/02/08 17:07:21 packer: 2019/02/08 17:07:21 Plugin address: unix /var/folders/1d/xlp72ghn7w1b5p_6jlyfnmkc5qpfrw/T/packer-plugin228552191
2019/02/08 17:07:21 packer: 2019/02/08 17:07:21 Waiting for connection...
2019/02/08 17:07:21 packer: 2019/02/08 17:07:21 Serving a plugin connection...
2019/02/08 17:07:21 Loading post-processor: manifest
2019/02/08 17:07:21 Plugin could not be found. Checking same directory as executable.
2019/02/08 17:07:21 Current exe path: /usr/local/bin/packer
2019/02/08 17:07:21 Creating plugin client for path: /usr/local/bin/packer
2019/02/08 17:07:21 Starting plugin: /usr/local/bin/packer []string{"/usr/local/bin/packer", "plugin", "packer-post-processor-manifest"}
2019/02/08 17:07:21 Waiting for RPC address for: /usr/local/bin/packer
2019/02/08 17:07:21 packer: 2019/02/08 17:07:21 [INFO] Packer version: 1.3.2
2019/02/08 17:07:21 packer: 2019/02/08 17:07:21 Packer Target OS/Arch: darwin amd64
2019/02/08 17:07:21 packer: 2019/02/08 17:07:21 Built with Go Version: go1.11.1
2019/02/08 17:07:21 packer: 2019/02/08 17:07:21 Detected home directory from env var: /Users/afraley
2019/02/08 17:07:21 packer: 2019/02/08 17:07:21 Attempting to open config file: /Users/afraley/.packerconfig
2019/02/08 17:07:21 packer: 2019/02/08 17:07:21 [WARN] Config file doesn't exist: /Users/afraley/.packerconfig
2019/02/08 17:07:21 packer: 2019/02/08 17:07:21 Packer config: &{DisableCheckpoint:false DisableCheckpointSignature:false PluginMinPort:10000 PluginMaxPort:25000 Builders:map[] PostProcessors:map[] Provisioners:map[]}
2019/02/08 17:07:21 packer: 2019/02/08 17:07:21 Detected home directory from env var: /Users/afraley
2019/02/08 17:07:21 packer: 2019/02/08 17:07:21 Setting cache directory: /Users/afraley/git/packer_bug_test/packer_cache
2019/02/08 17:07:21 packer: 2019/02/08 17:07:21 Detected home directory from env var: /Users/afraley
2019/02/08 17:07:21 packer: 2019/02/08 17:07:21 args: []string{"packer-post-processor-manifest"}
2019/02/08 17:07:21 packer: 2019/02/08 17:07:21 Plugin minimum port: 10000
2019/02/08 17:07:21 packer: 2019/02/08 17:07:21 Plugin maximum port: 25000
2019/02/08 17:07:21 packer: 2019/02/08 17:07:21 Plugin address: unix /var/folders/1d/xlp72ghn7w1b5p_6jlyfnmkc5qpfrw/T/packer-plugin033294931
2019/02/08 17:07:21 packer: 2019/02/08 17:07:21 Waiting for connection...
2019/02/08 17:07:21 packer: 2019/02/08 17:07:21 Serving a plugin connection...
2019/02/08 17:07:21 Build debug mode: false
2019/02/08 17:07:21 Force build: false
2019/02/08 17:07:21 On error:
2019/02/08 17:07:21 Preparing build: import_test
import_test output will be in this color.

2019/02/08 17:07:21 packer: 2019/02/08 17:07:21 Found region us-west-2
2019/02/08 17:07:21 packer: 2019/02/08 17:07:21 [INFO] AWS Auth provider used: "SharedConfigCredentials: /Users/afraley/.aws/credentials"
2019/02/08 17:07:22 packer: 2019/02/08 17:07:22 {{import_test virtualbox-iso false false  map[target_region:us-west-2 aws_vmimport_role:redacted-role s3_artifact_bucket:redacted-bucket-name iso_path:http://mirrors.kernel.org/centos/7.4.1708/isos/x86_64/CentOS-7-x86_64-DVD-1708.iso iso_sha256:ec7500d4b006702af6af023b1f8f1b890b6c7ee54400bb98cef968b883cd6546 ks_file:ks.cfg] []} {  false   us-west-2  false false  0xc0000be4e0 <nil>} redacted-bucket-name packer-import-{{timestamp}}.ova false map[] import_test  [] []  redacted-role {<nil> map[clean_ami_name:0x19710d0] map[ks_file:ks.cfg target_region:us-west-2 aws_vmimport_role:redacted-role s3_artifact_bucket:redacted-bucket-name iso_path:http://mirrors.kernel.org/centos/7.4.1708/isos/x86_64/CentOS-7-x86_64-DVD-1708.iso iso_sha256:ec7500d4b006702af6af023b1f8f1b890b6c7ee54400bb98cef968b883cd6546] [] false import_test virtualbox-iso /Users/afraley/git/packer_bug_test/importtest.json}}
2019/02/08 17:07:22 Waiting on builds to complete...
2019/02/08 17:07:22 Starting build run: import_test
2019/02/08 17:07:22 Running builder: virtualbox-iso
2019/02/08 17:07:22 [INFO] (telemetry) Starting builder virtualbox-iso
2019/02/08 17:07:22 packer: 2019/02/08 17:07:22 VBoxManage path: /usr/local/bin/VBoxManage
2019/02/08 17:07:22 packer: 2019/02/08 17:07:22 Not downloading guest additions since it is disabled.
==> import_test: Retrieving ISO
2019/02/08 17:07:22 packer: 2019/02/08 17:07:22 Acquiring lock to download: http://mirrors.kernel.org/centos/7.4.1708/isos/x86_64/CentOS-7-x86_64-DVD-1708.iso
2019/02/08 17:07:22 packer: 2019/02/08 17:07:22 Verifying checksum of /Users/afraley/git/packer_bug_test/packer_cache/c4bf15f4237756dfa011191c28b7cfb6c897c65b3d56775b528770d5fa0c888f.iso
    import_test: Found already downloaded, initial checksum matched, no download needed: http://mirrors.kernel.org/centos/7.4.1708/isos/x86_64/CentOS-7-x86_64-DVD-1708.iso
2019/02/08 17:07:35 packer: 2019/02/08 17:07:35 No floppy files specified. Floppy disk will not be made.
2019/02/08 17:07:35 packer: 2019/02/08 17:07:35 Trying port: 8473
==> import_test: Starting HTTP server on port 8473
2019/02/08 17:07:35 packer: 2019/02/08 17:07:35 Suppressing annoying messages in VirtualBox
2019/02/08 17:07:35 packer: 2019/02/08 17:07:35 Executing VBoxManage: []string{"setextradata", "global", "GUI/RegistrationData", "triesLeft=0"}
2019/02/08 17:07:35 packer: 2019/02/08 17:07:35 stdout:
2019/02/08 17:07:35 packer: 2019/02/08 17:07:35 stderr:
2019/02/08 17:07:35 packer: 2019/02/08 17:07:35 Executing VBoxManage: []string{"setextradata", "global", "GUI/SuppressMessages", "confirmInputCapture,remindAboutAutoCapture,remindAboutMouseIntegrationOff,remindAboutMouseIntegrationOn,remindAboutWrongColorDepth"}
2019/02/08 17:07:35 packer: 2019/02/08 17:07:35 stdout:
2019/02/08 17:07:35 packer: 2019/02/08 17:07:35 stderr:
2019/02/08 17:07:35 packer: 2019/02/08 17:07:35 Executing VBoxManage: []string{"setextradata", "global", "GUI/UpdateCheckCount", "60"}
2019/02/08 17:07:35 packer: 2019/02/08 17:07:35 stdout:
2019/02/08 17:07:35 packer: 2019/02/08 17:07:35 stderr:
2019/02/08 17:07:35 packer: 2019/02/08 17:07:35 Executing VBoxManage: []string{"setextradata", "global", "GUI/UpdateDate", "1 d, 2020-01-01, stable"}
2019/02/08 17:07:35 packer: 2019/02/08 17:07:35 stdout:
2019/02/08 17:07:35 packer: 2019/02/08 17:07:35 stderr:
==> import_test: Creating virtual machine...
2019/02/08 17:07:35 packer: 2019/02/08 17:07:35 Executing VBoxManage: []string{"createvm", "--name", "import_test", "--ostype", "RedHat_64", "--register"}
2019/02/08 17:07:35 packer: 2019/02/08 17:07:35 stdout: Virtual machine 'import_test' is created and registered.
2019/02/08 17:07:35 packer: UUID: 4845c8a9-f551-4d62-9720-71ebb5b08cc2
2019/02/08 17:07:35 packer: Settings file: '/Users/afraley/VirtualBox VMs/import_test/import_test.vbox'
2019/02/08 17:07:35 packer: 2019/02/08 17:07:35 stderr:
2019/02/08 17:07:35 packer: 2019/02/08 17:07:35 Executing VBoxManage: []string{"modifyvm", "import_test", "--boot1", "disk", "--boot2", "dvd", "--boot3", "none", "--boot4", "none"}
2019/02/08 17:07:35 packer: 2019/02/08 17:07:35 stdout:
2019/02/08 17:07:35 packer: 2019/02/08 17:07:35 stderr:
2019/02/08 17:07:35 packer: 2019/02/08 17:07:35 Executing VBoxManage: []string{"modifyvm", "import_test", "--cpus", "1"}
2019/02/08 17:07:35 packer: 2019/02/08 17:07:35 stdout:
2019/02/08 17:07:35 packer: 2019/02/08 17:07:35 stderr:
2019/02/08 17:07:35 packer: 2019/02/08 17:07:35 Executing VBoxManage: []string{"modifyvm", "import_test", "--memory", "512"}
2019/02/08 17:07:35 packer: 2019/02/08 17:07:35 stdout:
2019/02/08 17:07:35 packer: 2019/02/08 17:07:35 stderr:
==> import_test: Creating hard drive...
2019/02/08 17:07:35 packer: 2019/02/08 17:07:35 Executing VBoxManage: []string{"createhd", "--filename", "output-import_test/import_test.vdi", "--size", "30000", "--format", "VDI", "--variant", "Standard"}
2019/02/08 17:07:35 packer: 2019/02/08 17:07:35 stdout: Medium created. UUID: 191bd415-c89e-4bbd-9756-e5531cf8ec73
2019/02/08 17:07:35 packer: 2019/02/08 17:07:35 stderr: 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
2019/02/08 17:07:35 packer: 2019/02/08 17:07:35 Executing VBoxManage: []string{"storagectl", "import_test", "--name", "IDE Controller", "--add", "ide"}
2019/02/08 17:07:35 packer: 2019/02/08 17:07:35 stdout:
2019/02/08 17:07:35 packer: 2019/02/08 17:07:35 stderr:
2019/02/08 17:07:35 packer: 2019/02/08 17:07:35 VBoxManage --version output: 5.2.22r126460
2019/02/08 17:07:35 packer: 2019/02/08 17:07:35 VirtualBox version: 5.2.22
2019/02/08 17:07:35 packer: 2019/02/08 17:07:35 Executing VBoxManage: []string{"storagectl", "import_test", "--name", "SATA Controller", "--add", "sata", "--portcount", "1"}
2019/02/08 17:07:35 packer: 2019/02/08 17:07:35 stdout:
2019/02/08 17:07:35 packer: 2019/02/08 17:07:35 stderr:
2019/02/08 17:07:35 packer: 2019/02/08 17:07:35 Executing VBoxManage: []string{"storageattach", "import_test", "--storagectl", "SATA Controller", "--port", "0", "--device", "0", "--type", "hdd", "--medium", "output-import_test/import_test.vdi", "--nonrotational", "off", "--discard", "off"}
2019/02/08 17:07:35 packer: 2019/02/08 17:07:35 stdout:
2019/02/08 17:07:35 packer: 2019/02/08 17:07:35 stderr:
2019/02/08 17:07:35 packer: 2019/02/08 17:07:35 Executing VBoxManage: []string{"storageattach", "import_test", "--storagectl", "IDE Controller", "--port", "0", "--device", "1", "--type", "dvddrive", "--medium", "/Users/afraley/git/aws-packer-ami-creation/packer/packer_cache/c4bf15f4237756dfa011191c28b7cfb6c897c65b3d56775b528770d5fa0c888f.iso"}
2019/02/08 17:07:35 packer: 2019/02/08 17:07:35 stdout:
2019/02/08 17:07:35 packer: 2019/02/08 17:07:35 stderr:
2019/02/08 17:07:35 packer: 2019/02/08 17:07:35 Not attaching guest additions since we're uploading.
2019/02/08 17:07:35 packer: 2019/02/08 17:07:35 Looking for available port between 5900 and 6000 on 127.0.0.1
2019/02/08 17:07:35 packer: 2019/02/08 17:07:35 Trying port: 5922
2019/02/08 17:07:35 packer: 2019/02/08 17:07:35 Executing VBoxManage: []string{"modifyvm", "import_test", "--vrdeaddress", "127.0.0.1", "--vrdeauthtype", "null", "--vrde", "on", "--vrdeport", "5922"}
2019/02/08 17:07:35 packer: 2019/02/08 17:07:35 stdout:
2019/02/08 17:07:35 packer: 2019/02/08 17:07:35 stderr:
2019/02/08 17:07:35 packer: 2019/02/08 17:07:35 No floppy disk, not attaching.
2019/02/08 17:07:35 packer: 2019/02/08 17:07:35 Looking for available communicator (SSH, WinRM, etc) port between 2222 and 4444
2019/02/08 17:07:35 packer: 2019/02/08 17:07:35 Trying port: 3478
2019/02/08 17:07:35 packer: 2019/02/08 17:07:35 Executing VBoxManage: []string{"modifyvm", "import_test", "--natpf1", "packercomm,tcp,127.0.0.1,3478,,22"}
==> import_test: Creating forwarded port mapping for communicator (SSH, WinRM, etc) (host port 3478)
2019/02/08 17:07:35 packer: 2019/02/08 17:07:35 stdout:
2019/02/08 17:07:35 packer: 2019/02/08 17:07:35 stderr:
==> import_test: Executing custom VBoxManage commands...
2019/02/08 17:07:35 packer: 2019/02/08 17:07:35 Executing VBoxManage: []string{"modifyvm", "import_test", "--memory", "1048"}
    import_test: Executing: modifyvm import_test --memory 1048
2019/02/08 17:07:35 packer: 2019/02/08 17:07:35 stdout:
2019/02/08 17:07:35 packer: 2019/02/08 17:07:35 stderr:
    import_test: Executing: modifyvm import_test --cpus 2
2019/02/08 17:07:35 packer: 2019/02/08 17:07:35 Executing VBoxManage: []string{"modifyvm", "import_test", "--cpus", "2"}
2019/02/08 17:07:35 packer: 2019/02/08 17:07:35 stdout:
2019/02/08 17:07:35 packer: 2019/02/08 17:07:35 stderr:
==> import_test: Starting the virtual machine...
    import_test: view the screen of the VM, connect via VRDP without a password to
    import_test: rdp://127.0.0.1:5922
    import_test: The VM will be run headless, without a GUI. If you want to
2019/02/08 17:07:35 packer: 2019/02/08 17:07:35 Executing VBoxManage: []string{"startvm", "import_test", "--type", "headless"}
    import_test: view the screen of the VM, connect via VRDP without a password to
    import_test: rdp://127.0.0.1:5922
2019/02/08 17:07:36 packer: 2019/02/08 17:07:36 stdout: Waiting for VM "import_test" to power on...
2019/02/08 17:07:36 packer: VM "import_test" has been successfully started.
2019/02/08 17:07:36 packer: 2019/02/08 17:07:36 stderr:
==> import_test: Waiting 10s for boot...
==> import_test: Typing the boot command...
2019/02/08 17:07:46 packer: 2019/02/08 17:07:46 Special code 'Press' '<tab>' found, replacing with: &{[0f] [8f]}
2019/02/08 17:07:46 packer: 2019/02/08 17:07:46 Sending char ' ', code '39b9', shift false
2019/02/08 17:07:46 packer: 2019/02/08 17:07:46 Sending char 't', code '1494', shift false
2019/02/08 17:07:46 packer: 2019/02/08 17:07:46 Sending char 'e', code '1292', shift false
2019/02/08 17:07:46 packer: 2019/02/08 17:07:46 Sending char 'x', code '2dad', shift false
2019/02/08 17:07:46 packer: 2019/02/08 17:07:46 Sending char 't', code '1494', shift false
2019/02/08 17:07:46 packer: 2019/02/08 17:07:46 Sending char ' ', code '39b9', shift false
2019/02/08 17:07:46 packer: 2019/02/08 17:07:46 Sending char 'k', code '25a5', shift false
2019/02/08 17:07:46 packer: 2019/02/08 17:07:46 Sending char 's', code '1f9f', shift false
2019/02/08 17:07:46 packer: 2019/02/08 17:07:46 Sending char '=', code '0d8d', shift false
2019/02/08 17:07:46 packer: 2019/02/08 17:07:46 Sending char 'h', code '23a3', shift false
2019/02/08 17:07:46 packer: 2019/02/08 17:07:46 Sending char 't', code '1494', shift false
2019/02/08 17:07:46 packer: 2019/02/08 17:07:46 Sending char 't', code '1494', shift false
2019/02/08 17:07:46 packer: 2019/02/08 17:07:46 Sending char 'p', code '1999', shift false
2019/02/08 17:07:46 packer: 2019/02/08 17:07:46 Sending char ':', code '2a27aaa7', shift true
2019/02/08 17:07:46 packer: 2019/02/08 17:07:46 Sending char '/', code '35b5', shift false
2019/02/08 17:07:46 packer: 2019/02/08 17:07:46 Sending char '/', code '35b5', shift false
2019/02/08 17:07:46 packer: 2019/02/08 17:07:46 Sending char '1', code '0282', shift false
2019/02/08 17:07:46 packer: 2019/02/08 17:07:46 Sending char '0', code '0b8b', shift false
2019/02/08 17:07:46 packer: 2019/02/08 17:07:46 Sending char '.', code '34b4', shift false
2019/02/08 17:07:46 packer: 2019/02/08 17:07:46 Sending char '0', code '0b8b', shift false
2019/02/08 17:07:46 packer: 2019/02/08 17:07:46 Sending char '.', code '34b4', shift false
2019/02/08 17:07:46 packer: 2019/02/08 17:07:46 Sending char '2', code '0383', shift false
2019/02/08 17:07:46 packer: 2019/02/08 17:07:46 Sending char '.', code '34b4', shift false
2019/02/08 17:07:46 packer: 2019/02/08 17:07:46 Sending char '2', code '0383', shift false
2019/02/08 17:07:46 packer: 2019/02/08 17:07:46 Sending char ':', code '2a27aaa7', shift true
2019/02/08 17:07:46 packer: 2019/02/08 17:07:46 Sending char '8', code '0989', shift false
2019/02/08 17:07:46 packer: 2019/02/08 17:07:46 Sending char '4', code '0585', shift false
2019/02/08 17:07:46 packer: 2019/02/08 17:07:46 Sending char '7', code '0888', shift false
2019/02/08 17:07:46 packer: 2019/02/08 17:07:46 Sending char '3', code '0484', shift false
2019/02/08 17:07:46 packer: 2019/02/08 17:07:46 Sending char '/', code '35b5', shift false
2019/02/08 17:07:46 packer: 2019/02/08 17:07:46 Sending char 'k', code '25a5', shift false
2019/02/08 17:07:46 packer: 2019/02/08 17:07:46 Sending char 's', code '1f9f', shift false
2019/02/08 17:07:46 packer: 2019/02/08 17:07:46 Sending char '.', code '34b4', shift false
2019/02/08 17:07:46 packer: 2019/02/08 17:07:46 Sending char 'c', code '2eae', shift false
2019/02/08 17:07:46 packer: 2019/02/08 17:07:46 Sending char 'f', code '21a1', shift false
2019/02/08 17:07:46 packer: 2019/02/08 17:07:46 Sending char 'g', code '22a2', shift false
2019/02/08 17:07:46 packer: 2019/02/08 17:07:46 Special code 'Press' '<enter>' found, replacing with: &{[1c] [9c]}
2019/02/08 17:07:46 packer: 2019/02/08 17:07:46 Executing VBoxManage: []string{"controlvm", "import_test", "keyboardputscancode", "0f", "8f", "39", "b9", "14", "94", "12", "92", "2d", "ad", "14", "94", "39", "b9", "25", "a5", "1f", "9f", "0d", "8d", "23", "a3", "14", "94"}
2019/02/08 17:07:46 packer: 2019/02/08 17:07:46 stdout:
2019/02/08 17:07:46 packer: 2019/02/08 17:07:46 stderr:
2019/02/08 17:07:46 packer: 2019/02/08 17:07:46 Executing VBoxManage: []string{"controlvm", "import_test", "keyboardputscancode", "14", "94", "19", "99", "2a", "27", "aa", "a7", "35", "b5", "35", "b5", "02", "82", "0b", "8b", "34", "b4", "0b", "8b", "34", "b4", "03", "83"}
2019/02/08 17:07:47 packer: 2019/02/08 17:07:47 stdout:
2019/02/08 17:07:47 packer: 2019/02/08 17:07:47 stderr:
2019/02/08 17:07:47 packer: 2019/02/08 17:07:47 Executing VBoxManage: []string{"controlvm", "import_test", "keyboardputscancode", "34", "b4", "03", "83", "2a", "27", "aa", "a7", "09", "89", "05", "85", "08", "88", "04", "84", "35", "b5", "25", "a5", "1f", "9f", "34", "b4"}
2019/02/08 17:07:47 packer: 2019/02/08 17:07:47 stdout:
2019/02/08 17:07:47 packer: 2019/02/08 17:07:47 stderr:
2019/02/08 17:07:47 packer: 2019/02/08 17:07:47 Executing VBoxManage: []string{"controlvm", "import_test", "keyboardputscancode", "2e", "ae", "21", "a1", "22", "a2", "1c", "9c"}
2019/02/08 17:07:47 packer: 2019/02/08 17:07:47 stdout:
2019/02/08 17:07:47 packer: 2019/02/08 17:07:47 stderr:
2019/02/08 17:07:47 packer: 2019/02/08 17:07:47 [INFO] Waiting 1s
==> import_test: Using ssh communicator to connect: 127.0.0.1
2019/02/08 17:07:48 packer: 2019/02/08 17:07:48 [INFO] Waiting for SSH, up to timeout: 2h46m40s
==> import_test: Waiting for SSH to become available...
2019/02/08 17:07:48 packer: 2019/02/08 17:07:48 [INFO] Attempting SSH connection...
2019/02/08 17:07:48 packer: 2019/02/08 17:07:48 [DEBUG] reconnecting to TCP connection for SSH
2019/02/08 17:07:48 packer: 2019/02/08 17:07:48 [DEBUG] handshaking with SSH
2019/02/08 17:08:08 packer: 2019/02/08 17:08:08 [DEBUG] SSH handshake err: ssh: handshake failed: read tcp 127.0.0.1:54228->127.0.0.1:3478: read: connection reset by peer
2019/02/08 17:08:15 packer: 2019/02/08 17:08:15 [INFO] Attempting SSH connection...
2019/02/08 17:08:15 packer: 2019/02/08 17:08:15 [DEBUG] reconnecting to TCP connection for SSH
2019/02/08 17:08:15 packer: 2019/02/08 17:08:15 [DEBUG] handshaking with SSH
2019/02/08 17:08:15 packer: 2019/02/08 17:08:15 [DEBUG] SSH handshake err: ssh: handshake 
2019/02/08 17:12:27 packer: 2019/02/08 17:12:27 [INFO] Attempting SSH connection...
2019/02/08 17:12:27 packer: 2019/02/08 17:12:27 [DEBUG] reconnecting to TCP connection for SSH
2019/02/08 17:12:27 packer: 2019/02/08 17:12:27 [DEBUG] handshaking with SSH
2019/02/08 17:12:47 packer: 2019/02/08 17:12:47 [DEBUG] handshake complete!
2019/02/08 17:12:47 packer: 2019/02/08 17:12:47 [DEBUG] Opening new ssh session
2019/02/08 17:12:47 packer: 2019/02/08 17:12:47 [INFO] agent forwarding enabled
==> import_test: Connected to SSH!
2019/02/08 17:12:48 packer: 2019/02/08 17:12:48 VBoxManage --version output: 5.2.22r126460
2019/02/08 17:12:48 packer: 2019/02/08 17:12:48 VirtualBox version: 5.2.22
==> import_test: Uploading VirtualBox version info (5.2.22)
2019/02/08 17:12:48 packer: 2019/02/08 17:12:48 [DEBUG] Opening new ssh session
2019/02/08 17:12:48 packer: 2019/02/08 17:12:48 [DEBUG] Starting remote scp process:  scp -vt .
2019/02/08 17:12:48 packer: 2019/02/08 17:12:48 [DEBUG] Started SCP session, beginning transfers...
2019/02/08 17:12:48 packer: 2019/02/08 17:12:48 [DEBUG] Copying input data into temporary file so we can read the length
2019/02/08 17:12:48 packer: 2019/02/08 17:12:48 [DEBUG] scp: Uploading .vbox_version: perms=C0644 size=6
2019/02/08 17:12:48 packer: 2019/02/08 17:12:48 [DEBUG] SCP session complete, closing stdin pipe.
2019/02/08 17:12:48 packer: 2019/02/08 17:12:48 [DEBUG] Waiting for SSH session to complete.
2019/02/08 17:12:48 packer: 2019/02/08 17:12:48 [DEBUG] scp stderr (length 28): Sink: C0644 6 .vbox_version
2019/02/08 17:12:48 packer: 2019/02/08 17:12:48 Not uploading guest additions since mode is not upload
2019/02/08 17:12:48 packer: 2019/02/08 17:12:48 Running the provision hook
==> import_test: Gracefully halting virtual machine...
2019/02/08 17:12:48 packer: 2019/02/08 17:12:48 Executing shutdown command: echo 'vagrant' | sudo -S /sbin/halt -h -p
2019/02/08 17:12:48 packer: 2019/02/08 17:12:48 [DEBUG] Opening new ssh session
2019/02/08 17:12:48 packer: 2019/02/08 17:12:48 [DEBUG] starting remote command: echo 'vagrant' | sudo -S /sbin/halt -h -p
2019/02/08 17:12:48 packer: 2019/02/08 17:12:48 [ERROR] Remote command exited without exit status or exit signal.
2019/02/08 17:12:48 packer: 2019/02/08 17:12:48 Waiting max 5m0s for shutdown to complete
2019/02/08 17:12:49 packer: 2019/02/08 17:12:49 VM shut down.
2019/02/08 17:12:49 packer: 2019/02/08 17:12:49 Executing VBoxManage: []string{"storageattach", "import_test", "--storagectl", "IDE Controller", "--port", "0", "--device", "1", "--medium", "none"}
2019/02/08 17:12:49 packer: 2019/02/08 17:12:49 stdout:
2019/02/08 17:12:49 packer: 2019/02/08 17:12:49 stderr:
2019/02/08 17:12:49 packer: 2019/02/08 17:12:49 1 second timeout to ensure VM is really shutdown
==> import_test: Preparing to export machine...
2019/02/08 17:12:50 packer: 2019/02/08 17:12:50 Executing VBoxManage: []string{"modifyvm", "import_test", "--natpf1", "delete", "packercomm"}
    import_test: Deleting forwarded port mapping for the communicator (SSH, WinRM, etc) (host port 3478)
2019/02/08 17:12:50 packer: 2019/02/08 17:12:50 stdout:
2019/02/08 17:12:50 packer: 2019/02/08 17:12:50 stderr:
==> import_test: Exporting virtual machine...
    import_test: Executing: export import_test --output output-import_test/import_test.ova
2019/02/08 17:12:50 packer: 2019/02/08 17:12:50 Executing VBoxManage: []string{"export", "import_test", "--output", "output-import_test/import_test.ova"}
2019/02/08 17:13:35 packer: 2019/02/08 17:13:35 stdout: Successfully exported 1 machine(s).
2019/02/08 17:13:35 packer: 2019/02/08 17:13:35 stderr: 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
2019/02/08 17:13:35 packer: 2019/02/08 17:13:35 Executing VBoxManage: []string{"storageattach", "import_test", "--storagectl", "IDE Controller", "--port", "0", "--device", "1", "--medium", "none"}
==> import_test: Deregistering and deleting VM...
2019/02/08 17:13:35 packer: 2019/02/08 17:13:35 stdout:
2019/02/08 17:13:35 packer: 2019/02/08 17:13:35 stderr: VBoxManage: error: No storage device attached to device slot 1 on port 0 of controller 'IDE Controller'
2019/02/08 17:13:35 packer: VBoxManage: error: Details: code VBOX_E_OBJECT_NOT_FOUND (0x80bb0001), component SessionMachine, interface IMachine, callee nsISupports
2019/02/08 17:13:35 packer: VBoxManage: error: Context: "DetachDevice(Bstr(pszCtl).raw(), port, device)" at line 403 of file VBoxManageStorageController.cpp
2019/02/08 17:13:35 packer: 2019/02/08 17:13:35 Executing VBoxManage: []string{"unregistervm", "import_test", "--delete"}
2019/02/08 17:13:35 packer: 2019/02/08 17:13:35 stdout:
2019/02/08 17:13:35 packer: 2019/02/08 17:13:35 stderr: 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
2019/02/08 17:13:35 [INFO] (telemetry) ending virtualbox-iso
2019/02/08 17:13:35 [INFO] (telemetry) Starting post-processor amazon-import
==> import_test: Running post-processor: amazon-import
2019/02/08 17:13:35 packer: 2019/02/08 17:13:35 Rendered s3_key_name as packer-import-1549663641.ova
2019/02/08 17:13:35 packer: 2019/02/08 17:13:35 Looking for OVA in artifact
2019/02/08 17:13:35 packer: 2019/02/08 17:13:35 Opening file output-import_test/import_test.ova to upload
    import_test (amazon-import): Uploading output-import_test/import_test.ova to s3://redacted-bucket-name/packer-import-1549663641.ova
    import_test (amazon-import): Completed upload of output-import_test/import_test.ova to s3://redacted-bucket-name/packer-import-1549663641.ova
2019/02/08 17:16:20 packer: 2019/02/08 17:16:20 Calling EC2 to import from s3://redacted-bucket-name/packer-import-1549663641.ova
    import_test (amazon-import): Started import of s3://redacted-bucket-name/packer-import-1549663641.ova, task id import-ami-055e4409bc5b1d605
    import_test (amazon-import): Waiting for task import-ami-055e4409bc5b1d605 to complete (may take a while)
2019/02/08 17:16:26 packer: 2019/02/08 17:16:26 No AWS timeout and polling overrides have been set. Packer will default to waiter-specific delays and timeouts. If you would like to customize the length of time between retries and max number of retries you may do so by setting the environment variables AWS_POLL_DELAY_SECONDS and AWS_MAX_ATTEMPTS to your desired values.
    import_test (amazon-import): Import task import-ami-055e4409bc5b1d605 complete
    import_test (amazon-import): Starting rename of AMI (ami-0714d612b8a3839df)
    import_test (amazon-import): Waiting for AMI rename to complete (may take a while)
2019/02/08 17:49:58 packer: 2019/02/08 17:49:58 No AWS timeout and polling overrides have been set. Packer will default to waiter-specific delays and timeouts. If you would like to customize the length of time between retries and max number of retries you may do so by setting the environment variables AWS_POLL_DELAY_SECONDS and AWS_MAX_ATTEMPTS to your desired values.
    import_test (amazon-import): AMI rename completed
2019/02/08 17:55:19 packer: 2019/02/08 17:55:19 Adding created AMI ID ami-0f7084f20bbafef7c in region us-west-2 to output artifacts
    import_test (amazon-import): Deleting import source s3://redacted-bucket-name/packer-import-1549663641.ova
==> import_test: Running post-processor: manifest
2019/02/08 17:55:19 [INFO] (telemetry) ending amazon-import
2019/02/08 17:55:19 [INFO] (telemetry) Starting post-processor manifest
2019/02/08 17:55:19 [INFO] (telemetry) ending manifest
Build 'import_test' finished.

2019/02/08 17:55:19 Flagging to keep original artifact from post-processor 'manifest'
2019/02/08 17:55:19 Builds completed. Waiting on interrupt barrier...
==> Builds finished. The artifacts of successful builds are:
==> Builds finished. The artifacts of successful builds are:
2019/02/08 17:55:19 machine readable: import_test,artifact-count []string{"3"}
2019/02/08 17:55:19 machine readable: import_test,artifact []string{"0", "builder-id", "mitchellh.virtualbox"}
2019/02/08 17:55:20 machine readable: import_test,artifact []string{"0", "id", "VM"}
2019/02/08 17:55:20 machine readable: import_test,artifact []string{"0", "string", "VM files in directory: output-import_test"}
2019/02/08 17:55:20 machine readable: import_test,artifact []string{"0", "files-count", "1"}
2019/02/08 17:55:20 machine readable: import_test,artifact []string{"0", "file", "0", "output-import_test/import_test.ova"}
2019/02/08 17:55:20 machine readable: import_test,artifact []string{"0", "end"}
--> import_test: VM files in directory: output-import_test
2019/02/08 17:55:20 machine readable: import_test,artifact []string{"1", "builder-id", "packer.post-processor.amazon-import"}
2019/02/08 17:55:20 machine readable: import_test,artifact []string{"1", "id", "us-west-2:ami-0f7084f20bbafef7c"}
2019/02/08 17:55:20 machine readable: import_test,artifact []string{"1", "string", "AMIs were created:\nus-west-2: ami-0f7084f20bbafef7c\n"}
2019/02/08 17:55:20 machine readable: import_test,artifact []string{"1", "files-count", "0"}
2019/02/08 17:55:20 machine readable: import_test,artifact []string{"1", "end"}
--> import_test: AMIs were created:
us-west-2: ami-0f7084f20bbafef7c
us-west-2: ami-0f7084f20bbafef7c

2019/02/08 17:55:20 machine readable: import_test,artifact []string{"2", "builder-id", ""}
2019/02/08 17:55:20 machine readable: import_test,artifact []string{"2", "id", ""}
2019/02/08 17:55:20 machine readable: import_test,artifact []string{"2", "string", ""}
2019/02/08 17:55:20 machine readable: import_test,artifact []string{"2", "files-count", "0"}
2019/02/08 17:55:20 machine readable: import_test,artifact []string{"2", "end"}
--> import_test:
2019/02/08 17:55:20 [INFO] (telemetry) Finalizing.
2019/02/08 17:55:20 waiting for all plugin processes to complete...
2019/02/08 17:55:20 /usr/local/bin/packer: plugin process exited
2019/02/08 17:55:20 /usr/local/bin/packer: plugin process exited
2019/02/08 17:55:20 /usr/local/bin/packer: plugin process exited
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment