Skip to content

Instantly share code, notes, and snippets.

@piyoki
Created August 6, 2022 15:52
Show Gist options
  • Save piyoki/4b031ea3f3ad29c9b3aa3d3361a4fe5f to your computer and use it in GitHub Desktop.
Save piyoki/4b031ea3f3ad29c9b3aa3d3361a4fe5f to your computer and use it in GitHub Desktop.
# PVE 直通硬盤
---
安裝 lshw
$ apt-get install lshw -y
查詢硬盤信息
$ lshw -class disk -class storage
# 記下需要直通的硬盤 serial
$ ls -l /dev/disk/by-id | grep <serial>
# 新方法
$ ls -la /dev/disk/by-id/ | grep -v dm | grep -v lvm | grep -v part
---
直通硬盤
qm set 100 --sata1 /dev/disk/by-id/........
添加硬盤至虛擬機編號100
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment