Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

packer v0.6.1 doesn't work with libvirt #2

Open
ghost opened this issue Aug 31, 2014 · 3 comments
Open

packer v0.6.1 doesn't work with libvirt #2

ghost opened this issue Aug 31, 2014 · 3 comments
Labels

Comments

@ghost
Copy link

ghost commented Aug 31, 2014

$ packer build --only=freepto-libvirt new.json                                                            
freepto-libvirt output will be in this color.

==> freepto-libvirt: Downloading or copying ISO
    freepto-libvirt: Downloading or copying: http://cdimage.debian.org/debian-cd/7.4.0/amd64/iso-cd/debian-7.4.0-amd64-CD-1.iso
==> freepto-libvirt: Creating hard drive...
==> freepto-libvirt: Starting HTTP server on port 8081
==> freepto-libvirt: Found port for SSH: 3213.
==> freepto-libvirt: Looking for available port between 5900 and 6000
==> freepto-libvirt: Found available VNC port: 5947
==> freepto-libvirt: Starting VM, booting from CD-ROM
==> freepto-libvirt: Overriding defaults Qemu arguments with QemuArgs...
==> freepto-libvirt: Error launching VM: Qemu failed to start. Please run with logs to get more info.
==> freepto-libvirt: Deleting output directory...
Build 'freepto-libvirt' errored: Build was halted.

==> Some builds didn't complete successfully and had errors:
--> freepto-libvirt: Build was halted.

==> Builds finished but no artifacts were created.
@ghost ghost added the bug label Aug 31, 2014
@ghost
Copy link
Author

ghost commented Aug 31, 2014

Enable packer debug:

$ export PACKER_LOG="yes" && packer build --debug --only=freepto-libvirt freepto.json

the new qemu version doesn't accept "m" inside the sizing option.
have a look at the following output of a default configuration (i have removed all qmeu args from freepto.json)

2014/08/31 13:25:25 /usr/local/bin/packer-builder-qemu: 2014/08/31 13:25:25 Qemu Builder has no floppy files, not attaching a floppy.
2014/08/31 13:25:25 /usr/local/bin/packer-builder-qemu: 2014/08/31 13:25:25 Executing /usr/bin/qemu-system-x86_64: []string{"-device", "virtio-net,netdev=user.0", "-cdrom", "/home/vinc3nt/Documents/devops/freepto-vagrant/packer/packer_cache/9b973d9d535bc8038ac017b921fca63e1dff4237c09f6f424bb25f21de0d38d1.iso", "-drive", "file=output-freepto-libvirt/freepto-dev.qcow2,if=virtio", "-redir", "tcp:3213::22", "-vnc", "0.0.0.0:47", "-machine", "type=pc-1.0,accel=kvm", "-display", "sdl", "-name", "freepto-dev", "-netdev", "user,id=user.0", "-boot", "once=d", "-m", "512m"}
2014/08/31 13:25:25 /usr/local/bin/packer-builder-qemu: 2014/08/31 13:25:25 Started Qemu. Pid: 18568
2014/08/31 13:25:25 /usr/local/bin/packer-builder-qemu: 2014/08/31 13:25:25 Qemu stderr: qemu-system-x86_64: -m 512m: Parameter 'size' expects a size
==> freepto-libvirt: Error launching VM: Qemu failed to start. Please run with logs to get more info.
2014/08/31 13:25:25 ui error: ==> freepto-libvirt: Error launching VM: Qemu failed to start. Please run with logs to get more info.
==> freepto-libvirt: Pausing before cleanup of step 'stepConfigureVNC'. Press enter to continue. 2014/08/31 13:25:25 ui: ask: ==> freepto-libvirt: Pausing before cleanup of step 'stepConfigureVNC'. Press enter to continue.

fixed with the following commit: vvicaretti@a33b6a5

@mhdali
Copy link

mhdali commented Dec 30, 2015

Thanks @vinc3nt

@ghost
Copy link
Author

ghost commented May 19, 2016

I think the issue is actually needing a capital M on 512M option for qemu
(I know this is an old thread, but the first I found on this matter)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant