add some about n100 file
This commit is contained in:
@@ -0,0 +1,142 @@
|
||||
# GPU SR-IOV guest configure(显卡虚拟化 虚拟机设置)
|
||||
|
||||
|
||||
|
||||
## Linux Guest Configure (Linux 虚拟机设置)
|
||||
|
||||
- sugesst your guest kernel >= 6.2 ( 建议内核版本 >= 6.2 )
|
||||
- disable secure boot ( 关闭安全启动 )
|
||||
- must use Q35 chip (必须使用q35芯片组)
|
||||
- Disable balloon (关闭内存共享)
|
||||
- Must use OVMF UEFI ( 必须使用UEFI启动 )
|
||||
- Add sriov gpu after install sriov i915 driver (安装驱动以后再添加虚拟显卡)
|
||||
|
||||
### I will be use debian 12 to do this ( 接下来我用 Debian 12 代号 bookworm 来演示 )
|
||||
|
||||
- Add backports sources (添加 `backports` 源)
|
||||
|
||||
because debian 12 default kernel 6.1,so need install new kernel (因为debian 12 默认内核版本较低,需要添加backports源,安装较新的内核,我测试的版本 6.4可用)
|
||||
|
||||
**Plz use mirrors fit your network. I use ustc mirrors!**
|
||||
|
||||
```
|
||||
echo "deb http://mirrors.ustc.edu.cn/debian bookworm-backports main non-free-firmware" >> /etc/apt/sources.list
|
||||
```
|
||||
|
||||
- Update your system 更新你的系统
|
||||
|
||||
```
|
||||
# apt update
|
||||
```
|
||||
|
||||
- install new kernel 安装新内核
|
||||
|
||||
```
|
||||
# apt install linux-headers-6.4.0-0.deb12.2-amd64
|
||||
```
|
||||
- 更新 initramfs
|
||||
|
||||
```
|
||||
# update-initramfs -u -k all
|
||||
```
|
||||
|
||||
- 重启
|
||||
|
||||
```
|
||||
# reboot
|
||||
```
|
||||
|
||||
### install i915 sriov drivers 接下来打 `i915` 驱动打补丁
|
||||
|
||||
- git sources 下载源码
|
||||
|
||||
```
|
||||
cd /usr/src/
|
||||
git clone https://github.com/strongtz/i915-sriov-dkms i915-sriov-dkms-6.4
|
||||
```
|
||||
|
||||
|
||||
- edit file 编辑源文件
|
||||
|
||||
```
|
||||
edit /usr/src/i915-sriov-dkms-6.4/dkms.conf with the following:
|
||||
PACKAGE_NAME="i915-sriov-dkms"
|
||||
PACKAGE_VERSION="6.4"
|
||||
```
|
||||
|
||||
|
||||
- start dkms 开始打补丁
|
||||
|
||||
```
|
||||
dkms install --force -m i915-sriov-dkms -v 6.1
|
||||
```
|
||||
- edit kernel cmdline 编辑内核参数
|
||||
|
||||
```
|
||||
edit /etc/default/grub with the following:
|
||||
GRUB_CMDLINE_LINUX_DEFAULT="quiet i915.enable_guc=3"
|
||||
```
|
||||
|
||||
- update initramfa 更新 initramfs
|
||||
|
||||
```
|
||||
# update-grub
|
||||
# update-initramfs -u
|
||||
```
|
||||
|
||||
|
||||
- poweroff 关机
|
||||
```
|
||||
# poweroff
|
||||
```
|
||||
|
||||
### guest add sriov igpu 虚拟机添加虚拟显卡
|
||||
|
||||
- boot your guest 启动虚拟机
|
||||
- check 检查是否工作
|
||||
|
||||
**Running in SR-IOV VF mode** 说明已经工作在 sr-iov 模式了!
|
||||
|
||||
```
|
||||
# dmesg |grep i915
|
||||
[ 0.000000] Command line: BOOT_IMAGE=/vmlinuz-6.4.0-0.deb12.2-amd64 root=/dev/mapper/pmc--vg-root ro quiet i915.enable_guc=3
|
||||
[ 0.017516] Kernel command line: BOOT_IMAGE=/vmlinuz-6.4.0-0.deb12.2-amd64 root=/dev/mapper/pmc--vg-root ro quiet i915.enable_guc=3
|
||||
[ 3.279578] i915: loading out-of-tree module taints kernel.
|
||||
[ 3.279625] i915: module verification failed: signature and/or required key missing - tainting kernel
|
||||
[ 3.807172] i915 0000:06:11.0: Running in SR-IOV VF mode
|
||||
[ 3.813391] i915 0000:06:11.0: [drm] GT0: GUC: interface version 0.1.0.0
|
||||
[ 3.823986] i915 0000:06:11.0: [drm] VT-d active for gfx access
|
||||
[ 3.824015] i915 0000:06:11.0: [drm] Using Transparent Hugepages
|
||||
[ 3.828662] i915 0000:06:11.0: [drm] GT0: GUC: interface version 0.1.0.0
|
||||
[ 3.840880] i915 0000:06:11.0: GuC firmware PRELOADED version 1.0 submission:SR-IOV VF
|
||||
[ 3.840886] i915 0000:06:11.0: HuC firmware PRELOADED
|
||||
[ 3.846126] i915 0000:06:11.0: [drm] Protected Xe Path (PXP) protected content support initialized
|
||||
[ 3.846135] i915 0000:06:11.0: [drm] PMU not supported for this GPU.
|
||||
[ 3.846307] [drm] Initialized i915 1.6.0 20201103 for 0000:06:11.0 on minor 1
|
||||
```
|
||||
|
||||
`lspci |grep -i vga`
|
||||
|
||||
```
|
||||
00:01.0 VGA compatible controller: Device 1234:1111 (rev 02)
|
||||
06:11.0 VGA compatible controller: Intel Corporation Alder Lake-N [UHD Graphics]
|
||||
```
|
||||
|
||||
- done 完成✅
|
||||
|
||||
## Windows Guest 设置
|
||||
|
||||
- install win10 guest 正常安装虚拟机
|
||||
- you can add sriov gpu 可以添加虚拟显卡
|
||||
- disable balloon 关闭内存共享
|
||||
- OVMF UEFI boot 必须使用 UEFI 启动
|
||||
- q35 chips 必须使用q35芯片组
|
||||
- SR-IOV GPU could be set primary GPU after install intel gpu drivers 安装驱动以后才能设置成主显卡,注意此时的vnc就不可用了,搞好网络设置和 rdp 再这么干
|
||||
- SR-IOV GPU must set pci-Express 这么做会不会出现 43 bug!这样在windows guest 里面的pci 地址会和host一致,这样不会出错,我试了好久。如果不这么设置会出现43错误,要重新启用显卡才能清除错误!我记得gvt 就不会影响,这个应该是系统的bug!
|
||||
|
||||
安装好虚拟机以后 ,进去设置好远程桌面,装好显卡驱动!就完成了!
|
||||
|
||||
After installed windows vm, must set rd desktop or other remote desk, then install new intel gpu driver.
|
||||
|
||||
|
||||
|
||||
+118
@@ -0,0 +1,118 @@
|
||||
# N00 内核补丁
|
||||
|
||||
这个小主机需要打两个补丁,一个是关于显卡 `sriov` 的补丁,另外一个是关于风扇的补丁 `IT87`.
|
||||
|
||||
- 显卡补丁 `i915-sriov-dkms` 这个在上篇已经介绍了。
|
||||
- 风扇 `IT87` 补丁
|
||||
|
||||
项目都在github,大家搜索可以下到,为了比较懒的小伙伴,我计划把修改好的内核上传到github,大家可以直接下载到,再做个脚本文件,全自动化也不是不可以,一键脚本?
|
||||
|
||||
## IT87 补丁
|
||||
|
||||
这篇主要介绍风扇驱动的 `it87` 补丁, 下载关键字:`a1wong/it87`
|
||||
|
||||
- 下载补丁
|
||||
- 安装补丁
|
||||
|
||||
```
|
||||
Building & Installing
|
||||
---------------------
|
||||
|
||||
* make clean
|
||||
* make
|
||||
* sudo make install
|
||||
|
||||
|
||||
Using DKMS
|
||||
----------
|
||||
|
||||
To install:
|
||||
|
||||
* sudo make dkms
|
||||
|
||||
To remove:
|
||||
|
||||
* sudo make dkms_clean
|
||||
```
|
||||
|
||||
### 搞完了以后还需要添加一个驱动启用文件
|
||||
|
||||
编辑 `/etc/modules-load.d/it87.conf`
|
||||
|
||||
添加 `it87`
|
||||
|
||||
大家可以用我提供的现成的命令执行:
|
||||
|
||||
`echo "it87" > /etc/modules-load.d/it87.conf`
|
||||
|
||||
### 还是常规,更新initramfs
|
||||
|
||||
`Update-initramfs -u -k all`
|
||||
|
||||
### 重启
|
||||
|
||||
`reboot`
|
||||
|
||||
## 检查是否成功
|
||||
|
||||
检查驱动是否加载
|
||||
|
||||
`lsmod | grep it87`
|
||||
|
||||
需要先安装 `lm-sensors`
|
||||
|
||||
- 安装
|
||||
|
||||
`apt install lm-sensor`
|
||||
|
||||
- 传感器检测
|
||||
|
||||
`sensors-detect --auto`
|
||||
|
||||
- 如果内核补丁打好了,就会如下显示:
|
||||
|
||||
注意会出现 `fan`也就是风扇.
|
||||
|
||||
`fan2: 514 RPM (min = 10 RPM)`
|
||||
|
||||
如果没打补丁,会检测不到风扇。
|
||||
|
||||
```
|
||||
# sensors
|
||||
coretemp-isa-0000 # cpu 核心温度
|
||||
Adapter: ISA adapter
|
||||
Package id 0: +46.0°C (high = +105.0°C, crit = +105.0°C)
|
||||
Core 0: +43.0°C (high = +105.0°C, crit = +105.0°C)
|
||||
Core 1: +43.0°C (high = +105.0°C, crit = +105.0°C)
|
||||
Core 2: +43.0°C (high = +105.0°C, crit = +105.0°C)
|
||||
Core 3: +43.0°C (high = +105.0°C, crit = +105.0°C)
|
||||
|
||||
nvme-pci-0500 # 这里是 nvme 的温度
|
||||
Adapter: PCI adapter
|
||||
Composite: +43.9°C (low = -273.1°C, high = +89.8°C)
|
||||
(crit = +94.8°C)
|
||||
Sensor 1: +44.9°C (low = -273.1°C, high = +65261.8°C)
|
||||
Sensor 2: +49.9°C (low = -273.1°C, high = +65261.8°C)
|
||||
|
||||
it8613-isa-0a30 # 这里IT87传感器,我们打补丁的目的,风扇速度啥的出来了!
|
||||
Adapter: ISA adapter
|
||||
in0: 748.00 mV (min = +2.50 V, max = +0.66 V) ALARM
|
||||
in1: 1.20 V (min = +0.89 V, max = +1.67 V)
|
||||
in2: 2.01 V (min = +2.20 V, max = +0.04 V) ALARM
|
||||
in4: 2.02 V (min = +0.08 V, max = +0.02 V) ALARM
|
||||
in5: 1.99 V (min = +0.40 V, max = +0.57 V) ALARM
|
||||
3VSB: 3.28 V (min = +3.76 V, max = +2.31 V) ALARM
|
||||
Vbat: 2.73 V
|
||||
+3.3V: 3.28 V
|
||||
fan2: 514 RPM (min = 10 RPM) # 风扇转速
|
||||
fan3: 0 RPM (min = 13 RPM) ALARM
|
||||
temp1: +54.0°C (low = +49.0°C, high = -87.0°C) ALARM sensor = thermal diode
|
||||
temp2: +44.0°C (low = -2.0°C, high = +124.0°C) sensor = thermal diode
|
||||
temp3: +54.0°C (low = +35.0°C, high = +48.0°C) ALARM
|
||||
intrusion0: ALARM
|
||||
```
|
||||
|
||||
#### 很显然我这个已经成功了!
|
||||
|
||||
# 感谢阅读
|
||||
|
||||
@@ -0,0 +1,308 @@
|
||||
# N100 玩转指南
|
||||
|
||||
- 安装PVE
|
||||
- 搞定硬件直通
|
||||
- 十二代CPU的显卡 SR-IOV
|
||||
|
||||
## 安装PVE
|
||||
|
||||
### 制作安装介质
|
||||
|
||||
- 下载 PVE 最新版 iso
|
||||
|
||||
- 制作安装介质
|
||||
|
||||
- GNU Linux
|
||||
|
||||
```
|
||||
# dd bs=1M conv=fdatasync if=./proxmox-ve_*.iso of=/dev/XYZ
|
||||
```
|
||||
|
||||
- MacOS
|
||||
|
||||
打开Terminal
|
||||
|
||||
转换 `.iso` 文件到 `.dmg` 用这个 `hdiutil`
|
||||
|
||||
```
|
||||
# hdiutil convert proxmox-ve_*.iso -format UDRW -o proxmox-ve_*.dmg
|
||||
```
|
||||
|
||||
获取磁盘序列
|
||||
|
||||
```
|
||||
# diskutil list
|
||||
```
|
||||
|
||||
卸载需要写入的U盘
|
||||
|
||||
```
|
||||
# diskutil list
|
||||
# diskutil unmountDisk /dev/diskX
|
||||
```
|
||||
|
||||
dd 制作启动盘
|
||||
|
||||
```
|
||||
# sudo dd if=proxmox-ve_*.dmg bs=1M of=/dev/rdiskX
|
||||
```
|
||||
|
||||
- Windows
|
||||
|
||||
用 rufus 工具
|
||||
|
||||
- 开始安装
|
||||
- BIOS 设置U盘启动
|
||||
- 进入启动菜单
|
||||
- 图形安装方式
|
||||
- Console安装方式
|
||||
## 开启硬件直通
|
||||
- 添加PVE源 apt list
|
||||
|
||||
```
|
||||
echo "deb http://download.proxmox.com/debian/pve bookworm pve-no-subscription" \
|
||||
> /etc/apt/sources.list.d/pve.list
|
||||
apt update
|
||||
```
|
||||
|
||||
- BIOS 相关设置
|
||||
|
||||
- 开启VT-d
|
||||
- IOMMU
|
||||
- VT-x
|
||||
|
||||
- 添加 kernel cmdline
|
||||
|
||||
- Grub 设置
|
||||
|
||||
编辑 `/etc/default/grub`
|
||||
```
|
||||
GRUB_CMDLINE_LINUX_DEFAULT="quite"
|
||||
```
|
||||
|
||||
```
|
||||
GRUB_CMDLINE_LINUX_DEFAULT="intel_iommu=on iommu=pt pci_pt_e820_access=on pci=assign-busses pcie_acs_override=downstream"
|
||||
```
|
||||
|
||||
- kernel 内核模块设置
|
||||
|
||||
```
|
||||
#!/bin/sh
|
||||
cat >> /etc/modules-load.d/vfio.conf << EOF
|
||||
vfio
|
||||
vfio_iommu_type1
|
||||
vfio_pci
|
||||
vfio_virqfd
|
||||
EOF
|
||||
```
|
||||
|
||||
- 添加相应参数
|
||||
|
||||
添加 参数到 `/etc/modprobe.d/vfio.conf`
|
||||
|
||||
```
|
||||
echo "options vfio_iommu_type1 allow_unsafe_interrupts=1" \
|
||||
> /etc/modprobe.d/vfio.conf
|
||||
```
|
||||
|
||||
- 更新 grub & initramfs
|
||||
|
||||
```
|
||||
# update-initramfs -u -k all
|
||||
# update-grub
|
||||
# proxmox-boot-tool refresh
|
||||
```
|
||||
|
||||
- 检查IOMMU 是否设置成功
|
||||
|
||||
```
|
||||
dmesg | grep -e DMAR -e IOMMU
|
||||
```
|
||||
|
||||
输出类似如下
|
||||
|
||||
```
|
||||
[ 0.000000] Warning: PCIe ACS overrides enabled; This may allow non-IOMMU protected peer-to-peer DMA
|
||||
[ 0.007697] ACPI: DMAR 0x0000000079195C18 0000A8 (v01 INTEL EDK2 00000002 01000013)
|
||||
[ 0.007741] ACPI: Reserving DMAR table memory at [mem 0x79195c18-0x79195cbf]
|
||||
[ 0.130354] DMAR: IOMMU enabled
|
||||
[ 0.388873] DMAR: Host address width 39
|
||||
[ 0.389091] DMAR: DRHD base: 0x000000fed90000 flags: 0x0
|
||||
[ 0.389318] DMAR: dmar0: reg_base_addr fed90000 ver 1:0 cap 1c0000c40660462 ecap 19e2ff0505e
|
||||
```
|
||||
|
||||
`DMAR: IOMMU enabled` 注意输出有这个就是成功了!
|
||||
|
||||
- 由于N100主机只支持 EFI启动,我遇到最大的坑就在这里
|
||||
|
||||
> 我用的是zfs文件系统,PVE在EFI启动过程使用的是systemd-boot,没有使用grub,所以上面添加 kernel cmdline的方法是不管用的,需要修改loader.conf
|
||||
|
||||
- Systems-boot kernel cmdline 修改
|
||||
|
||||
修改 `/etc/kernel/cmdline`
|
||||
|
||||
```
|
||||
# cat /etc/kernel/cmdline
|
||||
root=ZFS=rpool/ROOT/pve-1 boot=zfs intel_iommu=on iommu=pt pci_pt_e820_access=on pci=assign-busses pcie_acs_override=downstream,multifunction
|
||||
```
|
||||
|
||||
```
|
||||
# update-initramfs -u -k all
|
||||
```
|
||||
|
||||
|
||||
|
||||
# 显卡SR-IOV
|
||||
|
||||
## 安装内核工具
|
||||
|
||||
`apt install build-* dkms`
|
||||
|
||||
## 下载内核补丁
|
||||
|
||||
注意:内核补丁还在测试,不建议用在生产环境
|
||||
|
||||
下载github源码 `i915-sriov-dkms`
|
||||
|
||||
进入下载的目录,修改`PACKAGE_NAME` to `i915-sriov-dkms`, 修改 `PACKAGE_VERSION` to `6.2`. 保存文件。
|
||||
|
||||
目前PVE的内核用的是 6.2
|
||||
|
||||
```
|
||||
# uname -ar
|
||||
Linux n100 6.2.16-3-pve #1 SMP PREEMPT_DYNAMIC PVE 6.2.16-3 (2023-06-17T05:58Z) x86_64 GNU/Linux
|
||||
```
|
||||
|
||||
## 拷贝这个目录到 `/usr/src/i915-sriov-dkms-6.2`
|
||||
|
||||
## 安装dkms模块
|
||||
|
||||
`dkms -i -m i915-sriov-dkms -v 6.2`
|
||||
|
||||
## 安装 `sysfsutils`
|
||||
|
||||
`echo "devices/pci0000:00/0000:00:02.0/sriov_numvfs = 7" > /etc/sysfs.conf`
|
||||
|
||||
## 修改内核参数
|
||||
|
||||
这里vfs就是虚拟显卡的数量,最大多少我没查,这里我设置的是3。
|
||||
|
||||
```
|
||||
intel_iommu=on i915.enable_guc=3 i915.max_vfs=3
|
||||
```
|
||||
|
||||
- grub
|
||||
|
||||
修改 `/etc/defautl/grub` 添加到 `GRUB_CMDLINE_LINUX_DEFAULT="quite"`这句里面
|
||||
|
||||
- Systems-boot
|
||||
|
||||
我用的zfs 所以修改是这种方式
|
||||
|
||||
`/etc/kernel/cmdline`修改成
|
||||
|
||||
```
|
||||
root=ZFS=rpool/ROOT/pve-1 boot=zfs intel_iommu=on iommu=pt i915.enable_guc=3 i915.max_vfs=3 pci_pt_e820_access=on pci=assign-busses pcie_acs_override=downstream,multifunction
|
||||
```
|
||||
|
||||
## 更新内核和 initramfs
|
||||
|
||||
`update-initramfs -u -k all`
|
||||
|
||||
`proxmox-boot-tool refresh`
|
||||
|
||||
## 锁定内核
|
||||
|
||||
**由于最新的内核没有headers提供,为了避免更新把这个内核顶了,我们要锁定目前编译好的内核!**
|
||||
|
||||
`# proxmox-boot-tool kernel pin 6.2.16-3-pve`
|
||||
|
||||
## 重启
|
||||
|
||||
`reboot`
|
||||
|
||||
## 检查是否显卡 SR-IOV是否成功
|
||||
|
||||
`lcpci |grep -i vga`
|
||||
|
||||
**输出如下,就是成功了!**
|
||||
|
||||
```
|
||||
00:02.0 VGA compatible controller: Intel Corporation Alder Lake-N [UHD Graphics]
|
||||
00:02.1 VGA compatible controller: Intel Corporation Alder Lake-N [UHD Graphics]
|
||||
00:02.2 VGA compatible controller: Intel Corporation Alder Lake-N [UHD Graphics]
|
||||
00:02.3 VGA compatible controller: Intel Corporation Alder Lake-N [UHD Graphics]
|
||||
```
|
||||
|
||||
**或者如下输出,看到我的已经开启了3个虚拟显卡**
|
||||
|
||||
```
|
||||
# dmesg | grep i915
|
||||
[ 0.000000] Command line: initrd=\EFI\proxmox\6.2.16-3-pve\initrd.img-6.2.16-3-pve root=ZFS=rpool/ROOT/pve-1 boot=zfs intel_iommu=on iommu=pt i915.enable_guc=3 i915.max_vfs=3 pci_pt_e820_access=on pci=assign-busses pcie_acs_override=downstream,multifunction
|
||||
[ 0.077241] Kernel command line: initrd=\EFI\proxmox\6.2.16-3-pve\initrd.img-6.2.16-3-pve root=ZFS=rpool/ROOT/pve-1 boot=zfs intel_iommu=on iommu=pt i915.enable_guc=3 i915.max_vfs=3 pci_pt_e820_access=on pci=assign-busses pcie_acs_override=downstream,multifunction
|
||||
[ 4.811959] i915 0000:00:02.0: Running in SR-IOV PF mode
|
||||
[ 4.812864] i915 0000:00:02.0: [drm] VT-d active for gfx access
|
||||
[ 4.813302] i915 0000:00:02.0: vgaarb: deactivate vga console
|
||||
[ 4.813362] i915 0000:00:02.0: [drm] Using Transparent Hugepages
|
||||
[ 4.813758] i915 0000:00:02.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=io+mem:owns=io+mem
|
||||
[ 4.814738] mei_hdcp 0000:00:16.0-b638ab7e-94e2-4ea2-a552-d1c54b627f04: bound 0000:00:02.0 (ops i915_hdcp_component_ops [i915])
|
||||
[ 4.815136] i915 0000:00:02.0: Direct firmware load for i915/adlp_dmc.bin failed with error -2
|
||||
[ 4.817242] i915 0000:00:02.0: [drm] Finished loading DMC firmware i915/adlp_dmc_ver2_16.bin (v2.16)
|
||||
[ 4.822141] i915 0000:00:02.0: [drm] GT0: GuC firmware i915/tgl_guc_70.bin version 70.5.1
|
||||
[ 4.822154] i915 0000:00:02.0: [drm] GT0: HuC firmware i915/tgl_huc.bin version 7.9.3
|
||||
[ 4.827027] i915 0000:00:02.0: [drm] GT0: HuC: authenticated for all workloads!
|
||||
[ 4.827569] i915 0000:00:02.0: [drm] GT0: GUC: submission enabled
|
||||
[ 4.827574] i915 0000:00:02.0: [drm] GT0: GUC: SLPC enabled
|
||||
[ 4.827921] i915 0000:00:02.0: [drm] GuC RC: enabled
|
||||
[ 4.828778] mei_pxp 0000:00:16.0-fbf6fcf1-96cf-4e2e-a6a6-1bab8cbe36b1: bound 0000:00:02.0 (ops i915_pxp_tee_component_ops [i915])
|
||||
[ 4.828956] i915 0000:00:02.0: [drm] Protected Xe Path (PXP) protected content support initialized
|
||||
[ 4.854926] [drm] Initialized i915 1.6.0 20201103 for 0000:00:02.0 on minor 0
|
||||
[ 4.856871] snd_hda_intel 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
|
||||
[ 4.857105] i915 0000:00:02.0: 3 VFs could be associated with this PF
|
||||
[ 4.887664] fbcon: i915drmfb (fb0) is primary device
|
||||
[ 4.972789] i915 0000:00:02.0: [drm] fb0: i915drmfb frame buffer device
|
||||
[ 5.638917] i915 0000:00:02.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=none:owns=io+mem
|
||||
[ 5.639816] i915 0000:00:02.1: enabling device (0000 -> 0002)
|
||||
[ 5.640648] i915 0000:00:02.1: Running in SR-IOV VF mode
|
||||
[ 5.641809] i915 0000:00:02.1: [drm] GT0: GUC: interface version 0.1.0.0
|
||||
[ 5.643254] i915 0000:00:02.1: [drm] VT-d active for gfx access
|
||||
[ 5.644017] i915 0000:00:02.1: [drm] Using Transparent Hugepages
|
||||
[ 5.645371] i915 0000:00:02.1: [drm] GT0: GUC: interface version 0.1.0.0
|
||||
[ 5.646658] i915 0000:00:02.1: GuC firmware PRELOADED version 1.0 submission:SR-IOV VF
|
||||
[ 5.647370] i915 0000:00:02.1: HuC firmware PRELOADED
|
||||
[ 5.650198] i915 0000:00:02.1: [drm] Protected Xe Path (PXP) protected content support initialized
|
||||
[ 5.650917] i915 0000:00:02.1: [drm] PMU not supported for this GPU.
|
||||
[ 5.651749] [drm] Initialized i915 1.6.0 20201103 for 0000:00:02.1 on minor 1
|
||||
[ 5.656497] i915 0000:00:02.0: vgaarb: changed VGA decodes: olddecodes=none,decodes=none:owns=io+mem
|
||||
[ 5.657170] i915 0000:00:02.1: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=none:owns=none
|
||||
[ 5.657938] i915 0000:00:02.2: enabling device (0000 -> 0002)
|
||||
[ 5.658678] i915 0000:00:02.2: Running in SR-IOV VF mode
|
||||
[ 5.659806] i915 0000:00:02.2: [drm] GT0: GUC: interface version 0.1.0.0
|
||||
[ 5.661509] i915 0000:00:02.2: [drm] VT-d active for gfx access
|
||||
[ 5.662199] i915 0000:00:02.2: [drm] Using Transparent Hugepages
|
||||
[ 5.663417] i915 0000:00:02.2: [drm] GT0: GUC: interface version 0.1.0.0
|
||||
[ 5.665322] i915 0000:00:02.2: GuC firmware PRELOADED version 1.0 submission:SR-IOV VF
|
||||
[ 5.665956] i915 0000:00:02.2: HuC firmware PRELOADED
|
||||
[ 5.668308] i915 0000:00:02.2: [drm] Protected Xe Path (PXP) protected content support initialized
|
||||
[ 5.668947] i915 0000:00:02.2: [drm] PMU not supported for this GPU.
|
||||
[ 5.669666] [drm] Initialized i915 1.6.0 20201103 for 0000:00:02.2 on minor 2
|
||||
[ 5.673931] i915 0000:00:02.0: vgaarb: changed VGA decodes: olddecodes=none,decodes=none:owns=io+mem
|
||||
[ 5.674572] i915 0000:00:02.1: vgaarb: changed VGA decodes: olddecodes=none,decodes=none:owns=none
|
||||
[ 5.675219] i915 0000:00:02.2: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=none:owns=none
|
||||
[ 5.675964] i915 0000:00:02.3: enabling device (0000 -> 0002)
|
||||
[ 5.676640] i915 0000:00:02.3: Running in SR-IOV VF mode
|
||||
[ 5.677500] i915 0000:00:02.3: [drm] GT0: GUC: interface version 0.1.0.0
|
||||
[ 5.678512] i915 0000:00:02.3: [drm] VT-d active for gfx access
|
||||
[ 5.679186] i915 0000:00:02.3: [drm] Using Transparent Hugepages
|
||||
[ 5.680354] i915 0000:00:02.3: [drm] GT0: GUC: interface version 0.1.0.0
|
||||
[ 5.681176] i915 0000:00:02.3: GuC firmware PRELOADED version 1.0 submission:SR-IOV VF
|
||||
[ 5.681765] i915 0000:00:02.3: HuC firmware PRELOADED
|
||||
[ 5.684137] i915 0000:00:02.3: [drm] Protected Xe Path (PXP) protected content support initialized
|
||||
[ 5.684777] i915 0000:00:02.3: [drm] PMU not supported for this GPU.
|
||||
[ 5.685487] [drm] Initialized i915 1.6.0 20201103 for 0000:00:02.3 on minor 3
|
||||
[ 5.686338] i915 0000:00:02.0: Enabled 3 VFs
|
||||
```
|
||||
|
||||
# 感谢阅读
|
||||
|
||||
今天就到这里了,至于虚拟机如何使用这个显卡,后续再更新!
|
||||
@@ -0,0 +1,133 @@
|
||||
# 没有IPv4公网,Plex 设置 IPv6访问
|
||||
|
||||
## 准备条件
|
||||
- domain name 你需要有域名一枚
|
||||
- 公网IPv6地址 IPv6 address
|
||||
- 证书获取工具 推荐使用 acme.sh
|
||||
|
||||
## 主机环境 Host is PVE
|
||||
|
||||
|
||||
|
||||
### 安装 acme.sh Install acme.sh
|
||||
|
||||
- 命令
|
||||
|
||||
curl https://get.acme.sh | sh -s email=my@example.com
|
||||
|
||||
- 添加 acme.sh 启动环境,安装 acme.sh 到 home 目录下
|
||||
|
||||
`~/.acme.sh/`
|
||||
|
||||
- 并创建 一个 shell 的 alias, 例如 .bashrc,方便你的使用:
|
||||
`alias acme.sh=~/.acme.sh/acme.sh`
|
||||
|
||||
- 启用环境
|
||||
|
||||
`source .bashrc`
|
||||
### 生成证书
|
||||
|
||||
- 手动 dns 方式
|
||||
|
||||
```
|
||||
这种方式的好处是, 你不需要任何服务器, 不需要任何公网 ip, 只需要 dns 的解析记录即可 完成验证. 坏处是,如果不同时配置 Automatic DNS API,使用这种方式 acme.sh 将无法 自动更新证书,每次都需要手动再次重新解析验证域名所有权。
|
||||
```
|
||||
|
||||
```
|
||||
acme.sh --issue --dns -d mydomain.com \
|
||||
--yes-I-know-dns-manual-mode-enough-go-ahead-please
|
||||
```
|
||||
然后, acme.sh 会生成相应的解析记录显示出来, 你只需要在你的域名管理面板中添加这条 txt 记录即可.
|
||||
|
||||
等待解析完成之后, 重新生成证书:
|
||||
|
||||
```
|
||||
acme.sh --renew -d mydomain.com \
|
||||
--yes-I-know-dns-manual-mode-enough-go-ahead-please
|
||||
|
||||
```
|
||||
|
||||
注意第二次这里用的是 --renew
|
||||
|
||||
dns 方式的真正强大之处在于可以使用域名解析商提供的 api 自动添加 txt 记录完成验证.
|
||||
|
||||
|
||||
|
||||
- api 认证方式
|
||||
|
||||
**acme.sh** 目前支持 cloudflare, dnspod, cloudxns, godaddy 以及 ovh 等数十种解析商的自动集成.
|
||||
|
||||
以 dnspod 为例, 由于我用的 dnspod 的域名服务。 你需要先登录到 dnspod 账号, 生成你的 api id 和 api key, 都是免费的. 然后:
|
||||
|
||||
```
|
||||
export DP_Id="1234"
|
||||
|
||||
export DP_Key="sADDsdasdgdsf"
|
||||
|
||||
acme.sh --issue --dns dns_dp -d aa.com -d www.aa.com
|
||||
|
||||
```
|
||||
|
||||
证书就会自动生成了. 这里给出的 api id 和 api key 会被自动记录下来, 将来你在使用 dnspod api 的时候, 就不需要再次指定了. 直接生成就好了:
|
||||
|
||||
```
|
||||
acme.sh --issue -d mydomain2.com --dns dns_dp
|
||||
```
|
||||
|
||||
- copy/安装 证书
|
||||
|
||||
注意, 默认生成的证书都放在安装目录下: `~/.acme.sh/`, 请不要直接使用此目录下的文件, 例如: 不要直接让 nginx/apache 的配置文件使用这下面的文件. 这里面的文件都是内部使用, 而且目录结构可能会变化.
|
||||
|
||||
正确的使用方法是使用 `--install-cert` 命令,并指定目标位置, 然后证书文件会被copy到相应的位置, 例如:
|
||||
|
||||
## Apache example:
|
||||
|
||||
```
|
||||
acme.sh --install-cert -d example.com \
|
||||
--cert-file /path/to/certfile/in/apache/cert.pem \
|
||||
--key-file /path/to/keyfile/in/apache/key.pem \
|
||||
--fullchain-file /path/to/fullchain/certfile/apache/fullchain.pem \
|
||||
--reloadcmd "service apache2 force-reload"
|
||||
```
|
||||
|
||||
|
||||
|
||||
## Plex 证书准备
|
||||
|
||||
- 自定义域支持 PKCS #12 文件路径,其中包含启用 TLS 的证书和私钥。
|
||||
|
||||
由于 Plex 需要 PKCS#12 证书,我们需要把通过 acme.sh 获取的证书转换一下。
|
||||
|
||||
`openssl pkcs12 -export -out yourdomain.pfx -inkey yourdomain.key -in fullchain.cer`
|
||||
|
||||
**说明:**
|
||||
|
||||
```
|
||||
openssl pkcs12 --export --out 我们需要的证书 --inkey 刚获取的证书密钥 --in fullchain.cer (这个不用 变,用 acme.sh 获取的证书)
|
||||
```
|
||||
|
||||
- Plex 相关设置
|
||||
|
||||
进入设置 —— 网络 ——
|
||||
|
||||
- [x] 启动支持 IPv6 的服务器选中☑️ check in
|
||||
|
||||
- 自定义证书位置
|
||||
|
||||
- 这里填写上面一步转换获取的 pkcs#12 的证书保存位置 /your/dir/yourdomain.pfx
|
||||
|
||||
- 自定义证书加密密钥
|
||||
|
||||
- 这里填写 acme.sh 的证书私钥 /your/domain/key
|
||||
|
||||
- 自定义证书域
|
||||
|
||||
- 你的域名 yourdomain.com
|
||||
|
||||
- 自定义服务器访问 URL
|
||||
|
||||
- https://yourdomain:port
|
||||
|
||||
- 例如: https://yourdoain.com:9999
|
||||
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
|
||||
## [PVE 主机 IPv6 设置 SLAAC ](https://git.zod.wiki/ob/pve/src/branch/main/pve_vmbr_ipv6_configure.md)
|
||||
|
||||
[licence](./LICENCE)
|
||||
|
||||
## pci passthru
|
||||
|
||||
## sr-iov
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
对于家宽来说,没有静态IPv6地址的话,可以按如下方式操作:
|
||||
|
||||
# 1.方式一
|
||||
# 1.方式一 (这种方法经过我测试无效)
|
||||
|
||||
注:无需修改/etc/sysctl.conf
|
||||
|
||||
@@ -23,6 +23,8 @@ iface vmbr0 inet6 dhcp # vmbr0修改为你的网桥名称
|
||||
|
||||
在PVE的WEBUI “系统 -> 网络” 处,刷新后点击“应用配置”即可生效,等待几分钟后即可获取到IPv6地址,输入ip -6 a show vmbr0(vmbr0为网桥名称)可查看IPv6地址。
|
||||
|
||||
|
||||
|
||||
# 2.方式二
|
||||
|
||||
查看内核也已经开启ipv6自动配置:
|
||||
|
||||
Reference in New Issue
Block a user