Packer SSH Handshake fails!

123 views
Skip to first unread message

Tim Bücher

unread,
Jan 7, 2019, 7:43:55 AM1/7/19
to Packer
Hi all,

I have the following issue: Running on a physical host, I want to build a CentOS 7 Machine with QEMU/KVM. I'm using packer 1.3.3 and CentOS 7.6.1810 Netinstall Image.

My config file is as following:

centos7.json

{
"variables": {
"rootpw":""
},
"builders":
[
{
"type": "qemu",
"accelerator": "kvm",
"headless": true,
"qemuargs": [
[ "-m", "2048M" ],
[ "-smp", "cpus=1,maxcpus=16,cores=4" ]
],
"disk_interface": "virtio",
"disk_size": 10000,
"format": "qcow2",
"net_device": "virtio-net",
"iso_url": "./CentOS-7-x86_64-NetInstall-1810.iso",
"iso_checksum": "d74ea11d73e7183fbbd8dcdc4f1a74a5",
"iso_checksum_type": "md5",
"vm_name": "centos7-base",
"output_directory": "centos7-base-img",
"http_directory": "docroot",
"http_port_min": 10082,
"http_port_max": 10089,
"ssh_host_port_min": 2222,
"ssh_host_port_max": 2229,
"ssh_username": "root",
"ssh_password": "{{ user `rootpw` }}",
"ssh_port": 22,
"ssh_wait_timeout": "1200s",
"boot_wait": "40s",
"boot_command": [
"<up><wait><tab><wait> text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/centos7-ks.cfg<enter><wait>"
],

"shutdown_command": "shutdown -P now"
}
],
"provisioners":
[
{
"type": "file",
"source": "my-pulp7.repo",
"destination": "/etc/yum.repos.d/my-pulp.repo"
},
{
"type": "file",
"source": "ntp.conf",
"destination": "/etc/ntp.conf"
},
{
"type": "shell",
"pause_before": "5s",
"inline": [
"yum-config-manager --disable base",
"yum-config-manager --disable updates",
"yum-config-manager --disable extras",
"yum clean all",
"yum update -y",
"yum install -y htop net-tools bind-utils ksh my-one-context7 sysstat zip vim-enhanced vim-filesystem vim-common unzip haveged",
"mkdir -p /root/.ssh; chmod 700 /root/.ssh",
"echo 'ssh-dss dontyoudarelookingatmykeybecausethisisjustanexample.id_dsa' > /root/.ssh/authorized_keys",
"chmod 600 /root/.ssh/authorized_keys",
"echo 'relayhost = [mail.my.com]' >> /etc/postfix/main.cf",
"systemctl enable ntpd",
"timedatectl set-timezone Europe/Berlin"
]
}
]
}

