libvirt_kvm.py 文件源码

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

项目:paws 作者: rhpit 项目源码 文件源码
def start_vm(self, vm):
        """Start virtual machine instance on Libvirt

        :param vm: virtual machine
        :type vm: object
        """
        if self.is_running(vm):
            LOG.debug("VM %s is running" % vm.name())
            return True

        try:
            vm.create()
            LOG.debug("Importing VM %s" % vm)
            # the raise exception is to force the vm state be checked again
            raise Exception
        except libvirt.libvirtError as ex:
            raise ex
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号