免費 P2V 軟體 Disk2vhd 將實體作業系統轉虛擬檔 for VirtualBox

使用微軟提供的免費軟體 Disk2vhd 來將「實體作業系統」轉換成 VHDX 或 VHD 虛擬檔,再透過 VirtualBox 提供的指令將 VHDX 或 VHD 轉檔成 VirtualBox 相容的 vdi 虛擬檔。
將實體作業系統轉虛擬檔,統稱為 P2V 或 p-to-v (實體轉虛擬)」
Disk2vhd 軟體
下載
點擊 Disk2vhd - Windows Sysinternals | Microsoft Docs 下載,它是一套免安裝軟體,因此下載完成後解壓縮即可使用。
實體轉虛擬
開啟 Disk2vhd,許可聲明直接點擊 Agree 即可:

選擇產生的虛擬檔要儲存的路徑 > 點擊 Create 開始製作:
虛擬檔儲存路徑,必須是沒有勾選的 Volume
產生虛擬檔需一段較長的時間


產生虛擬檔完成:

VirtualBox
虛擬檔轉檔
Disk2vhd 產生的虛擬檔是 .VHDX 或 .VHD,必須使用 VirtualBox 提供的指令將 .VHDX 或 .VHD 轉檔成 VirtualBox 的 .vdi 檔。
打開命令提示字元,進入 VirtualBox 程式目錄:
CD "C:\Program Files\Oracle\VirtualBox"
執行 VirtualBox 的轉檔指令:
轉檔過程約需 10~20mins
VboxManage.exe clonehd "原始檔案路徑\檔案.VHDX" "轉檔後存放路徑\檔名.vdi" –format vdi

轉檔完成畫面:

掛載虛擬檔
「新增」一個新的虛擬機器:
類型與版本,必須與虛擬檔一致


這時 VirtualBox 會在預設路徑自動建立一個與「名稱」相同的目錄,將要掛載的「虛擬檔」剪下並貼上至該目錄:

- 選擇「使現有虛擬硬碟檔案」。
- 選擇要掛載的虛擬檔 (就是剛貼上的「虛擬檔」)。
- 建立。

「啟動」虛擬機器:

如果沒遇到什麼問題,就能順利運行系統:

參考

本著作係採用創用 CC 姓名標示-相同方式分享 3.0 台灣 授權條款授權.
hi 你好,謝謝你提供方法與語法,不過這邊少了一個 "-" VboxManage.exe clonehd "原始檔案路徑\檔案.VHDX" "轉檔後存放路徑\檔名.vdi" –format vdi
謝謝你的分享。
非常感謝您的提醒。
VirtualBox本身就支持.vhd,但不支持.vhdx就是了
是哦!有可能當初掛載失敗或版本較舊還沒支援。
感謝!
可以在本來作業中的xp和應用程式變成iso,掛在到win10裡面的p2v嗎
抱歉,這我就沒試過了,如您嘗試成功在分享唷!