Log output:
PACKER_LOG=1 ./packer build -var-file=secrets.json centos7.json >> log 2019/01/07 13:35:45 [INFO] Packer version: 1.3.3 2019/01/07 13:35:45 Packer Target OS/Arch: linux amd64 2019/01/07 13:35:45 Built with Go Version: go1.11.2 2019/01/07 13:35:45 Detected home directory from env var: /home/packer 2019/01/07 13:35:45 Using internal plugin for alicloud-ecs 2019/01/07 13:35:45 Using internal plugin for amazon-chroot 2019/01/07 13:35:45 Using internal plugin for hyperv-vmcx 2019/01/07 13:35:45 Using internal plugin for ncloud 2019/01/07 13:35:45 Using internal plugin for openstack 2019/01/07 13:35:45 Using internal plugin for oracle-oci 2019/01/07 13:35:45 Using internal plugin for parallels-pvm 2019/01/07 13:35:45 Using internal plugin for triton 2019/01/07 13:35:45 Using internal plugin for vmware-iso 2019/01/07 13:35:45 Using internal plugin for file 2019/01/07 13:35:45 Using internal plugin for hcloud 2019/01/07 13:35:45 Using internal plugin for hyperv-iso 2019/01/07 13:35:45 Using internal plugin for lxd 2019/01/07 13:35:45 Using internal plugin for oneandone 2019/01/07 13:35:45 Using internal plugin for amazon-instance 2019/01/07 13:35:45 Using internal plugin for azure-arm 2019/01/07 13:35:45 Using internal plugin for googlecompute 2019/01/07 13:35:45 Using internal plugin for oracle-classic 2019/01/07 13:35:45 Using internal plugin for virtualbox-iso 2019/01/07 13:35:45 Using internal plugin for lxc 2019/01/07 13:35:45 Using internal plugin for null 2019/01/07 13:35:45 Using internal plugin for parallels-iso 2019/01/07 13:35:45 Using internal plugin for profitbricks 2019/01/07 13:35:45 Using internal plugin for scaleway 2019/01/07 13:35:45 Using internal plugin for amazon-ebssurrogate 2019/01/07 13:35:45 Using internal plugin for cloudstack 2019/01/07 13:35:45 Using internal plugin for docker 2019/01/07 13:35:45 Using internal plugin for amazon-ebsvolume 2019/01/07 13:35:45 Using internal plugin for amazon-ebs 2019/01/07 13:35:45 Using internal plugin for digitalocean 2019/01/07 13:35:45 Using internal plugin for qemu 2019/01/07 13:35:45 Using internal plugin for virtualbox-ovf 2019/01/07 13:35:45 Using internal plugin for vmware-vmx 2019/01/07 13:35:45 Using internal plugin for chef-client 2019/01/07 13:35:45 Using internal plugin for chef-solo 2019/01/07 13:35:45 Using internal plugin for salt-masterless 2019/01/07 13:35:45 Using internal plugin for shell 2019/01/07 13:35:45 Using internal plugin for shell-local 2019/01/07 13:35:45 Using internal plugin for ansible 2019/01/07 13:35:45 Using internal plugin for ansible-local 2019/01/07 13:35:45 Using internal plugin for puppet-masterless 2019/01/07 13:35:45 Using internal plugin for windows-restart 2019/01/07 13:35:45 Using internal plugin for puppet-server 2019/01/07 13:35:45 Using internal plugin for windows-shell 2019/01/07 13:35:45 Using internal plugin for converge 2019/01/07 13:35:45 Using internal plugin for file 2019/01/07 13:35:45 Using internal plugin for breakpoint 2019/01/07 13:35:45 Using internal plugin for powershell 2019/01/07 13:35:45 Using internal plugin for alicloud-import 2019/01/07 13:35:45 Using internal plugin for docker-tag 2019/01/07 13:35:45 Using internal plugin for googlecompute-export 2019/01/07 13:35:45 Using internal plugin for docker-import 2019/01/07 13:35:45 Using internal plugin for googlecompute-import 2019/01/07 13:35:45 Using internal plugin for vsphere-template 2019/01/07 13:35:45 Using internal plugin for vsphere 2019/01/07 13:35:45 Using internal plugin for checksum 2019/01/07 13:35:45 Using internal plugin for compress 2019/01/07 13:35:45 Using internal plugin for docker-save 2019/01/07 13:35:45 Using internal plugin for shell-local 2019/01/07 13:35:45 Using internal plugin for vagrant 2019/01/07 13:35:45 Using internal plugin for vagrant-cloud 2019/01/07 13:35:45 Using internal plugin for amazon-import 2019/01/07 13:35:45 Using internal plugin for artifice 2019/01/07 13:35:45 Using internal plugin for docker-push 2019/01/07 13:35:45 Using internal plugin for manifest 2019/01/07 13:35:45 Detected home directory from env var: /home/packer 2019/01/07 13:35:45 Attempting to open config file: /home/packer/.packerconfig 2019/01/07 13:35:45 [WARN] Config file doesn't exist: /home/packer/.packerconfig 2019/01/07 13:35:45 Packer config: &{DisableCheckpoint:false DisableCheckpointSignature:false PluginMinPort:10000 PluginMaxPort:25000 Builders:map[amazon-instance:/home/packer/packer-centos-images/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-amazon-instance profitbricks:/home/packer/packer-centos-images/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-profitbricks lxd:/home/packer/packer-centos-images/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-lxd oneandone:/home/packer/packer-centos-images/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-oneandone oracle-classic:/home/packer/packer-centos-images/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-oracle-classic virtualbox-ovf:/home/packer/packer-centos-images/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-virtualbox-ovf parallels-pvm:/home/packer/packer-centos-images/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-parallels-pvm file:/home/packer/packer-centos-images/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-file googlecompute:/home/packer/packer-centos-images/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-googlecompute parallels-iso:/home/packer/packer-centos-images/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-parallels-iso amazon-ebssurrogate:/home/packer/packer-centos-images/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-amazon-ebssurrogate ncloud:/home/packer/packer-centos-images/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-ncloud openstack:/home/packer/packer-centos-images/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-openstack amazon-ebs:/home/packer/packer-centos-images/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-amazon-ebs lxc:/home/packer/packer-centos-images/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-lxc amazon-ebsvolume:/home/packer/packer-centos-images/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-amazon-ebsvolume virtualbox-iso:/home/packer/packer-centos-images/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-virtualbox-iso qemu:/home/packer/packer-centos-images/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-qemu triton:/home/packer/packer-centos-images/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-triton hcloud:/home/packer/packer-centos-images/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-hcloud hyperv-iso:/home/packer/packer-centos-images/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-hyperv-iso vmware-vmx:/home/packer/packer-centos-images/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-vmware-vmx amazon-chroot:/home/packer/packer-centos-images/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-amazon-chroot vmware-iso:/home/packer/packer-centos-images/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-vmware-iso docker:/home/packer/packer-centos-images/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-docker digitalocean:/home/packer/packer-centos-images/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-digitalocean alicloud-ecs:/home/packer/packer-centos-images/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-alicloud-ecs cloudstack:/home/packer/packer-centos-images/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-cloudstack azure-arm:/home/packer/packer-centos-images/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-azure-arm null:/home/packer/packer-centos-images/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-null scaleway:/home/packer/packer-centos-images/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-scaleway hyperv-vmcx:/home/packer/packer-centos-images/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-hyperv-vmcx oracle-oci:/home/packer/packer-centos-images/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-oracle-oci] PostProcessors:map[docker-tag:/home/packer/packer-centos-images/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-docker-tag googlecompute-export:/home/packer/packer-centos-images/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-googlecompute-export vsphere-template:/home/packer/packer-centos-images/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-vsphere-template shell-local:/home/packer/packer-centos-images/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-shell-local alicloud-import:/home/packer/packer-centos-images/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-alicloud-import vagrant:/home/packer/packer-centos-images/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-vagrant docker-push:/home/packer/packer-centos-images/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-docker-push googlecompute-import:/home/packer/packer-centos-images/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-googlecompute-import vsphere:/home/packer/packer-centos-images/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-vsphere docker-save:/home/packer/packer-centos-images/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-docker-save vagrant-cloud:/home/packer/packer-centos-images/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-vagrant-cloud artifice:/home/packer/packer-centos-images/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-artifice docker-import:/home/packer/packer-centos-images/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-docker-import checksum:/home/packer/packer-centos-images/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-checksum compress:/home/packer/packer-centos-images/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-compress amazon-import:/home/packer/packer-centos-images/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-amazon-import manifest:/home/packer/packer-centos-images/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-manifest] Provisioners:map[shell-local:/home/packer/packer-centos-images/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-shell-local windows-shell:/home/packer/packer-centos-images/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-windows-shell shell:/home/packer/packer-centos-images/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-shell ansible-local:/home/packer/packer-centos-images/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-ansible-local puppet-masterless:/home/packer/packer-centos-images/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-puppet-masterless powershell:/home/packer/packer-centos-images/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-powershell ansible:/home/packer/packer-centos-images/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-ansible windows-restart:/home/packer/packer-centos-images/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-windows-restart puppet-server:/home/packer/packer-centos-images/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-puppet-server converge:/home/packer/packer-centos-images/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-converge file:/home/packer/packer-centos-images/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-file breakpoint:/home/packer/packer-centos-images/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-breakpoint chef-client:/home/packer/packer-centos-images/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-chef-client chef-solo:/home/packer/packer-centos-images/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-chef-solo salt-masterless:/home/packer/packer-centos-images/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-salt-masterless]} 2019/01/07 13:35:45 Detected home directory from env var: /home/packer 2019/01/07 13:35:45 Setting cache directory: /home/packer/packer-centos-images/packer_cache 2019/01/07 13:35:45 Detected home directory from env var: /home/packer 2019/01/07 13:35:45 Loading builder: qemu 2019/01/07 13:35:45 Plugin could not be found. Checking same directory as executable. 2019/01/07 13:35:45 Current exe path: /home/packer/packer-centos-images/packer 2019/01/07 13:35:45 Creating plugin client for path: /home/packer/packer-centos-images/packer 2019/01/07 13:35:45 Starting plugin: /home/packer/packer-centos-images/packer []string{"/home/packer/packer-centos-images/packer", "plugin", "packer-builder-qemu"} 2019/01/07 13:35:45 Waiting for RPC address for: /home/packer/packer-centos-images/packer 2019/01/07 13:35:45 [ERR] Checkpoint error: Get https://checkpoint-api.hashicorp.com/v1/check/packer?arch=amd64&os=linux&signature=62366ffc-0b51-a28d-12ce-58841a784e90&version=1.3.3: dial tcp 23.23.145.13:443: connect: connection refused 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 [INFO] Packer version: 1.3.3 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 Packer Target OS/Arch: linux amd64 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 Built with Go Version: go1.11.2 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 Detected home directory from env var: /home/packer 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 Attempting to open config file: /home/packer/.packerconfig 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 [WARN] Config file doesn't exist: /home/packer/.packerconfig 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 Packer config: &{DisableCheckpoint:false DisableCheckpointSignature:false PluginMinPort:10000 PluginMaxPort:25000 Builders:map[] PostProcessors:map[] Provisioners:map[]} 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 Detected home directory from env var: /home/packer 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 Setting cache directory: /home/packer/packer-centos-images/packer_cache 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 Detected home directory from env var: /home/packer 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 args: []string{"packer-builder-qemu"} 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 Plugin minimum port: 10000 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 Plugin maximum port: 25000 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 Plugin address: unix /tmp/packer-plugin011576475 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 Waiting for connection... 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 Serving a plugin connection... 2019/01/07 13:35:45 Loading provisioner: file 2019/01/07 13:35:45 Plugin could not be found. Checking same directory as executable. 2019/01/07 13:35:45 Current exe path: /home/packer/packer-centos-images/packer 2019/01/07 13:35:45 Creating plugin client for path: /home/packer/packer-centos-images/packer 2019/01/07 13:35:45 Starting plugin: /home/packer/packer-centos-images/packer []string{"/home/packer/packer-centos-images/packer", "plugin", "packer-provisioner-file"} 2019/01/07 13:35:45 Waiting for RPC address for: /home/packer/packer-centos-images/packer 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 [ERR] Checkpoint error: Get https://checkpoint-api.hashicorp.com/v1/check/packer?arch=amd64&os=linux&signature=62366ffc-0b51-a28d-12ce-58841a784e90&version=1.3.3: dial tcp 54.243.195.169:443: connect: connection refused 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 [INFO] Packer version: 1.3.3 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 Packer Target OS/Arch: linux amd64 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 Built with Go Version: go1.11.2 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 Detected home directory from env var: /home/packer 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 Attempting to open config file: /home/packer/.packerconfig 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 [WARN] Config file doesn't exist: /home/packer/.packerconfig 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 Packer config: &{DisableCheckpoint:false DisableCheckpointSignature:false PluginMinPort:10000 PluginMaxPort:25000 Builders:map[] PostProcessors:map[] Provisioners:map[]} 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 Detected home directory from env var: /home/packer 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 Setting cache directory: /home/packer/packer-centos-images/packer_cache 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 args: []string{"packer-provisioner-file"} 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 Plugin minimum port: 10000 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 Plugin maximum port: 25000 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 Detected home directory from env var: /home/packer 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 Plugin address: unix /tmp/packer-plugin316907116 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 Waiting for connection... 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 Serving a plugin connection... 2019/01/07 13:35:45 Loading provisioner: file 2019/01/07 13:35:45 Plugin could not be found. Checking same directory as executable. 2019/01/07 13:35:45 Current exe path: /home/packer/packer-centos-images/packer 2019/01/07 13:35:45 Creating plugin client for path: /home/packer/packer-centos-images/packer 2019/01/07 13:35:45 Starting plugin: /home/packer/packer-centos-images/packer []string{"/home/packer/packer-centos-images/packer", "plugin", "packer-provisioner-file"} 2019/01/07 13:35:45 Waiting for RPC address for: /home/packer/packer-centos-images/packer 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 [ERR] Checkpoint error: Get https://checkpoint-api.hashicorp.com/v1/check/packer?arch=amd64&os=linux&signature=62366ffc-0b51-a28d-12ce-58841a784e90&version=1.3.3: dial tcp 54.243.195.169:443: connect: connection refused 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 [INFO] Packer version: 1.3.3 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 Packer Target OS/Arch: linux amd64 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 Built with Go Version: go1.11.2 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 Detected home directory from env var: /home/packer 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 Attempting to open config file: /home/packer/.packerconfig 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 [WARN] Config file doesn't exist: /home/packer/.packerconfig 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 Packer config: &{DisableCheckpoint:false DisableCheckpointSignature:false PluginMinPort:10000 PluginMaxPort:25000 Builders:map[] PostProcessors:map[] Provisioners:map[]} 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 Detected home directory from env var: /home/packer 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 Setting cache directory: /home/packer/packer-centos-images/packer_cache 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 args: []string{"packer-provisioner-file"} 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 Plugin minimum port: 10000 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 Plugin maximum port: 25000 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 Detected home directory from env var: /home/packer 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 Plugin address: unix /tmp/packer-plugin697207787 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 Waiting for connection... 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 Serving a plugin connection... 2019/01/07 13:35:45 Loading provisioner: shell 2019/01/07 13:35:45 Plugin could not be found. Checking same directory as executable. 2019/01/07 13:35:45 Current exe path: /home/packer/packer-centos-images/packer 2019/01/07 13:35:45 Creating plugin client for path: /home/packer/packer-centos-images/packer 2019/01/07 13:35:45 Starting plugin: /home/packer/packer-centos-images/packer []string{"/home/packer/packer-centos-images/packer", "plugin", "packer-provisioner-shell"} 2019/01/07 13:35:45 Waiting for RPC address for: /home/packer/packer-centos-images/packer 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 [ERR] Checkpoint error: Get https://checkpoint-api.hashicorp.com/v1/check/packer?arch=amd64&os=linux&signature=62366ffc-0b51-a28d-12ce-58841a784e90&version=1.3.3: dial tcp 23.23.145.13:443: connect: connection refused 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 [INFO] Packer version: 1.3.3 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 Packer Target OS/Arch: linux amd64 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 Built with Go Version: go1.11.2 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 Detected home directory from env var: /home/packer 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 Attempting to open config file: /home/packer/.packerconfig 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 [WARN] Config file doesn't exist: /home/packer/.packerconfig 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 Packer config: &{DisableCheckpoint:false DisableCheckpointSignature:false PluginMinPort:10000 PluginMaxPort:25000 Builders:map[] PostProcessors:map[] Provisioners:map[]} 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 Detected home directory from env var: /home/packer 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 Setting cache directory: /home/packer/packer-centos-images/packer_cache 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 Detected home directory from env var: /home/packer 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 args: []string{"packer-provisioner-shell"} 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 Plugin minimum port: 10000 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 Plugin maximum port: 25000 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 Plugin address: unix /tmp/packer-plugin107512890 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 Waiting for connection... 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 Serving a plugin connection... 2019/01/07 13:35:45 Build debug mode: false 2019/01/07 13:35:45 Force build: false 2019/01/07 13:35:45 On error: 2019/01/07 13:35:45 Preparing build: qemu 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 [ERR] Checkpoint error: Get https://checkpoint-api.hashicorp.com/v1/check/packer?arch=amd64&os=linux&signature=62366ffc-0b51-a28d-12ce-58841a784e90&version=1.3.3: dial tcp 23.23.145.13:443: connect: connection refused 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 use specified accelerator: kvm 2019/01/07 13:35:45 Waiting on builds to complete... 2019/01/07 13:35:45 Starting build run: qemu 2019/01/07 13:35:45 Running builder: qemu 2019/01/07 13:35:45 [INFO] (telemetry) Starting builder qemu 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 Qemu path: /bin/qemu-system-x86_64, Qemu Image page: /bin/qemu-img 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 Acquiring lock to download: file:///home/packer/packer-centos-images/CentOS-7-x86_64-NetInstall-1810.iso 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 Parsed URL: &url.URL{Scheme:"file", Opaque:"", User:(*url.Userinfo)(nil), Host:"", Path:"/home/packer/packer-centos-images/CentOS-7-x86_64-NetInstall-1810.iso", RawPath:"", ForceQuery:false, RawQuery:"", Fragment:""} 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 [DEBUG] Using local file: /home/packer/packer-centos-images/CentOS-7-x86_64-NetInstall-1810.iso 2019/01/07 13:35:45 packer: 2019/01/07 13:35:45 Verifying checksum of /home/packer/packer-centos-images/CentOS-7-x86_64-NetInstall-1810.iso 2019/01/07 13:35:46 packer: 2019/01/07 13:35:46 No floppy files specified. Floppy disk will not be made. 2019/01/07 13:35:46 packer: 2019/01/07 13:35:46 Executing qemu-img: []string{"create", "-f", "qcow2", "centos7-base-img/centos7-base", "10000M"} 2019/01/07 13:35:46 packer: 2019/01/07 13:35:46 stdout: Formatting 'centos7-base-img/centos7-base', fmt=qcow2 size=10485760000 encryption=off cluster_size=65536 lazy_refcounts=off 2019/01/07 13:35:46 packer: 2019/01/07 13:35:46 stderr: 2019/01/07 13:35:46 packer: 2019/01/07 13:35:46 Trying port: 10085 2019/01/07 13:35:46 packer: 2019/01/07 13:35:46 Looking for available communicator (SSH, WinRM, etc) port between 2222 and 2229 2019/01/07 13:35:46 packer: 2019/01/07 13:35:46 Trying port: 2222 2019/01/07 13:35:46 packer: 2019/01/07 13:35:46 Looking for available port between 5900 and 6000 on 127.0.0.1 2019/01/07 13:35:46 packer: 2019/01/07 13:35:46 Trying port: 5926 2019/01/07 13:35:46 packer: 2019/01/07 13:35:46 Found available VNC port: 5926 on IP: 127.0.0.1 2019/01/07 13:35:46 packer: 2019/01/07 13:35:46 Qemu --version output: QEMU emulator version 2.0.0, Copyright (c) 2003-2008 Fabrice Bellard 2019/01/07 13:35:46 packer: 2019/01/07 13:35:46 Qemu version: 2.0.0 qemu: view the screen of the VM, connect via VNC without a password to qemu: vnc://127.0.0.1:5926 2019/01/07 13:35:46 packer: 2019/01/07 13:35:46 Qemu Builder has no floppy files, not attaching a floppy. 2019/01/07 13:35:46 packer: 2019/01/07 13:35:46 Executing /bin/qemu-system-x86_64: []string{"-vnc", "127.0.0.1:26", "-name", "centos7-base", "-netdev", "user,id=user.0,hostfwd=tcp::2222-:22", "-device", "virtio-net,netdev=user.0", "-drive", "file=centos7-base-img/centos7-base,if=virtio,cache=writeback,discard=ignore,format=qcow2", "-cdrom", "/home/packer/packer-centos-images/CentOS-7-x86_64-NetInstall-1810.iso", "-m", "2048M", "-boot", "once=d", "-machine", "type=pc,accel=kvm", "-smp", "cpus=1,maxcpus=16,cores=4"} 2019/01/07 13:35:46 packer: 2019/01/07 13:35:46 Started Qemu. Pid: 37290 2019/01/07 13:35:46 packer: 2019/01/07 13:35:46 Qemu stderr: 2019/01/07 13:35:46 packer: 2019/01/07 13:35:46 Qemu stderr: (process:37290): GLib-WARNING **: 13:35:46.580: gmem.c:489: custom memory allocation vtable not supported 2019/01/07 13:36:28 packer: 2019/01/07 13:36:28 Connected to VNC desktop: QEMU (centos7-base) 2019/01/07 13:36:28 packer: 2019/01/07 13:36:28 Special code '<up>' found, replacing with: 0xFF52 2019/01/07 13:36:28 packer: 2019/01/07 13:36:28 [INFO] Waiting 1s 2019/01/07 13:36:29 packer: 2019/01/07 13:36:29 Special code '<tab>' found, replacing with: 0xFF09 2019/01/07 13:36:29 packer: 2019/01/07 13:36:29 [INFO] Waiting 1s 2019/01/07 13:36:30 packer: 2019/01/07 13:36:30 Sending char ' ', code 0x20, shift false 2019/01/07 13:36:31 packer: 2019/01/07 13:36:31 Sending char 't', code 0x74, shift false 2019/01/07 13:36:31 packer: 2019/01/07 13:36:31 Sending char 'e', code 0x65, shift false 2019/01/07 13:36:31 packer: 2019/01/07 13:36:31 Sending char 'x', code 0x78, shift false 2019/01/07 13:36:31 packer: 2019/01/07 13:36:31 Sending char 't', code 0x74, shift false 2019/01/07 13:36:31 packer: 2019/01/07 13:36:31 Sending char ' ', code 0x20, shift false 2019/01/07 13:36:32 packer: 2019/01/07 13:36:32 Sending char 'k', code 0x6B, shift false 2019/01/07 13:36:32 packer: 2019/01/07 13:36:32 Sending char 's', code 0x73, shift false 2019/01/07 13:36:32 packer: 2019/01/07 13:36:32 Sending char '=', code 0x3D, shift false 2019/01/07 13:36:32 packer: 2019/01/07 13:36:32 Sending char 'h', code 0x68, shift false 2019/01/07 13:36:32 packer: 2019/01/07 13:36:32 Sending char 't', code 0x74, shift false 2019/01/07 13:36:33 packer: 2019/01/07 13:36:33 Sending char 't', code 0x74, shift false 2019/01/07 13:36:33 packer: 2019/01/07 13:36:33 Sending char 'p', code 0x70, shift false 2019/01/07 13:36:33 packer: 2019/01/07 13:36:33 Sending char ':', code 0x3A, shift true 2019/01/07 13:36:33 packer: 2019/01/07 13:36:33 Sending char '/', code 0x2F, shift false 2019/01/07 13:36:34 packer: 2019/01/07 13:36:34 Sending char '/', code 0x2F, shift false 2019/01/07 13:36:34 packer: 2019/01/07 13:36:34 Sending char '1', code 0x31, shift false 2019/01/07 13:36:34 packer: 2019/01/07 13:36:34 Sending char '0', code 0x30, shift false 2019/01/07 13:36:34 packer: 2019/01/07 13:36:34 Sending char '.', code 0x2E, shift false 2019/01/07 13:36:34 packer: 2019/01/07 13:36:34 Sending char '0', code 0x30, shift false 2019/01/07 13:36:35 packer: 2019/01/07 13:36:35 Sending char '.', code 0x2E, shift false 2019/01/07 13:36:35 packer: 2019/01/07 13:36:35 Sending char '2', code 0x32, shift false 2019/01/07 13:36:35 packer: 2019/01/07 13:36:35 Sending char '.', code 0x2E, shift false 2019/01/07 13:36:35 packer: 2019/01/07 13:36:35 Sending char '2', code 0x32, shift false 2019/01/07 13:36:35 packer: 2019/01/07 13:36:35 Sending char ':', code 0x3A, shift true 2019/01/07 13:36:36 packer: 2019/01/07 13:36:36 Sending char '1', code 0x31, shift false 2019/01/07 13:36:36 packer: 2019/01/07 13:36:36 Sending char '0', code 0x30, shift false 2019/01/07 13:36:36 packer: 2019/01/07 13:36:36 Sending char '0', code 0x30, shift false 2019/01/07 13:36:36 packer: 2019/01/07 13:36:36 Sending char '8', code 0x38, shift false 2019/01/07 13:36:37 packer: 2019/01/07 13:36:37 Sending char '5', code 0x35, shift false 2019/01/07 13:36:37 packer: 2019/01/07 13:36:37 Sending char '/', code 0x2F, shift false 2019/01/07 13:36:37 packer: 2019/01/07 13:36:37 Sending char 'c', code 0x63, shift false 2019/01/07 13:36:37 packer: 2019/01/07 13:36:37 Sending char 'e', code 0x65, shift false 2019/01/07 13:36:37 packer: 2019/01/07 13:36:37 Sending char 'n', code 0x6E, shift false 2019/01/07 13:36:38 packer: 2019/01/07 13:36:38 Sending char 't', code 0x74, shift false 2019/01/07 13:36:38 packer: 2019/01/07 13:36:38 Sending char 'o', code 0x6F, shift false 2019/01/07 13:36:38 packer: 2019/01/07 13:36:38 Sending char 's', code 0x73, shift false 2019/01/07 13:36:38 packer: 2019/01/07 13:36:38 Sending char '7', code 0x37, shift false 2019/01/07 13:36:38 packer: 2019/01/07 13:36:38 Sending char '-', code 0x2D, shift false 2019/01/07 13:36:39 packer: 2019/01/07 13:36:39 Sending char 'k', code 0x6B, shift false 2019/01/07 13:36:39 packer: 2019/01/07 13:36:39 Sending char 's', code 0x73, shift false 2019/01/07 13:36:39 packer: 2019/01/07 13:36:39 Sending char '.', code 0x2E, shift false 2019/01/07 13:36:39 packer: 2019/01/07 13:36:39 Sending char 'c', code 0x63, shift false 2019/01/07 13:36:39 packer: 2019/01/07 13:36:39 Sending char 'f', code 0x66, shift false 2019/01/07 13:36:40 packer: 2019/01/07 13:36:40 Sending char 'g', code 0x67, shift false 2019/01/07 13:36:40 packer: 2019/01/07 13:36:40 Special code '<enter>' found, replacing with: 0xFF0D 2019/01/07 13:36:40 packer: 2019/01/07 13:36:40 [INFO] Waiting 1s 2019/01/07 13:36:41 packer: 2019/01/07 13:36:41 [INFO] Waiting for SSH, up to timeout: 20m0s 2019/01/07 13:36:41 packer: 2019/01/07 13:36:41 [INFO] Attempting SSH connection... 2019/01/07 13:36:41 packer: 2019/01/07 13:36:41 [DEBUG] reconnecting to TCP connection for SSH 2019/01/07 13:36:41 packer: 2019/01/07 13:36:41 [DEBUG] handshaking with SSH 2019/01/07 13:37:01 packer: 2019/01/07 13:37:01 [DEBUG] SSH handshake err: ssh: handshake failed: read tcp 127.0.0.1:55710->127.0.0.1:2222: read: connection reset by peer 2019/01/07 13:37:08 packer: 2019/01/07 13:37:08 [INFO] Attempting SSH connection... 2019/01/07 13:37:08 packer: 2019/01/07 13:37:08 [DEBUG] reconnecting to TCP connection for SSH 2019/01/07 13:37:08 packer: 2019/01/07 13:37:08 [DEBUG] handshaking with SSH 2019/01/07 13:37:08 packer: 2019/01/07 13:37:08 [DEBUG] SSH handshake err: ssh: handshake failed: read tcp 127.0.0.1:55718->127.0.0.1:2222: read: connection reset by peer

After that, it just keeps on repeating the SSH handshare err message until it times out.....

Any suggestions?

Rickard von Essen

unread,
Jan 7, 2019, 7:51:51 AM1/7/19
to packe...@googlegroups.com
What's the content of centos7-ks.cfg? And how does the console look when Packer is trying to connect to SSH? Run with headless false until it works.

--
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 packer-tool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/156769d0-dd98-4469-b61d-97d3f8d224b9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Message has been deleted

Tim Bücher

unread,
Jan 7, 2019, 8:17:37 AM1/7/19
to Packer
So, I'm actually working behind a firewall and am not able to connect to the vnc. Is there any other way how to debug this?

Another little thing: I just posted my centos7-ks.cfg here and the message was deleted just a few minutes ago. why though?

Rickard von Essen

unread,
Jan 7, 2019, 8:39:57 AM1/7/19
to packe...@googlegroups.com
You can install "vncsnapshot" on the machine running Packer and capture some images and transfer back. Most likely you kickstart doesn't complete correctly, the installed OS doesn't startup correctly etc. Or your SSH credentials are incorrect. 

It can also be an idea to run the build locally first to get it working properly, since debugging locally is much simpler.

And by the way you can tunnel VNC over SSH.

On Mon, Jan 7, 2019 at 2:17 PM Tim Bücher <tim.b...@comsysto.com> wrote:
So, I'm actually working behind a firewall and am not able to connect to the vnc. Is there any other way how to debug this?

