image_build.py 文件源码

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

项目:s2e-env 作者: S2E 项目源码 文件源码
def _check_virtualbox():
    """
    Check if VirtualBox is running.

    VirtualBox conflicts with S2E's requirement for KVM, so VirtualBox must
    *not* be running together with S2E.
    """
    # Adapted from https://github.com/giampaolo/psutil/issues/132#issuecomment-44017679
    # to avoid race conditions
    for proc in psutil.process_iter():
        try:
            if proc.name == 'VBoxHeadless':
                raise CommandError('S2E uses KVM to build images. VirtualBox '
                                   'is currently running, which is not '
                                   'compatible with KVM. Please close all '
                                   'VirtualBox VMs and try again')
        except NoSuchProcess:
            pass
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号