hashicorp / packer

Packer is a tool for creating identical machine images for multiple platforms from a single source configuration.
http://www.packer.io
Other
15.06k stars 3.32k forks source link

Qemu + OSX - Unable to download Kickstart file #5965

Closed vikas027 closed 5 years ago

vikas027 commented 6 years ago

Environment

OS X 10.11.2 Packer 1.2.1 Qemu 2.11.1

Installation

brew install packer
brew install qemu --with-sdl2

Problem

Unable to download the kick when using Qemu builder, Virtualbox is fine.

2018-03-03_11-12-30

Packer File

{
    "builders": [
        {
            "type": "qemu",
            "vm_name": "packer-centos7-base",
            "format": "qcow2",
            "accelerator": "none",
            "disk_size": "81920",
            "iso_url": "file:///Users/vikas/Documents/ISOs/UNIX/LINUX/64-Bit/CentOS-7-x86_64-Minimal-1708.iso",
            "iso_checksum": "5848f2fd31c7acf3811ad88eaca6f4aa",
            "iso_checksum_type": "md5",
            "http_directory": "http",
            "ssh_username": "packer",
            "ssh_password": "packer27",
            "ssh_wait_timeout": "30m",
            "shutdown_command": "echo packer27 | sudo -S /sbin/halt -h -p",
            "boot_wait": "10s",
            "boot_command": [
                "<tab> text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks_centos7.cfg<enter><wait>"
            ],
            "headless": false,
            "use_default_display": true
        }
    ]
}

Debug Log