Another little thing: I just posted my centos7-ks.cfg here and the message was deleted just a few minutes ago. why though?

--
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 packer-tool...@googlegroups.com.

Tim Bodhini

unread,
Jan 10, 2019, 9:22:01 AM1/10/19
to Packer
So, after some time and other tasks I finally managed to attach my GUI to the VNC ... The only thing I can report is:
It starts the anaconda installer and returns messages like:
- Running pre-installation scripts
- Not asking for VNC because of an automated install
- Not asking for VNC because text mode explicitly asked for in kickstart
- Starting automated install ...
after that it just repeats the dots and is timing out. I've now increased the timeout and will wait until I get some proper error .... 

And by the way: this is another try to post my ks ->

#version=DEVEL
# System authorization information
auth --enableshadow --passalgo=sha512
# Install OS instead of upgrade
install
# Use network installation
# Use text mode install
text
# Firewall configuration
firewall --disabled
firstboot --disable
ignoredisk --only-use=vda
# Keyboard layouts
# old format: keyboard us
# new format:
keyboard --vckeymap=us --xlayouts=''
# System language
lang en_US.UTF-8

# Network information
network  --bootproto=dhcp --device=eth0 --ipv6=auto --activate
network  --hostname=localhost.localdomain
# Reboot after installation
reboot
# Root password
rootpw SomePass
# SELinux configuration
selinux --disabled
# System services
services --enabled="network,sshd/postfix,chronyd"
# Do not configure the X Window System
skipx
# System timezone
timezone Etc/UTC
# System bootloader configuration
bootloader --append="nomodeset crashkernel=auto" --location=mbr --driveorder="vda" --boot-drive=vda
# Clear the Master Boot Record
zerombr
# Partition clearing information
clearpart --all --initlabel
# Disk partitioning information
part /boot --fstype="ext2" --ondisk=vda --size=512 --fsoptions="relatime,nodev"
part / --fstype="xfs" --ondisk=vda --size=9487

