{"id":486,"date":"2024-05-21T12:34:14","date_gmt":"2024-05-21T04:34:14","guid":{"rendered":"https:\/\/blog.simple-dev.top\/?p=486"},"modified":"2024-05-21T15:03:00","modified_gmt":"2024-05-21T07:03:00","slug":"%e6%95%b4%e7%90%86pve8-%e4%b8%8a%e5%90%af%e7%94%a8-12-%e4%bb%a3-intel-cpu-%e6%a0%b8%e6%98%be-sr-iov-%e5%b9%b6%e7%9b%b4%e9%80%9a%e8%99%9a%e6%8b%9f%e6%9c%ba%e4%b8%8e%e6%98%a0%e5%b0%84lxc","status":"publish","type":"post","link":"https:\/\/blog.simple-dev.top\/?p=486","title":{"rendered":"[\u6574\u7406]PVE8 \u4e0a\u542f\u7528 12 \u4ee3 Intel CPU \u6838\u663e SR-IOV \u5e76\u76f4\u901a\u865a\u62df\u673a\u4e0e\u6620\u5c04LXC"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\" id=\"\u5f00\u542f\u6838\u663e-sr-iov\">\u5f00\u542f\u6838\u663e SR-IOV<\/h2>\n\n\n\n<p>SR-IOV \u662f\u4e00\u79cd\u786c\u4ef6\u865a\u62df\u5316\u6280\u672f\uff0c\u7b80\u5355\u6765\u8bf4\uff0c\u80fd\u5c06\u7269\u7406 PCIe \u8bbe\u5907\u865a\u62df\u6210\u591a\u4e2a\u865a\u62df\u8bbe\u5907\uff0c\u5728\u7f51\u5361\u4e0a\u88ab\u5e7f\u6cdb\u4f7f\u7528\u3002Intel Core CPU \u5728 11 \u4ee3\u540e\u652f\u6301\u4e86\u8be5\u6280\u672f\u7528\u4e8e GPU \u865a\u62df\u5316\uff0c\u66ff\u6362\u4e86\u8fc7\u53bb\u7684 GVT-g\uff08<a href=\"https:\/\/www.intel.cn\/content\/www\/cn\/zh\/support\/articles\/000093216\/graphics.html\">Intel \u4ea7\u54c1 GPU \u865a\u62df\u5316\u6280\u672f\u5217\u8868<\/a>\uff09<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>\u5f00\u542f SR-IOV \u4e3b\u8981\u7528\u5230\u8fd9\u4e2a\u9a71\u52a8\u7a0b\u5e8f\uff1a<a href=\"https:\/\/github.com\/strongtz\/i915-sriov-dkms\">i915-sriov-dkms<\/a>\uff0c\u80fd\u591f\u521b\u5efa\u6700\u591a 7 \u4e2a VF\uff08\u53ef\u4ee5\u7b80\u5355\u7406\u89e3\u4e3a vGPU\uff09<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>&#8211;\u53ef\u6284\u4f5c\u4e1a<a href=\"https:\/\/www.cloudstaymoon.com\/2024\/04\/10\/all-in-one-1\">\u4e91\u7559\u6708\u7684\u201c\u4e8c\u3001\u65b9\u6848\u4e00\uff1aSRIOV\u6838\u663e\u865a\u62df\u5316\uff08\u63a8\u8350\uff0c\u65b9\u6848\u6765\u6e90\uff1a\u7545\u7f51\u5c0f\u4e91\u5927\u4f6c\uff0c\u517c\u5bb9PVE8.2 \u548c 6.8\u5185\u6838\uff09\u201d<\/a><\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"windows-\u865a\u62df\u673a\u6302\u8f7d\">Windows \u865a\u62df\u673a\u6302\u8f7d<\/h2>\n\n\n\n<p>Windows \u865a\u62df\u673a\u8981\u5148\u914d\u7f6e\u597d\u8fdc\u7a0b\u684c\u9762\uff0c\u80fd\u8fde\u7684\u4e0a\u3002\u865a\u62df\u673a\u914d\u7f6e\u91cc\u300c\u663e\u793a\u300d\u9009\u300c\u65e0\u300d\uff08\u9009\u300c\u65e0\u300d\u540e\u5c31\u65e0\u6cd5 VNC \u8fde\u63a5\u4e86\uff0c\u6240\u4ee5\u8981\u5148\u914d\u597d\u8fdc\u7a0b\u684c\u9762\uff09<\/p>\n\n\n\n<p>\u6dfb\u52a0 PCI \u8bbe\u5907\uff0c\u9009\u62e9 vGPU\uff0c\u52fe\u4e0a\u4e3b GPU<br><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.simple-dev.top\/wp-content\/uploads\/2024\/05\/20240521120323.png\" alt=\"\" width=\"668\" height=\"254\"><\/p>\n\n\n\n<p>\u8fdb\u5165 Windows&nbsp;<a href=\"https:\/\/www.intel.cn\/content\/www\/cn\/zh\/support\/intel-driver-support-assistant.html\">\u5b89\u88c5\u9a71\u52a8<\/a>\uff0c<br><a href=\"https:\/\/gridea-blog.oss-cn-shenzhen.aliyuncs.com\/post-resource\/20230806170548.png\"><\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"lxc-\u5bb9\u5668\u6302\u8f7d\">LXC \u5bb9\u5668\u6302\u8f7d<\/h2>\n\n\n\n<p>\u65b0\u5efa LXC \u5bb9\u5668\u8981\u9009\u62e9\u300c\u5d4c\u5957\u300d+\u300c\u7279\u6743\u300d\uff08\u53bb\u6389\u65e0\u7279\u6743\u5bb9\u5668\u7684 \u2705\uff09<\/p>\n\n\n\n<p>\u6302\u8f7d\u8bbe\u5907\u5230 LXC \u5bb9\u5668\u91cc\uff0c\u5728 PVE \u91cc\u627e\u4e0b\u5bf9\u5e94\u8bbe\u5907\u9a71\u52a8\uff0c\u9009\u4e00\u4e2a\u672a\u4f7f\u7528\u7684 vGPU \uff0c\u6211\u8fd9\u91cc\u9009\u62e9 card2 \u548c renderD130<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ ls -l \/dev\/dri\ndrwxr-xr-x 2 root root        320 Aug  6 00:38 by-path\ncrw-rw---- 1 root video  226,   0 Aug  6 00:30 card1\ncrw-rw---- 1 root video  226,   2 Aug  6 00:30 card2\ncrw-rw---- 1 root video  226,   3 Aug  6 00:30 card3\ncrw-rw---- 1 root render 226, 128 Aug  6 00:30 renderD128\ncrw-rw---- 1 root render 226, 130 Aug  6 00:30 renderD130\ncrw-rw---- 1 root render 226, 131 Aug  6 00:30 renderD131\n\n<\/code><\/pre>\n\n\n\n<p>\u5173\u95ed LXC \u5bb9\u5668\uff0c\u7136\u540e\u4fee\u6539\u5bf9\u5e94 LXC \u5bb9\u5668\u914d\u7f6e\u6587\u4ef6<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ vim \/etc\/pve\/lxc\/&lt;LXC_ID&gt;.conf\n<\/code><\/pre>\n\n\n\n<p>\u6dfb\u52a0\u4ee5\u4e0b\u5185\u5bb9\u628a\u8bbe\u5907\u6302\u8f7d\u5230 LXC \u5185\uff08\u5206\u522b\u586b\u5165 video id \u548c render id\uff0c\u4ee5\u53ca\u6620\u5c04\u5bf9\u5e94 card \u548c render\uff09<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>lxc.cgroup2.devices.allow: c 226:2 rwm\nlxc.cgroup2.devices.allow: c 226:130 rwm\nlxc.mount.entry: \/dev\/dri\/card2 dev\/dri\/card0 none bind,optional,create=file\nlxc.mount.entry: \/dev\/dri\/renderD130 dev\/dri\/renderD128 none bind,optional,create=file<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/gridea-blog.oss-cn-shenzhen.aliyuncs.com\/post-resource\/20230806170700.png\"><img decoding=\"async\" src=\"https:\/\/gridea-blog.oss-cn-shenzhen.aliyuncs.com\/post-resource\/20230806170700.png\" alt=\"lxc-gpu-config\"\/><\/a><\/figure>\n\n\n\n<p>\u8fdb\u5165 LXC \u5bb9\u5668\u5b89\u88c5\u9a71\u52a8<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ apt update &amp;&amp; apt install intel-media-va-driver-non-free vainfo\n<\/code><\/pre>\n\n\n\n<p>\uff08\u5df2\u7ecfLXC\u4e86\u53ef\u4ee5\u76f4\u63a5\u5b89\u88c5Jellyfin\uff0c\u6ca1\u5fc5\u8981\u518ddocker\uff09<\/p>\n\n\n\n<p>\u5982\u679c LXC \u5185\u4e5f\u4f7f\u7528\u4e86\u5bb9\u5668\uff0c\u4f8b\u5982\u6211\u5728 LXC \u5185\u88c5\u4e86 Docker \u90e8\u7f72 Jellyfin\uff0c\u5219\u5bb9\u5668\u5185\u4e5f\u8981\u6709\u9a71\u52a8\uff0c\u5e76\u628a\u8bbe\u5907\u6302\u8f7d\u8fdb\u53bb<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ docker run ... \\\n    ... \\\n    --device \/dev\/dri:\/dev\/dri \\\n    ...\n<\/code><\/pre>\n\n\n\n<p>\u7136\u540e Jellyfin \u5bb9\u5668\u5185\u5c31\u53ef\u4ee5\u627e\u5230\u5bf9\u5e94\u8bbe\u5907\uff0c\u542f\u7528\u786c\u4ef6\u52a0\u901f\u5373\u53ef<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><br><a href=\"https:\/\/gridea-blog.oss-cn-shenzhen.aliyuncs.com\/post-resource\/20230806173300.png\"><\/a><\/p>\n\n\n\n<p>\u5feb\u901f\u94fe\u63a5\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-ryan-039-s-blog wp-block-embed-ryan-039-s-blog\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"MyxDkoWaGo\"><a href=\"https:\/\/blog.simple-dev.top\/?p=423\">PVE7.1\u4f7f\u7528lxc-ubuntu20.4\u5b89\u88c5Jellyfin\u53ca\u5f00\u542f\u786c\u4ef6\u89e3\u7801<\/a><\/blockquote><iframe class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"\u300a PVE7.1\u4f7f\u7528lxc-ubuntu20.4\u5b89\u88c5Jellyfin\u53ca\u5f00\u542f\u786c\u4ef6\u89e3\u7801 \u300b\u2014Ryan&#039;s Blog\" src=\"https:\/\/blog.simple-dev.top\/?p=423&#038;embed=true#?secret=sWSZT8XtEM#?secret=MyxDkoWaGo\" data-secret=\"MyxDkoWaGo\" width=\"500\" height=\"282\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-ryan-039-s-blog wp-block-embed-ryan-039-s-blog\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"6Jhs5Qi347\"><a href=\"https:\/\/blog.simple-dev.top\/?p=460\">Linux\u4f7f\u7528nfs\u6302\u8f7d\u7fa4\u8f89\u8fdc\u7a0b\u76ee\u5f55<\/a><\/blockquote><iframe class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"\u300a Linux\u4f7f\u7528nfs\u6302\u8f7d\u7fa4\u8f89\u8fdc\u7a0b\u76ee\u5f55 \u300b\u2014Ryan&#039;s Blog\" src=\"https:\/\/blog.simple-dev.top\/?p=460&#038;embed=true#?secret=SXL0pzxYoV#?secret=6Jhs5Qi347\" data-secret=\"6Jhs5Qi347\" width=\"500\" height=\"282\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>\u628a\u6587\u7ae0\u91cc\u7684docker\u66ff\u6362\u6210video<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>\u9e23\u8c22\uff1a<\/p>\n\n\n\n<p>\u6587\u7ae0\u53c2\u8003\uff1a<\/p>\n\n\n\n<p><a href=\"https:\/\/blog.csdn.net\/Zyt2048\/article\/details\/136276731\">PVE8.0 LXC\u5185\u4f7f\u7528INTEL\/AMD\/NVIDIA\u663e\u5361_pve 8 \u5b89\u88c5\u663e\u5361\u9a71\u52a8-CSDN\u535a\u5ba2<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/xxxuuu.me\/post\/pve8-intel-sr-iov\/\">PVE8 \u4e0a\u542f\u7528 12 \u4ee3 Intel CPU \u6838\u663e SR-IOV | x\u00b3u\u00b3 (xxxuuu.me)<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/www.cloudstaymoon.com\/2024\/04\/10\/all-in-one-1\">\u3010PVE\u3011All in One \u7684\u5feb\u4e50\u4e4b\u7cfb\u7edf\u914d\u7f6e\u53ca\u6838\u663eSR-IOV\u76f4\u901a | \u4e91\u7559\u6708\u7684\u6280\u672f\u5c0f\u7ad9 (cloudstaymoon.com)<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5f00\u542f\u6838\u663e SR-IOV SR-IOV \u662f\u4e00\u79cd\u786c\u4ef6\u865a\u62df\u5316\u6280\u672f\uff0c\u7b80\u5355\u6765\u8bf4\uff0c\u80fd\u5c06\u7269\u7406 PCIe \u8bbe\u5907\u865a\u62df\u6210\u591a\u4e2a\u865a\u62df\u8bbe [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-container-style":"default","site-container-layout":"default","site-sidebar-layout":"default","disable-article-header":"default","disable-site-header":"default","disable-site-footer":"default","disable-content-area-spacing":"default","footnotes":""},"categories":[18],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.simple-dev.top\/index.php?rest_route=\/wp\/v2\/posts\/486"}],"collection":[{"href":"https:\/\/blog.simple-dev.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.simple-dev.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.simple-dev.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.simple-dev.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=486"}],"version-history":[{"count":7,"href":"https:\/\/blog.simple-dev.top\/index.php?rest_route=\/wp\/v2\/posts\/486\/revisions"}],"predecessor-version":[{"id":500,"href":"https:\/\/blog.simple-dev.top\/index.php?rest_route=\/wp\/v2\/posts\/486\/revisions\/500"}],"wp:attachment":[{"href":"https:\/\/blog.simple-dev.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=486"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.simple-dev.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=486"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.simple-dev.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=486"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}