$ PACKER_LOG=1 packer build centos7.json
2018/03/03 11:09:47 [INFO] Packer version: 1.2.1
2018/03/03 11:09:47 Packer Target OS/Arch: darwin amd64
2018/03/03 11:09:47 Built with Go Version: go1.10
2018/03/03 11:09:47 [DEBUG] Discovered plugin: vsphere-ova = /usr/local/bin/packer-post-processor-vsphere-ova
2018/03/03 11:09:47 Detected home directory from env var: /Users/vikas
2018/03/03 11:09:47 Using internal plugin for amazon-ebs
2018/03/03 11:09:47 Using internal plugin for parallels-pvm
2018/03/03 11:09:47 Using internal plugin for virtualbox-ovf
2018/03/03 11:09:47 Using internal plugin for digitalocean
2018/03/03 11:09:47 Using internal plugin for null
2018/03/03 11:09:47 Using internal plugin for vmware-iso
2018/03/03 11:09:47 Using internal plugin for oracle-oci
2018/03/03 11:09:47 Using internal plugin for triton
2018/03/03 11:09:47 Using internal plugin for amazon-chroot
2018/03/03 11:09:47 Using internal plugin for cloudstack
2018/03/03 11:09:47 Using internal plugin for docker
2018/03/03 11:09:47 Using internal plugin for lxc
2018/03/03 11:09:47 Using internal plugin for oneandone
2018/03/03 11:09:47 Using internal plugin for amazon-instance
2018/03/03 11:09:47 Using internal plugin for openstack
2018/03/03 11:09:47 Using internal plugin for parallels-iso
2018/03/03 11:09:47 Using internal plugin for virtualbox-iso
2018/03/03 11:09:47 Using internal plugin for vmware-vmx
2018/03/03 11:09:47 Using internal plugin for alicloud-ecs
2018/03/03 11:09:47 Using internal plugin for amazon-ebsvolume
2018/03/03 11:09:47 Using internal plugin for azure-arm
2018/03/03 11:09:47 Using internal plugin for googlecompute
2018/03/03 11:09:47 Using internal plugin for hyperv-iso
2018/03/03 11:09:47 Using internal plugin for hyperv-vmcx
2018/03/03 11:09:47 Using internal plugin for lxd
2018/03/03 11:09:47 Using internal plugin for oracle-classic
2018/03/03 11:09:47 Using internal plugin for profitbricks
2018/03/03 11:09:47 Using internal plugin for amazon-ebssurrogate
2018/03/03 11:09:47 Using internal plugin for file
2018/03/03 11:09:47 Using internal plugin for ncloud
2018/03/03 11:09:47 Using internal plugin for qemu
2018/03/03 11:09:47 Using internal plugin for scaleway
2018/03/03 11:09:47 Using internal plugin for file
2018/03/03 11:09:47 Using internal plugin for puppet-server
2018/03/03 11:09:47 Using internal plugin for windows-shell
2018/03/03 11:09:47 Using internal plugin for ansible
2018/03/03 11:09:47 Using internal plugin for shell-local
2018/03/03 11:09:47 Using internal plugin for ansible-local
2018/03/03 11:09:47 Using internal plugin for powershell
2018/03/03 11:09:47 Using internal plugin for puppet-masterless
2018/03/03 11:09:47 Using internal plugin for salt-masterless
2018/03/03 11:09:47 Using internal plugin for shell
2018/03/03 11:09:47 Using internal plugin for windows-restart
2018/03/03 11:09:47 Using internal plugin for chef-client
2018/03/03 11:09:47 Using internal plugin for chef-solo
2018/03/03 11:09:47 Using internal plugin for converge
2018/03/03 11:09:47 Using internal plugin for checksum
2018/03/03 11:09:47 Using internal plugin for docker-save
2018/03/03 11:09:47 Using internal plugin for googlecompute-export
2018/03/03 11:09:47 Using internal plugin for manifest
2018/03/03 11:09:47 Using internal plugin for vsphere-template
2018/03/03 11:09:47 Using internal plugin for atlas
2018/03/03 11:09:47 Using internal plugin for docker-push
2018/03/03 11:09:47 Using internal plugin for vagrant-cloud
2018/03/03 11:09:47 Using internal plugin for vsphere
2018/03/03 11:09:47 Using internal plugin for alicloud-import
2018/03/03 11:09:47 Using internal plugin for amazon-import
2018/03/03 11:09:47 Using internal plugin for compress
2018/03/03 11:09:47 Using internal plugin for docker-tag
2018/03/03 11:09:47 Using internal plugin for vagrant
2018/03/03 11:09:47 Using internal plugin for artifice
2018/03/03 11:09:47 Using internal plugin for docker-import
2018/03/03 11:09:47 Using internal plugin for shell-local
2018/03/03 11:09:47 Detected home directory from env var: /Users/vikas
2018/03/03 11:09:47 Attempting to open config file: /Users/vikas/.packerconfig
2018/03/03 11:09:47 Packer config: &{DisableCheckpoint:false DisableCheckpointSignature:false PluginMinPort:10000 PluginMaxPort:25000 Builders:map[digitalocean:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-digitalocean oracle-oci:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-oracle-oci oneandone:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-oneandone amazon-ebssurrogate:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-amazon-ebssurrogate scaleway:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-scaleway amazon-ebs:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-amazon-ebs parallels-pvm:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-parallels-pvm lxc:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-lxc openstack:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-openstack virtualbox-iso:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-virtualbox-iso hyperv-vmcx:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-hyperv-vmcx ncloud:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-ncloud triton:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-triton amazon-chroot:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-amazon-chroot lxd:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-lxd qemu:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-qemu vmware-vmx:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-vmware-vmx alicloud-ecs:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-alicloud-ecs file:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-file amazon-instance:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-amazon-instance docker:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-docker amazon-ebsvolume:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-amazon-ebsvolume azure-arm:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-azure-arm profitbricks:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-profitbricks vmware-iso:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-vmware-iso cloudstack:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-cloudstack hyperv-iso:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-hyperv-iso oracle-classic:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-oracle-classic virtualbox-ovf:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-virtualbox-ovf null:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-null parallels-iso:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-parallels-iso googlecompute:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-googlecompute] PostProcessors:map[alicloud-import:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-alicloud-import docker-tag:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-docker-tag shell-local:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-shell-local checksum:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-checksum docker-save:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-docker-save manifest:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-manifest vsphere-template:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-vsphere-template vagrant-cloud:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-vagrant-cloud atlas:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-atlas docker-push:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-docker-push compress:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-compress artifice:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-artifice vsphere-ova:packer-post-processor-vsphere-ova vsphere:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-vsphere googlecompute-export:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-googlecompute-export amazon-import:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-amazon-import vagrant:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-vagrant docker-import:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-docker-import] Provisioners:map[chef-client:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-chef-client windows-shell:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-windows-shell puppet-masterless:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-puppet-masterless salt-masterless:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-salt-masterless windows-restart:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-windows-restart chef-solo:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-chef-solo shell-local:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-shell-local powershell:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-powershell converge:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-converge file:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-file puppet-server:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-puppet-server ansible:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-ansible ansible-local:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-ansible-local shell:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-shell]}
2018/03/03 11:09:47 Detected home directory from env var: /Users/vikas
2018/03/03 11:09:47 Setting cache directory: /MY_STUFF/SourceTree/aws-custom-ami/packer_cache
2018/03/03 11:09:47 Detected home directory from env var: /Users/vikas
2018/03/03 11:09:47 Loading builder: qemu
2018/03/03 11:09:47 Plugin could not be found. Checking same directory as executable.
2018/03/03 11:09:47 Current exe path: /usr/local/bin/packer
2018/03/03 11:09:47 Creating plugin client for path: /usr/local/bin/packer
2018/03/03 11:09:47 Starting plugin: /usr/local/bin/packer []string{"/usr/local/bin/packer", "plugin", "packer-builder-qemu"}
2018/03/03 11:09:47 Waiting for RPC address for: /usr/local/bin/packer
2018/03/03 11:09:47 packer: 2018/03/03 11:09:47 [INFO] Packer version: 1.2.1
2018/03/03 11:09:47 packer: 2018/03/03 11:09:47 Packer Target OS/Arch: darwin amd64
2018/03/03 11:09:47 packer: 2018/03/03 11:09:47 Built with Go Version: go1.10
2018/03/03 11:09:47 packer: 2018/03/03 11:09:47 Detected home directory from env var: /Users/vikas
2018/03/03 11:09:47 packer: 2018/03/03 11:09:47 Attempting to open config file: /Users/vikas/.packerconfig
2018/03/03 11:09:47 packer: 2018/03/03 11:09:47 Packer config: &{DisableCheckpoint:false DisableCheckpointSignature:false PluginMinPort:10000 PluginMaxPort:25000 Builders:map[] PostProcessors:map[vsphere-ova:packer-post-processor-vsphere-ova] Provisioners:map[]}
2018/03/03 11:09:47 packer: 2018/03/03 11:09:47 Detected home directory from env var: /Users/vikas
2018/03/03 11:09:47 packer: 2018/03/03 11:09:47 Setting cache directory: /MY_STUFF/SourceTree/aws-custom-ami/packer_cache
2018/03/03 11:09:47 packer: 2018/03/03 11:09:47 args: []string{"packer-builder-qemu"}
2018/03/03 11:09:47 packer: 2018/03/03 11:09:47 Plugin minimum port: 10000
2018/03/03 11:09:47 packer: 2018/03/03 11:09:47 Plugin maximum port: 25000
2018/03/03 11:09:47 packer: 2018/03/03 11:09:47 Detected home directory from env var: /Users/vikas
2018/03/03 11:09:47 packer: 2018/03/03 11:09:47 Plugin address: unix /var/folders/qw/5nbqbmj97hsfz3z5lkwqk9lr0000gn/T/packer-plugin533436491
2018/03/03 11:09:47 packer: 2018/03/03 11:09:47 Waiting for connection...
2018/03/03 11:09:47 packer: 2018/03/03 11:09:47 Serving a plugin connection...
2018/03/03 11:09:47 Loading provisioner: shell
2018/03/03 11:09:47 Plugin could not be found. Checking same directory as executable.
2018/03/03 11:09:47 Current exe path: /usr/local/bin/packer
2018/03/03 11:09:47 Creating plugin client for path: /usr/local/bin/packer
2018/03/03 11:09:47 Starting plugin: /usr/local/bin/packer []string{"/usr/local/bin/packer", "plugin", "packer-provisioner-shell"}
2018/03/03 11:09:47 Waiting for RPC address for: /usr/local/bin/packer
2018/03/03 11:09:47 packer: 2018/03/03 11:09:47 [INFO] Packer version: 1.2.1
2018/03/03 11:09:47 packer: 2018/03/03 11:09:47 Packer Target OS/Arch: darwin amd64
2018/03/03 11:09:47 packer: 2018/03/03 11:09:47 Built with Go Version: go1.10
2018/03/03 11:09:47 packer: 2018/03/03 11:09:47 Detected home directory from env var: /Users/vikas
2018/03/03 11:09:47 packer: 2018/03/03 11:09:47 Attempting to open config file: /Users/vikas/.packerconfig
2018/03/03 11:09:47 packer: 2018/03/03 11:09:47 Packer config: &{DisableCheckpoint:false DisableCheckpointSignature:false PluginMinPort:10000 PluginMaxPort:25000 Builders:map[] PostProcessors:map[vsphere-ova:packer-post-processor-vsphere-ova] Provisioners:map[]}
2018/03/03 11:09:47 packer: 2018/03/03 11:09:47 Detected home directory from env var: /Users/vikas
2018/03/03 11:09:47 packer: 2018/03/03 11:09:47 Setting cache directory: /MY_STUFF/SourceTree/aws-custom-ami/packer_cache
2018/03/03 11:09:47 packer: 2018/03/03 11:09:47 args: []string{"packer-provisioner-shell"}
2018/03/03 11:09:47 packer: 2018/03/03 11:09:47 Detected home directory from env var: /Users/vikas
2018/03/03 11:09:47 packer: 2018/03/03 11:09:47 Plugin minimum port: 10000
2018/03/03 11:09:47 packer: 2018/03/03 11:09:47 Plugin maximum port: 25000
2018/03/03 11:09:47 packer: 2018/03/03 11:09:47 Plugin address: unix /var/folders/qw/5nbqbmj97hsfz3z5lkwqk9lr0000gn/T/packer-plugin541968341
2018/03/03 11:09:47 packer: 2018/03/03 11:09:47 Waiting for connection...
2018/03/03 11:09:47 packer: 2018/03/03 11:09:47 Serving a plugin connection...
2018/03/03 11:09:47 ui: qemu output will be in this color.
2018/03/03 11:09:47 ui:
2018/03/03 11:09:47 Build debug mode: false
2018/03/03 11:09:47 Force build: false
2018/03/03 11:09:47 On error:
2018/03/03 11:09:47 Preparing build: qemu
qemu output will be in this color.

