libvirtutil.py 文件源码

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

项目:lib9 作者: Jumpscale 项目源码 文件源码
def create(self, id, xml):
        if self.isCurrentStorageAction(id):
            raise Exception("Can't start a locked machine")
        domain = self._get_domain(id)
        if not domain and xml:
            domain = self.connection.defineXML(xml)
        if domain.state(0)[0] == libvirt.VIR_DOMAIN_RUNNING:
            return True
        return domain.create() == 0
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号