C:\WINDOWS\system32>wmic diskdrive list brief
Caption ? DeviceID Model Partitions? Size
LITEON CV8-8E256? \\.\PHYSICALDRIVE0? LITEON CV8-8E256? 6 ? 256052966400
2. 把Virtual Box的安裝路徑添加到PATH環境變量裏面,為了能夠使用VBoxManage創建物理硬盤映射出來的虛擬硬盤;
3. 查看指定物理硬盤分區信息:
C:\WINDOWS\system32>VBoxManage internalcommands listpartitions -rawdisk \\.\PhysicalDrive0
Number? Type? StartCHS ? EndCHS ? Size (MiB)? Start (Sect)
1 ? 0x00? 0? /0? /0? 0? /0? /0 100 2048
2 ? 0x00? 0? /0? /0? 0? /0? /0 16 ? 206848
3 ? 0x00? 0? /0? /0? 0? /0? /0 ? 81920 ? 239616
4 ? 0x00? 0? /0? /0? 0? /0? /0 150180 168011776
5 ? 0x00? 0? /0? /0? 0? /0? /0 512 475580416
6 ? 0x00? 0? /0? /0? 0? /0? /0 ? 10445 476628992
7 ? 0x00? 0? /0? /0? 0? /0? /0 ? 1024 498020352
4. 創建物理硬盤映射出的虛擬硬盤: VBoxManage internalcommands createrawvmdk -filename "</path/to/your/virtual/disk/file>" -rawdisk "<DeviceID>"
1. VBoxManage internalcommands createrawvmdk -filename "test.vmdk" -rawdisk "\\.\PhysicalDrive0"