Skip to content

Instantly share code, notes, and snippets.

@Wenzel
Created July 4, 2018 12:33
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 Wenzel/e883cfa8e85f577406131aa3e88eefaa to your computer and use it in GitHub Desktop.
Save Wenzel/e883cfa8e85f577406131aa3e88eefaa to your computer and use it in GitHub Desktop.
Packer build failed on Xen - QEMU failed to get HVM_PARAM_IOREQ_PFN
2018/07/04 12:23:52 ui: ==> qemu: Overriding defaults Qemu arguments with QemuArgs...
2018/07/04 12:23:52 packer: 2018/07/04 12:23:52 Executing /usr/bin/qemu-system-x86_64: []string{"-fda", "/tmp/packer822671350", "-name", "win7x64", "-cdrom", "/home/vagrant/packer_cache/2b74e82a7abe5592aac026c1d0d5da01dd5a8dfad148b31b32203d23739da902.iso", "-smp", "1", "-m", "2048M", "-machine", "type=pc,accel=xen", "-device", "e1000,netdev=user.0", "-vnc", "0.0.0.0:23", "-netdev", "user,id=user.0,hostfwd=tcp::2387-:5985", "-drive", "file=output-qemu/win7x64,if=ide,cache=writeback,discard=ignore,format=qcow2", "-boot", "once=d"}
2018/07/04 12:23:52 packer: 2018/07/04 12:23:52 Started Qemu. Pid: 10999
2018/07/04 12:23:53 packer: 2018/07/04 12:23:53 Qemu stderr: WARNING: Image format was not specified for '/tmp/packer822671350' and probing guessed raw.
2018/07/04 12:23:53 packer: 2018/07/04 12:23:53 Qemu stderr: Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.
2018/07/04 12:23:53 packer: 2018/07/04 12:23:53 Qemu stderr: Specify the 'raw' format explicitly to remove the restrictions.
2018/07/04 12:23:53 packer: 2018/07/04 12:23:53 Qemu stderr: failed to get HVM_PARAM_IOREQ_PFN
2018/07/04 12:23:53 packer: 2018/07/04 12:23:53 Qemu stderr: qemu-system-x86_64: failed to get ioreq server info: error 22 handle=0x56342ec0c710
2018/07/04 12:23:53 packer: 2018/07/04 12:23:53 Qemu stderr: qemu-system-x86_64: xen hardware virtual machine initialisation failed
2018/07/04 12:23:53 ui error: ==> qemu: Error launching VM: Qemu failed to start. Please run with PACKER_LOG=1 to get more info.
==> qemu: Error launching VM: Qemu failed to start. Please run with PACKER_LOG=1 to get more info.
==> qemu: Deleting output directory...
2018/07/04 12:23:53 packer: 2018/07/04 12:23:53 Deleting floppy disk: /tmp/packer822671350
2018/07/04 12:23:53 ui: ==> qemu: Deleting output directory...
Build 'qemu' errored: Build was halted.
2018/07/04 12:23:53 [INFO] (telemetry) ending qemu
2018/07/04 12:23:53 ui error: Build 'qemu' errored: Build was halted.
2018/07/04 12:23:53 Builds completed. Waiting on interrupt barrier...
2018/07/04 12:23:53 machine readable: error-count []string{"1"}
2018/07/04 12:23:53 ui error:
==> Some builds didn't complete successfully and had errors:
2018/07/04 12:23:53 machine readable: qemu,error []string{"Build was halted."}
2018/07/04 12:23:53 ui error: --> qemu: Build was halted.
2018/07/04 12:23:53 ui:
==> Builds finished but no artifacts were created.
2018/07/04 12:23:53 [INFO] (telemetry) Finalizing.
==> Some builds didn't complete successfully and had errors:
--> qemu: Build was halted.
==> Builds finished but no artifacts were created.
2018/07/04 12:23:53 waiting for all plugin processes to complete...
2018/07/04 12:23:53 /usr/local/bin/packer: plugin process exited
2018/07/04 12:23:53 /usr/local/bin/packer: plugin process exited
@laughing-penguins
Copy link

This seems to be related to a thread I have going on the Xen-users mailing list. The gist has been that Xen isn't aware it needs to start an HVM environment because qemu isn't telling the hypervisor this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment