Qemu build stuck at shutting down

699 views
Skip to first unread message

Nick Wales

unread,
Feb 4, 2014, 12:29:16 AM2/4/14
to packe...@googlegroups.com
When running "export PACKER_LOG="yes" && export PACKER_LOG_PATH="/root/packer.log" && packer build example.json" on ubuntu 12.04 with the json configuration file: 




It hangs at wanting to shut down, but there are no virtual machines running according to virsh list --all so no vnc to inspect. There is nothing in libvirtd.log so I am really struggling to see what the problem is right now.

I will try tomorrow running with headless = false when I can get a monitor up on a server but would love to get the headless install working.

Any ideas?

Reshad Rahman

unread,
Feb 7, 2014, 10:44:59 AM2/7/14
to packe...@googlegroups.com
I get the same issue using ubuntu. Read somewhere having "-no-reboot" in qemuargs would help but it didn't for me, still worth giving it a try though

Reshad Rahman

unread,
Feb 7, 2014, 9:15:41 PM2/7/14
to packe...@googlegroups.com
Got it working by increasing ssh_timeout and removing shutdown_command (reboot was expecting sudo password).

Nick Wales

unread,
Feb 11, 2014, 8:22:31 PM2/11/14
to packe...@googlegroups.com
Is ssh_wait_timeout the same as ssh_timeout?

At this point did you at least have a running VM? When I run virsh list --all I see nothing. 

Nick Wales

unread,
Feb 11, 2014, 11:05:02 PM2/11/14
to packe...@googlegroups.com
Having dissected the debug logs and attempted to run the qemu command manually I get an error about Device user could not be initialized. Is there something I'm missing?

root@packer:~# /usr/bin/qemu-system-x86_64 -no-reboot -drive file=/root/test/tdhtest.qcow2,if=virtio -display none -device virtio-net,netdev=user.0 -netdev user,id=user.0 -redir tcp:2228::22 -name tdhtest -machine type=pc-1.0,accel=kvm  -cdrom /home/packer/CentOS-6.4-x86_64-bin-DVD1.iso -boot d -m 512m

qemu-system-x86_64: -netdev user,id=user.0: could not set up host forwarding rule 'tcp:2228::22'

qemu-system-x86_64: -netdev user,id=user.0: Device 'user' could not be initialized
Reply all
Reply to author
Forward
0 new messages