%pre
bootdrive=vda

if [ -f "/dev/$bootdrive" ] ; then
  exec < /dev/tty3 > /dev/tty3
  chvt 3
  echo "ERROR: Drive device does not exist at /dev/$bootdrive!"
  sleep 5
  halt -f
fi

cat >/tmp/kspre.cfg <<CFG
zerombr
bootloader --location=mbr --driveorder=$bootdrive --append="nomodeset"
clearpart --all --initlabel
part /boot --ondrive=$bootdrive --fstype ext2 --fsoptions="relatime,nodev" --size=512
part / --ondrive=$bootdrive --fstype xfs --size 1 --grow
CFG

%end

%packages
acpid
at
chrony
cronie-noanacron
crontabs
kexec-tools
logrotate
mailx
mlocate
net-tools
openssh-clients
openssh-server
postfix
rsync
tmpwatch
vixie-cron
wget
which
yum
yum-cron
yum-utils
-aic94xx-firmware
-atmel-firmware
-bfa-firmware
-biosdevname
-ipw2100-firmware
-ipw2200-firmware
-ivtv-firmware
-iwl100-firmware
-iwl1000-firmware
-iwl3945-firmware
-iwl4965-firmware
-iwl5000-firmware
-iwl5150-firmware
-iwl6000-firmware
-iwl6000g2a-firmware
-iwl6050-firmware
-kernel-firmware
-libertas-usb8388-firmware
-prelink
-ql2100-firmware
-ql2200-firmware
-ql23xx-firmware
-ql2400-firmware
-ql2500-firmware
-rt61pci-firmware
-rt73usb-firmware
-sendmail
-xorg-x11-drv-ati-firmware
-zd1211-firmware

