libvirt_kvm.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:paws 作者: rhpit 项目源码 文件源码
def create_vm(conn, xml_path):
        """Define a new domain in Libvirt, creating new Virtual Machine

        :param conn: Libvirt connection
        :type conn: object
        :param xml_path: full path for XML with VM definition
        :type xml_path: str
        :return True
        :rtype Boolean
        """
        LOG.debug("VM creation, defining new domain in libvirt")
        try:
            conn.defineXMLFlags(xml_path)
            LOG.debug("VM creation, complete")
            return True
        except (SystemExit, libvirtError) as ex:
            LOG.error(ex)
            raise SystemExit(1)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号