2018/03/03 11:09:47 packer: 2018/03/03 11:09:47 use specified accelerator: none
2018/03/03 11:09:47 Waiting on builds to complete...
2018/03/03 11:09:47 Starting build run: qemu
2018/03/03 11:09:47 Running builder: qemu
2018/03/03 11:09:47 [INFO] (telemetry) Starting builder qemu
2018/03/03 11:09:47 packer: 2018/03/03 11:09:47 Qemu path: /usr/local/bin/qemu-system-x86_64, Qemu Image page: /usr/local/bin/qemu-img
2018/03/03 11:09:47 ui: ==> qemu: Downloading or copying ISO
==> qemu: Downloading or copying ISO
2018/03/03 11:09:47 packer: 2018/03/03 11:09:47 Acquiring lock to download: file:///Users/vikas/Documents/ISOs/UNIX/LINUX/64-Bit/CentOS-7-x86_64-Minimal-1708.iso
2018/03/03 11:09:47 ui:     qemu: Downloading or copying: file:///Users/vikas/Documents/ISOs/UNIX/LINUX/64-Bit/CentOS-7-x86_64-Minimal-1708.iso
2018/03/03 11:09:47 packer: 2018/03/03 11:09:47 Parsed URL: &url.URL{Scheme:"file", Opaque:"", User:(*url.Userinfo)(nil), Host:"", Path:"/Users/vikas/Documents/ISOs/UNIX/LINUX/64-Bit/CentOS-7-x86_64-Minimal-1708.iso", RawPath:"", ForceQuery:false, RawQuery:"", Fragment:""}
2018/03/03 11:09:47 packer: 2018/03/03 11:09:47 [DEBUG] Using local file: /Users/vikas/Documents/ISOs/UNIX/LINUX/64-Bit/CentOS-7-x86_64-Minimal-1708.iso
    qemu: Downloading or copying: file:///Users/vikas/Documents/ISOs/UNIX/LINUX/64-Bit/CentOS-7-x86_64-Minimal-1708.iso