%end

%addon com_redhat_kdump --enable --reserve-mb='auto'

%end

Tim Bodhini

unread,
Jan 10, 2019, 9:26:59 AM1/10/19
to Packer
Oh, and I forgot to mention: The logs don't show anything since the last 10 Minutes running the instance. Last entry was:
"INFO anaconda: Thread Done: AnaStorageWatcher"

I can't see any ERROR msg or similar ...

Alvaro Miranda Aguilera

unread,
Jan 10, 2019, 2:01:39 PM1/10/19
to packe...@googlegroups.com
hello

without packer, if you do a VM manually with this kickstart, does the kickstart work?

can you ssh to the vm after the reboot?

alvaro





For more options, visit https://groups.google.com/d/optout.


--
Alvaro

Dhatchinamoorthy M

unread,
Jan 16, 2019, 1:42:56 AM1/16/19
to packe...@googlegroups.com
Hi,

I am also facing same issue my vm is running in ESXi host and if i create vm using KVM able to create it but using packer ssh time out issue im getting. Cloud please tell me and network settings i need to change in host machine. my kickstart file serving using 10.0.2.2 this ip address.

Alvaro Miranda Aguilera

unread,
Jan 16, 2019, 10:23:08 AM1/16/19
to packe...@googlegroups.com
hello

