packer-builder-qemu SSH handshake err: Timeout during SSH handshake

1,272 views
Skip to first unread message

Peter Wang

unread,
Nov 24, 2015, 12:58:01 PM11/24/15
to Packer
Hi all,

I'm using packer 0.8.6 under Mac OS X, trying to build a Kali Linux VM for qemu image (qcow2). However the build stuck on SSH handshake error, see the error message.

Use the same template file, it's fine in building other image format such vmware, virtualbox. but stuck here for qemu/qcow2.
let me know if anybody ran into the same issue before and found a workaround.


2015/11/24 10:12:31 packer-builder-qemu: 2015/11/24 10:12:31 Qemu Builder has no floppy files, not attaching a floppy.

    kali-qemu: WARNING: The VM will be started with no hardware acceleration.

2015/11/24 10:12:31 packer-builder-qemu: 2015/11/24 10:12:31 Executing /usr/local/bin/qemu-system-x86_64: []string{"-drive", "file=output-kali-qemu/kali-psec,if=virtio,cache=writeback,discard=ignore", "-netdev", "user,id=user.0,hostfwd=tcp::3463-:22", "-device", "virtio-net,netdev=user.0", "-name", "kali-psec", "-m", "512M", "-machine", "type=pc", "-vnc", "0.0.0.0:59", "-cdrom", "/Volumes/Lite360/kali-psec/packer_cache/995c7a87808dff20227c665ef202c143f61a1a11d52d6eddf3743c01487fd1a3.iso", "-boot", "once=d"}

    kali-qemu: The installation may take considerably longer to finish.

    kali-qemu:

2015/11/24 10:12:31 packer-builder-qemu: 2015/11/24 10:12:31 Started Qemu. Pid: 60554

2015/11/24 10:12:31 packer-builder-qemu: 2015/11/24 10:12:31 Qemu stderr:

2015/11/24 10:12:31 packer-builder-qemu: 2015/11/24 10:12:31 Qemu stderr: (process:60554): GLib-WARNING **: gmem.c:482: custom memory allocation vtable not supported

==> kali-qemu: Waiting 10s for boot...

2015/11/24 10:12:33 ui: ==> kali-qemu: Waiting 10s for boot...

2015/11/24 10:12:43 ui: ==> kali-qemu: Connecting to VM via VNC

==> kali-qemu: Connecting to VM via VNC

2015/11/24 10:12:43 packer-builder-qemu: 2015/11/24 10:12:43 Connected to VNC desktop: QEMU (kali-psec)

2015/11/24 10:12:43 ui: ==> kali-qemu: Typing the boot command over VNC...

==> kali-qemu: Typing the boot command over VNC...


2015/11/24 10:14:01 packer-builder-qemu: 2015/11/24 10:14:01 [INFO] Attempting SSH connection...

2015/11/24 10:14:01 packer-builder-qemu: 2015/11/24 10:14:01 reconnecting to TCP connection for SSH

2015/11/24 10:14:01 packer-builder-qemu: 2015/11/24 10:14:01 handshaking with SSH

2015/11/24 10:15:01 packer-builder-qemu: 2015/11/24 10:15:01 [DEBUG] SSH handshake err: Timeout during SSH handshake

2015/11/24 10:15:08 packer-builder-qemu: 2015/11/24 10:15:08 [INFO] Attempting SSH connection...

2015/11/24 10:15:08 packer-builder-qemu: 2015/11/24 10:15:08 reconnecting to TCP connection for SSH

2015/11/24 10:15:08 packer-builder-qemu: 2015/11/24 10:15:08 handshaking with SSH

2015/11/24 10:16:08 packer-builder-qemu: 2015/11/24 10:16:08 [DEBUG] SSH handshake err: Timeout during SSH handshake




Thanks,

Peter


Tom Bullers

unread,
Nov 30, 2015, 12:48:29 PM11/30/15
to Packer

I'm having similar issues with not being able to connect with ssh.

however, I think your problem is here:

2015/11/24 10:12:31 packer-builder-qemu: 2015/11/24 10:12:31 Qemu stderr: (process:60554): GLib-WARNING **: gmem.c:482: custom memory allocation vtable not supported

This is preventing the VM from starting up so you can't ssh.  I'd try researching the error above a bit more.

My problem has something to do with scan errors and unexepected newlines, which must be preventing my VM from starting up.

Good luck to you.

-tom
Reply all
Reply to author
Forward
0 new messages