2018/03/03 11:09:47 packer: 2018/03/03 11:09:47 Verifying checksum of /Users/vikas/Documents/ISOs/UNIX/LINUX/64-Bit/CentOS-7-x86_64-Minimal-1708.iso
2018/03/03 11:09:48 packer: 2018/03/03 11:09:48 No floppy files specified. Floppy disk will not be made.
2018/03/03 11:09:48 ui: ==> qemu: Creating hard drive...
==> qemu: Creating hard drive...
2018/03/03 11:09:48 packer: 2018/03/03 11:09:48 Executing qemu-img: []string{"create", "-f", "qcow2", "output-qemu/packer-centos7-base", "81920M"}
2018/03/03 11:09:48 packer: 2018/03/03 11:09:48 stdout: Formatting 'output-qemu/packer-centos7-base', fmt=qcow2 size=85899345920 cluster_size=65536 lazy_refcounts=off refcount_bits=16
2018/03/03 11:09:48 packer: 2018/03/03 11:09:48 stderr:
2018/03/03 11:09:48 packer: 2018/03/03 11:09:48 Trying port: 8715
2018/03/03 11:09:48 ui: ==> qemu: Starting HTTP server on port 8715
==> qemu: Starting HTTP server on port 8715
2018/03/03 11:09:48 packer: 2018/03/03 11:09:48 Looking for available communicator (SSH, WinRM, etc) port between 2222 and 4444
2018/03/03 11:09:48 packer: 2018/03/03 11:09:48 Trying port: 3728
2018/03/03 11:09:48 ui: ==> qemu: Found port for communicator (SSH, WinRM, etc): 3728.
==> qemu: Found port for communicator (SSH, WinRM, etc): 3728.
2018/03/03 11:09:48 ui: ==> qemu: Looking for available port between 5900 and 6000 on 127.0.0.1
2018/03/03 11:09:48 packer: 2018/03/03 11:09:48 Looking for available port between 5900 and 6000 on 127.0.0.1
2018/03/03 11:09:48 packer: 2018/03/03 11:09:48 Trying port: 5949
==> qemu: Looking for available port between 5900 and 6000 on 127.0.0.1
2018/03/03 11:09:48 packer: 2018/03/03 11:09:48 Found available VNC port: 5949 on IP: 127.0.0.1
2018/03/03 11:09:48 ui: ==> qemu: Starting VM, booting from CD-ROM
==> qemu: Starting VM, booting from CD-ROM
2018/03/03 11:09:48 packer: 2018/03/03 11:09:48 Qemu --version output: QEMU emulator version 2.11.1
2018/03/03 11:09:48 packer: Copyright (c) 2003-2017 Fabrice Bellard and the QEMU Project developers
2018/03/03 11:09:48 packer: 2018/03/03 11:09:48 Qemu version: 2.11.1
2018/03/03 11:09:48 ui:     qemu: WARNING: The VM will be started with no hardware acceleration.
    qemu: The installation may take considerably longer to finish.
    qemu:
    qemu: WARNING: The VM will be started with no hardware acceleration.
2018/03/03 11:09:48 packer: 2018/03/03 11:09:48 Qemu Builder has no floppy files, not attaching a floppy.
2018/03/03 11:09:48 packer: 2018/03/03 11:09:48 Executing /usr/local/bin/qemu-system-x86_64: []string{"-netdev", "user,id=user.0,hostfwd=tcp::3728-:22", "-device", "virtio-net,netdev=user.0", "-m","512M", "-machine", "type=pc", "-cdrom", "/Users/vikas/Documents/ISOs/UNIX/LINUX/64-Bit/CentOS-7-x86_64-Minimal-1708.iso", "-vnc", "127.0.0.1:49", "-drive", "file=output-qemu/packer-centos7-base,if=virtio,cache=writeback,discard=ignore,format=qcow2", "-boot", "once=d", "-name", "packer-centos7-base"}
    qemu: The installation may take considerably longer to finish.
    qemu:
2018/03/03 11:09:48 packer: 2018/03/03 11:09:48 Started Qemu. Pid: 89322
2018/03/03 11:09:50 ui: ==> qemu: Waiting 10s for boot...
==> qemu: Waiting 10s for boot...
2018/03/03 11:10:00 ui: ==> qemu: Connecting to VM via VNC
==> qemu: Connecting to VM via VNC
2018/03/03 11:10:00 packer: 2018/03/03 11:10:00 Connected to VNC desktop: QEMU (packer-centos7-base)
2018/03/03 11:10:00 ui: ==> qemu: Typing the boot command over VNC...
==> qemu: Typing the boot command over VNC...
2018/03/03 11:10:00 packer: 2018/03/03 11:10:00 Special code '<tab>' found, replacing with: 65289
2018/03/03 11:10:01 packer: 2018/03/03 11:10:01 Sending char ' ', code 32, shift false
2018/03/03 11:10:01 packer: 2018/03/03 11:10:01 Sending char 't', code 116, shift false
2018/03/03 11:10:01 packer: 2018/03/03 11:10:01 Sending char 'e', code 101, shift false
2018/03/03 11:10:01 packer: 2018/03/03 11:10:01 Sending char 'x', code 120, shift false
2018/03/03 11:10:02 packer: 2018/03/03 11:10:02 Sending char 't', code 116, shift false
2018/03/03 11:10:02 packer: 2018/03/03 11:10:02 Sending char ' ', code 32, shift false
2018/03/03 11:10:02 packer: 2018/03/03 11:10:02 Sending char 'k', code 107, shift false
2018/03/03 11:10:03 packer: 2018/03/03 11:10:03 Sending char 's', code 115, shift false
2018/03/03 11:10:03 packer: 2018/03/03 11:10:03 Sending char '=', code 61, shift false
2018/03/03 11:10:03 packer: 2018/03/03 11:10:03 Sending char 'h', code 104, shift false
2018/03/03 11:10:04 packer: 2018/03/03 11:10:04 Sending char 't', code 116, shift false
2018/03/03 11:10:04 packer: 2018/03/03 11:10:04 Sending char 't', code 116, shift false
2018/03/03 11:10:04 packer: 2018/03/03 11:10:04 Sending char 'p', code 112, shift false
2018/03/03 11:10:05 packer: 2018/03/03 11:10:05 Sending char ':', code 58, shift true
2018/03/03 11:10:05 packer: 2018/03/03 11:10:05 Sending char '/', code 47, shift false
2018/03/03 11:10:05 packer: 2018/03/03 11:10:05 Sending char '/', code 47, shift false
2018/03/03 11:10:05 packer: 2018/03/03 11:10:05 Sending char '1', code 49, shift false
2018/03/03 11:10:06 packer: 2018/03/03 11:10:06 Sending char '0', code 48, shift false
2018/03/03 11:10:06 packer: 2018/03/03 11:10:06 Sending char '.', code 46, shift false
2018/03/03 11:10:06 packer: 2018/03/03 11:10:06 Sending char '0', code 48, shift false
2018/03/03 11:10:07 packer: 2018/03/03 11:10:07 Sending char '.', code 46, shift false
2018/03/03 11:10:07 packer: 2018/03/03 11:10:07 Sending char '2', code 50, shift false
2018/03/03 11:10:07 packer: 2018/03/03 11:10:07 Sending char '.', code 46, shift false
2018/03/03 11:10:08 packer: 2018/03/03 11:10:08 Sending char '2', code 50, shift false
2018/03/03 11:10:08 packer: 2018/03/03 11:10:08 Sending char ':', code 58, shift true
2018/03/03 11:10:08 packer: 2018/03/03 11:10:08 Sending char '8', code 56, shift false
2018/03/03 11:10:09 packer: 2018/03/03 11:10:09 Sending char '7', code 55, shift false
2018/03/03 11:10:09 packer: 2018/03/03 11:10:09 Sending char '1', code 49, shift false
2018/03/03 11:10:09 packer: 2018/03/03 11:10:09 Sending char '5', code 53, shift false
2018/03/03 11:10:09 packer: 2018/03/03 11:10:09 Sending char '/', code 47, shift false
2018/03/03 11:10:10 packer: 2018/03/03 11:10:10 Sending char 'k', code 107, shift false
2018/03/03 11:10:10 packer: 2018/03/03 11:10:10 Sending char 's', code 115, shift false
2018/03/03 11:10:10 packer: 2018/03/03 11:10:10 Sending char '_', code 95, shift true
2018/03/03 11:10:11 packer: 2018/03/03 11:10:11 Sending char 'c', code 99, shift false
2018/03/03 11:10:11 packer: 2018/03/03 11:10:11 Sending char 'e', code 101, shift false
2018/03/03 11:10:11 packer: 2018/03/03 11:10:11 Sending char 'n', code 110, shift false
2018/03/03 11:10:12 packer: 2018/03/03 11:10:12 Sending char 't', code 116, shift false
2018/03/03 11:10:12 packer: 2018/03/03 11:10:12 Sending char 'o', code 111, shift false
2018/03/03 11:10:12 packer: 2018/03/03 11:10:12 Sending char 's', code 115, shift false
2018/03/03 11:10:13 packer: 2018/03/03 11:10:13 Sending char '7', code 55, shift false
2018/03/03 11:10:13 packer: 2018/03/03 11:10:13 Sending char '.', code 46, shift false
2018/03/03 11:10:13 packer: 2018/03/03 11:10:13 Sending char 'c', code 99, shift false
2018/03/03 11:10:13 packer: 2018/03/03 11:10:13 Sending char 'f', code 102, shift false
2018/03/03 11:10:14 packer: 2018/03/03 11:10:14 Sending char 'g', code 103, shift false
2018/03/03 11:10:14 packer: 2018/03/03 11:10:14 Special code '<enter>' found, replacing with: 65293
2018/03/03 11:10:14 packer: 2018/03/03 11:10:14 Special code '<wait>' found, sleeping one second
2018/03/03 11:10:15 packer: 2018/03/03 11:10:15 [INFO] Waiting for SSH, up to timeout: 30m0s
2018/03/03 11:10:15 ui: ==> qemu: Waiting for SSH to become available...
==> qemu: Waiting for SSH to become available...
2018/03/03 11:10:15 packer: 2018/03/03 11:10:15 [INFO] Attempting SSH connection...
2018/03/03 11:10:15 packer: 2018/03/03 11:10:15 reconnecting to TCP connection for SSH
2018/03/03 11:10:15 packer: 2018/03/03 11:10:15 handshaking with SSH
2018/03/03 11:11:10 packer: 2018/03/03 11:11:10 handshake error: ssh: handshake failed: EOF
2018/03/03 11:11:10 packer: 2018/03/03 11:11:10 [DEBUG] SSH handshake err: ssh: handshake failed: EOF
2018/03/03 11:11:17 packer: 2018/03/03 11:11:17 [INFO] Attempting SSH connection...
2018/03/03 11:11:17 packer: 2018/03/03 11:11:17 reconnecting to TCP connection for SSH
SwampDragons commented 6 years ago

Do you think you'd be able to try adding the kickstart file as a floppy file so you don't have to download it?

vikas027 commented 6 years ago

Hey @SwampDragons ,

Sorry, I have not got time to test this out, will do that sometime soon. Another possible solution could be to tweak the ISO and place the kickstart file inside it.

trodemaster commented 6 years ago

I build centos 7 with qemu all the time with nearly identical http setup for kickstart. Make sure the kickstart file is at http/ks_centos7.cfg relative to the directory you run packer. Another thing that can happen is if the IP assigned to the centos 7 vm is routable for your system it will try connect to an external host. Configuring qemu to use a truly private ip range can help.

SwampDragons commented 5 years ago

Closing because it looks like this may be more of a configuration question than a bug, and we never got a response after May.

ghost commented 4 years ago

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.