PDA

View Full Version : How to use DISKPART to mount a .VHD file (With Screenshots)


MrThrall
08-05-2017, 10:04 PM
Ok, so to beginners, this will look sorta Complicated, but trust me when I say that it's easier than it looks.

Shoutout to "zirkoni" for telling me about this method :D

Ok lets get on with it, shall we? :max:

Step 1: Opening "command prompt"

Simple enough, right?

https://hejsmw-ch3302.files.1drv.com/y4mJ81YBMWn6JV29FUGgdhVt0PgGW8uR2Hx-80BZ39DWEQGrFqicww1IVmNgyfVsko8STa3wMikKOq4Xp6eHVq EObGoGzsrEamr7tcnkL0C3dtZJDLepbdEFQ2d5zkrPBEjylFP7 55uKKtJXst6n8e8zTb6LcHkYmxltGlYMvCbWNt1P4XKogv_CPv 6b8SHO1j0vHQfiJ9tKUePrl-5I0_cAg?width=1024&height=576&cropmode=none

Step 2: Navigate to "C:\WINDOWS\System32" and run "DISKPART"

Again, simple enough. just use these commands:


"cd .." x2
"cd Windows"
"cd System32"
"DISKPART"


Sorry for the cluttered desktop BTW, I'm a heavy user.

https://hujsmw-ch3302.files.1drv.com/y4mO8I5HRdUHcKSKctA3TPtgBcs4K08b3vJ0HftgfFGrdQ7wjM exv8aVjh--D7FCeM6KCsB2eAEwH6HCWQ7keK_RlybHRr7wmSTgfQ71cLddX0 4Q3Cud8mOLrxeHoJLSprGZv-ztzEGDnz0x7Cn4EqzHDhdosX2JLrOIWJkY0AjafHB1HZ0s1Lx6 Z5AlXmculbiBsQlDAcqgCEba8rAinnJ7A?width=1024&height=576&cropmode=none

Now one of 2 things should happen:

If you ran 'Command Prompt" as an Administrator, "Diskpart" should start in the command prompt window without any hassle.

https://epjsmw-ch3302.files.1drv.com/y4mKufkFBWe94iHjeeMHc7r84eNlDlenlcUNiFcOTQfwS3spMG Y6RD-JHlbgGrd4AFnjM3c6x5njpE5cPsgBqEH1T7ZlOZ2NDzqj02CDT NyiUnSWFCpURDNCMgROBL8YkrASH-NZtyG_JpLqVY_Wzv-oRNyK2j9Oa1L_3w9XsvNKJj4HoZ9qiWxr_PP7y5gV_1ozt6Nlk jzv6RKkRbl2KhL0Q?width=1024&height=576&cropmode=none

Or if you ran it normally, you'll get a UAC or "User Account Control" window pop-up asking if you want to let DISKPART make changes to the disk... and then DISKPART should run in a separate window.

https://svzrbg-ch3302.files.1drv.com/y4mJSdW7knBPzCjyl9FDQoKZIXn7OFYvqa4RKZvCoJ9nC9rXnH bJIOaQ9wjwaGzhJKRlrZ0F0ai_iJgnKxKGrrO6itcWCM70wWq3 xp-qMEzst0OD58SZoUpTHezHCw6nB4gwlhyCAnwc-MXQul9XLuS6Rf2WRzq2pGqMoaON_NooYrWG41-bktlUjVZTSlY686Rht16-oPHlF5228U_bUIzig?width=1024&height=576&cropmode=none

https://sfzrbg-ch3302.files.1drv.com/y4m5YOOt77yMUFf_KoVBDJDeSz2cRCFoOXYTv8Sc8Uce1O7h_Z 1orTXG_7ky-9qeqCYZ6mjkMtEYOmZSaaHuppbvlgWe98lPM1BF-MmBGntcvWBWBDJanVYEs4N_5b9iwfFju4r0z47wVX5dOdD79u4 T5bM4uLkZVIn_sZbe6sLO6LuLntJv89qmIPdq-ke3tv3QhBX_wBKAUKR_lYMuTZ33w?width=1024&height=576&cropmode=none

Step 3: Selecting and Mounting the .VHD file
This is where is can look complex, but it's really easy if you've done it before.

Now I'm gonna use my newly created Windows 98 VHD in the "Virtualbox VMs" folder. Ok, my name is Carter Nugent, and I'm only telling you this because I'm sick of having to make sure my name is censored in every screenshot.
Anyways, use this command to select the VHD file:


select vdisk file="c:\Users\{Username}\VirtualBox VMs\Windows 98 SE\Windows 98 SE.vhd"


https://s1zrbg-ch3302.files.1drv.com/y4mD2Jx1MJTS79k9VuLGM29Q7v6k-ssqnK1lTlHXD_Hhd2mBWLidjydi18Wj4RleO0MMXy1PzH2FqYA Te_AQo1W-AounStooDl5rVYlDqLY49pwpNNst_d51KQv_X3kSuH-V3MJMH-u-p8L06r01exQV6SeVhO_C-1XoPcgiWe10wzSkgwoYyXKjPHttIJic5_Fs-itZlJ8gtezJ3WdUztGpA?width=1024&height=576&cropmode=none

And now it should say "DiskPart successfully selected the virtual disk file",
now from here all you need to type is:

attach vdisk


And your VHD should appear as any other drive (for me it actually popped-up as it was attached).

https://slzrbg-ch3302.files.1drv.com/y4mSmvp9VVjm7_GuZ0bJ5mZIaM1SMWmwg4BGwapn5XjMtc0Sj7 lPZUqSxhREuB5FmDebqaAZDUAsXTfgXl8mqxgAlnWlibiaFmkL japHMS3Ac1qRYEKe7v4Dn8qeD6zFVWyCtLsr_NzPzPh0V1C3yK T8EQDZQzYQXHTXARQ5OrLobbYUBl07dSaVNwufaB8QvTpC5faf zeqWzV3CDZkSxSMEw?width=1024&height=576&cropmode=none

and you're done, that was easy right?
again, special thanks "zirkoni" for telling me this method :) .