V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
18870715400
V2EX  ›  Python

关于虚拟机中的 gpu 问题

  •  
  •   18870715400 · May 20, 2020 · 8537 views
    This topic created in 2169 days ago, the information mentioned may be changed or developed.
    刚刚用虚拟机安装好了一个 linux 系统, 但是 lspci | grep -i vga 命令下显示的 gpu 是:00:0f.0 VGA compatible controller: VMware SVGA II Adapter 但是笔记本的是 MX150 独立显卡, 应该怎么将 linux 系统的 gpu 也设置成 MX150 显卡呢, 求教
    22 replies    2020-05-23 23:28:05 +08:00
    xuanbg
        1
    xuanbg  
       May 20, 2020
    虚拟机里面的硬件设备都是虚拟的,所以你的要求实现不了。
    masker0817
        2
    masker0817  
       May 20, 2020 via Android
    搜一下 pci passthrough,可以在虚拟机里达到原生的速度。不过虚拟机用了独显,Host 就只能用核显了
    masker0817
        3
    masker0817  
       May 20, 2020 via Android
    还有搜一下 Qemu
    tankren
        4
    tankren  
       May 20, 2020
    没办法 你这个是笔记本
    defunct9
        5
    defunct9  
       May 20, 2020
    pci 直通是正解
    18870715400
        6
    18870715400  
    OP
       May 20, 2020
    @masker0817 好的, 谢谢
    differentPlayer
        7
    differentPlayer  
       May 20, 2020
    如果是 N 卡的话,我之前作过测试。只要在 NVIDIA 控制面板-管理 3D 设置-全局设置中设置为独显。那么 VM 虚拟机中 GPU 实际使用时就会使用 N 卡
    systemcall
        9
    systemcall  
       May 20, 2020 via Android
    电脑支持 vt-d 或者 amd-v,就把这些功能打开,之后把显卡分配给虚拟机就行了
    但是,核显是挂在 ringbus 上的缘故,似乎不能分配出去,n 卡和 linux 的兼容性不好
    kokutou
        10
    kokutou  
       May 20, 2020 via Android
    笔记本 mx150 没有视频输出口,挂上去了。。。怎么输出呢。。。
    neoblackcap
        11
    neoblackcap  
       May 20, 2020
    @kokutou 不是强制核显给宿主机,然后独显旁路给虚拟机吗?
    kokutou
        12
    kokutou  
       May 20, 2020 via Android
    @neoblackcap
    笔记本是 CPU 核显输出接屏幕,mx150 这种低端独立显卡仅仅就是 pcie 接 CPU,输出啥都没接的。

    如果说就挂上去只做 CUDA 计算,可是这种低端独显的性能。。。

    最后,我不知道这种能不能挂上去,笔记本 BIOS 是基本没啥选项可调的。
    deorth
        13
    deorth  
       May 20, 2020   ❤️ 1
    放心,移动 N 卡 passthrough 你一定搞不定
    nevin47
        14
    nevin47  
       May 20, 2020
    二楼正解,但是移动 N 卡的 passthrough 确实很难弄
    binbinyouliiii
        15
    binbinyouliiii  
       May 20, 2020 via Android
    看到笔记本,基本废了
    18870715400
        16
    18870715400  
    OP
       May 20, 2020
    @differentPlayer 刚刚测试了, 还是 00:0f.0 VGA compatible controller: VMware SVGA II Adapter 这个
    xyjincan
        18
    xyjincan  
       May 21, 2020 via Android
    建议双系统
    differentPlayer
        19
    differentPlayer  
       May 21, 2020
    虚拟机里显示不会变,但是在物理机的任务管理器上能看到占用的是独显资源
    julyclyde
        20
    julyclyde  
       May 21, 2020
    首先要 pcie 直通,然后 lspci 能看到“正确的号码”
    其次 pciids 得足够新,lspci 才能看到“正确的名字”
    wersonliu9527
        21
    wersonliu9527  
       May 21, 2020
    微软 build 2020 win10 本月支持 wsl2 发行版,支持 gpu 和  cuda
    Owenjia
        22
    Owenjia  
       May 23, 2020
    英特尔的处理器可以搜下关键字 Intel GVT-g
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3906 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 129ms · UTC 10:28 · PVG 18:28 · LAX 03:28 · JFK 06:28
    ♥ Do have faith in what you're doing.