简体   繁体   中英

Using packer to create a vagrant qemu/kvm box

I am attempting to build a vagrant .box using the qemu/kvm hypervisor using packer. I am using the vagrant plugin vagrant-libvirt .

In my packer base.json file, I am using the vagrant post-processor, like

"post-processors": [
    {
        "type": "vagrant",
        "output": "output/my-ubuntu_14.04_packer.box"
    }
],

When I build the box however, I get this error in the logs:

2015/12/22 20:11:57 ui error: Build 'qemu' errored: 1 error(s) occurred:
* Post-processor failed: Unknown artifact type, can't build box: transcend.qemu

I've looked in to this issue, and it does seem to be caused by that post-processor configuration. For example, according to the conversation here , qemu did not support the vagrant post processor at that time. However, looking at this it should work now that this pull request is merged.

In fact, the documentation for the vagrant post-processor seems lists qemu as a supported provider.

I believe this is because I am currently using Packer v0.6.0 (released May 2, 2014). The vagrant post-processor wasn't supported until Packer v0.7.2 (released Oct 28, 2014), so an upgrade would be necessary to achieve this.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM