推荐学习书目
› 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 · 9057 views
    This topic created in 2363 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
    xuanbg
    May 20, 2020
    1
    虚拟机里面的硬件设备都是虚拟的,所以你的要求实现不了。
    masker0817
    masker0817
    May 20, 2020 via Android
    2
    搜一下 pci passthrough,可以在虚拟机里达到原生的速度。不过虚拟机用了独显,Host 就只能用核显了
    masker0817
    masker0817
    May 20, 2020 via Android
    3
    还有搜一下 Qemu
    tankren
    tankren
    May 20, 2020
    4
    没办法 你这个是笔记本
    defunct9
    defunct9
    May 20, 2020
    5
    pci 直通是正解
    18870715400
    18870715400
    OP
    May 20, 2020
    6
    @masker0817 好的, 谢谢
    differentPlayer
    differentPlayer
    May 20, 2020
    7
    如果是 N 卡的话,我之前作过测试。只要在 NVIDIA 控制面板-管理 3D 设置-全局设置中设置为独显。那么 VM 虚拟机中 GPU 实际使用时就会使用 N 卡
    systemcall
    systemcall
    May 20, 2020 via Android
    9
    电脑支持 vt-d 或者 amd-v,就把这些功能打开,之后把显卡分配给虚拟机就行了
    但是,核显是挂在 ringbus 上的缘故,似乎不能分配出去,n 卡和 linux 的兼容性不好
    kokutou
    kokutou
    May 20, 2020 via Android
    10
    笔记本 mx150 没有视频输出口,挂上去了。。。怎么输出呢。。。
    neoblackcap
    neoblackcap
    May 20, 2020
    11
    @kokutou 不是强制核显给宿主机,然后独显旁路给虚拟机吗?
    kokutou
    kokutou
    May 20, 2020 via Android
    12
    @neoblackcap
    笔记本是 CPU 核显输出接屏幕,mx150 这种低端独立显卡仅仅就是 pcie 接 CPU,输出啥都没接的。

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

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