sh 使用packer构建的映像创建KVM域

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh 使用packer构建的映像创建KVM域相关的知识,希望对你有一定的参考价值。

#!/bin/bash
# Suppose that you had an image built by packer
# How to use it in KVM?
# Just use virt-install
virt-install --connect qemu:///system \
    -n xmppdb \
    -r 1024 \
    --import \
    --disk path=./packer-kvm.img,format=qcow2,size=10 \
    --vnc \
    --noautoconsole \
    --os-type linux \
    --os-variant ubuntuTrusty \
    --network bridge=br0
exit 0

以上是关于sh 使用packer构建的映像创建KVM域的主要内容,如果未能解决你的问题,请参考以下文章