is very unluckely you are hitting 100% the same issue

so will be better if you send a new email share information on what you want to do, what you have done, what work what doesnt and where you need help.

without any code or explanation, is very hard to know what need to be updated.

Alvaro.


For more options, visit https://groups.google.com/d/optout.


--
Alvaro

Dhatchinamoorthy M

unread,
Jan 17, 2019, 5:57:35 AM1/17/19
to packe...@googlegroups.com
Hi ,

Im running packer machine(vm)  in ESXi Host and its has ip address 192.168.4.61 and im tying to create centos image using attached file json and kickstart file. the problem is when i run the packer build command qemu emulator coming up and kvm vm is launching but its unable to fetch the kickstart file from
10.0.2.2/ks.cfg file. due to this build failing.

Error screen shot:
.
image.png

My machine network
image.png

Jason file:
{
  "builders":
  [
    {
      "type": "qemu",
      "iso_checksum": "6d44331cc4f6c506c7bbe9feb8468fad6c51a88ca1393ca6b8b486ea04bec3c1",
      "iso_checksum_type": "SHA256",
      "output_directory": "/root/lab-dev/output",
      "shutdown_command": "echo 'packer' | sudo -S shutdown -P now",
      "disk_size": 50,
      "format": "qcow2",
      "accelerator": "kvm",
      "http_directory": "/root/lab-dev/http",
      "ssh_username": "root",
      "ssh_password": "root123",
      "ssh_timeout": "20m",
      "vm_name": "Dhatch-centos",
      "net_device": "virtio-net",
      "disk_interface": "virtio",
      "boot_wait": "10s",
      "boot_command": [
        "<tab> text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/centos7-ks.cfg<enter><wait>"
      ]
    }
  ]
}

----------------------------
Ks.cfg file
# Run the installer
install
# Use CDROM installation media
cdrom
# System language
lang en_US.UTF-8
# Keyboard layouts
keyboard us
# Enable more hardware support
unsupported_hardware
# System authorization information
auth --enableshadow --passalgo=sha512

# Use network installation
# Run the Setup Agent on first boot
firstboot --enable
ignoredisk --only-use=sda
# Keyboard layouts
keyboard --vckeymap=us --xlayouts='us'
# System language
lang en_US.UTF-8

# Network information
network  --bootproto=dhcp --device=eth0 --ipv6=auto --activate
network  --hostname=testing
# Root password
rootpw root123
# System timezone
timezone America/New_York --isUtc
# System bootloader configuration
bootloader --location=mbr --boot-drive=sda
autopart --type=lvm
# Partition clearing information
clearpart --all --initlabel --drives=sda
autopart

%packages
@base
@compat-libraries
@core
@development
@virtualization-hypervisor
@virtualization-platform
@virtualization-tools

%end


Alvaro Miranda Aguilera

unread,
Jan 17, 2019, 2:10:00 PM1/17/19
to packe...@googlegroups.com
it seeem your host is having a ip that is confusing packer

you seems to have 10.2.x ip on lo interface

replace the .HTTPIP with 192.168.4.61 on the boot command a try again


   "boot_command": [
        "<tab> text ks=http://192.168.4.61:{{ .HTTPPort }}/centos7-ks.cfg<enter><wait>"
      ]


Alvaro


For more options, visit https://groups.google.com/d/optout.


--
Alvaro

Dhatchinamoorthy M

unread,
Jan 18, 2019, 12:22:04 AM1/18/19
to packe...@googlegroups.com
Hi,

Still same issue no luck. I have changed host ip in json file and removed loop back 10.0.2.2 getting same issue.

please find the screen shot. Build and Qemu logs
image.png


Alvaro Miranda Aguilera

unread,
Jan 18, 2019, 11:03:52 AM1/18/19
to packe...@googlegroups.com
Hello

The 2nd screenshot still shows the wrong ip on the network

Have you tried with a diferent packer template with a different json file?

My suggestion will be try a different project and see if works
or try a different machine

Alvaro.


For more options, visit https://groups.google.com/d/optout.


--
Alvaro

Reply all
Reply to author
Forward
0 new messages