简体   繁体   English

使用 packer 创建一个 vagrant qemu/kvm box

[英]Using packer to create a vagrant qemu/kvm box

I am attempting to build a vagrant .box using the qemu/kvm hypervisor using packer.我正在尝试使用 packer 使用 qemu/kvm 管理程序构建一个 vagrant .box I am using the vagrant plugin vagrant-libvirt .我正在使用 vagrant 插件vagrant-libvirt

In my packer base.json file, I am using the vagrant post-processor, like在我的 packer base.json文件中,我使用了 vagrant 后处理器,比如

"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.比如,根据这里的对话,当时qemu不支持vagrant post processor。 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.事实上,vagrant post-processor 的文档似乎将 qemu 列为受支持的提供者。

I believe this is because I am currently using Packer v0.6.0 (released May 2, 2014).我相信这是因为我目前使用的是Packer v0.6.0 (2014 年 5 月 2 日发布)。 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.直到Packer v0.7.2 (2014 年 10 月 28 日发布)才支持 vagrant 后处理器,因此需要进行升级才能实现此目的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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