其实很简单 先用SSH链接PVE 执行命令

root@pve:~#ls /dev/disk/by-id  查看硬盘设备列表
ata-ADATA_SP580_2L1029AQ7HDU  //硬盘的ID
ata-ADATA_SP580_2L1029AQ7HDU-part1
ata-ADATA_SP580_2L1029AQ7HDU-part2
ata-Asgard_AS500GS3-S7_002106219318 //硬盘id都是这样的
ata-Asgard_AS500GS3-S7_002106219318-part1
ata-Asgard_AS500GS3-S7_002106219318-part2
ata-Asgard_AS500GS3-S7_002106219318-part3
ata-WDC_WD30EFRX-68EUZN0_WD-WCC4N7YCUZXR
ata-WDC_WD30EFRX-68EUZN0_WD-WCC4N7YCUZXR-part1
ata-WDC_WD30EFRX-68EUZN0_WD-WCC4N7YCUZXR-part2
ata-WDC_WD5003ABYZ-011FA0_WD-WCAV9Z018244
ata-WDC_WD5003ABYZ-011FA0_WD-WCAV9Z018244-part1
ata-WDC_WD5003ABYZ-011FA0_WD-WCAV9Z018244-part2
dm-name-pve-root
dm-name-pve-swap
dm-name-pve-vm--100--disk--0
dm-name-pve-vm--101--disk--0
dm-uuid-LVM-6cYcZdK0BrsazMOa7lAbS6Tn5ixSpdhQEaHHCReCHHNlkSdkFnMf0gI2fJx3H7W2
dm-uuid-LVM-6cYcZdK0BrsazMOa7lAbS6Tn5ixSpdhQIP6wEp3DeEdHw9XHG2xQxItQ42BbslCm
dm-uuid-LVM-6cYcZdK0BrsazMOa7lAbS6Tn5ixSpdhQKU3g6wW3FhGhKsm6U3pU3Pyl1ohbSk6p
dm-uuid-LVM-6cYcZdK0BrsazMOa7lAbS6Tn5ixSpdhQMGbNJp3OYSh0p3mL1XDMNmQlh2qRlTdl
lvm-pv-uuid-dz0tnB-6DSs-xshW-PTfH-4Jkl-niD0-3rlhMT
wwn-0x5000000000000000
wwn-0x5000000000000000-part1
wwn-0x5000000000000000-part2
wwn-0x5000000000000153
wwn-0x5000000000000153-part1
wwn-0x5000000000000153-part2
wwn-0x5000000000000153-part3
wwn-0x50014ee2b2312449
wwn-0x50014ee2b2312449-part1
wwn-0x50014ee2b2312449-part2
wwn-0x50014ee2b75d1dee
wwn-0x50014ee2b75d1dee-part1
wwn-0x50014ee2b75d1dee-part2
root@pve:~# qm set ^C
//qm set PVE虚拟机编号 -PVE里面的硬盘序号 /dev/disk/by-id/硬盘id
root@pve:~# qm set 101 -sata1 /dev/disk/by-id/ata-WDC_WD5003ABYZ-011FA0_WD-WCAV9Z018244
update VM 101: -sata1 /dev/disk/by-id/ata-WDC_WD5003ABYZ-011FA0_WD-WCAV9Z018244
root@pve:~# qm set 101 -sata1 /dev/disk/by-id/ata-ADATA_SP580_2L1029AQ7HDU
update VM 101: -sata1 /dev/disk/by-id/ata-ADATA_SP580_2L1029AQ7HDU
root@pve:~# qm set 101 -sata2 /dev/disk/by-id/ata-WDC_WD30EFRX-68EUZN0_WD-WCC4N7YCUZXR
update VM 101: -sata2 /dev/disk/by-id/ata-WDC_WD30EFRX-68EUZN0_WD-WCC4N7YCUZXR
root@pve:~#
Last modification:November 7, 2021
反正也没人会打赏