Thursday 20 June 2013

creating a vhd with diskpart

Start a cmd prompt as administrator

DISKPART

CREATE VDISK FILE=”c:\myvhd.vhd” MAXIMUM=20000
Maximum is the size in MB

SELECT VDISK FILE=”c:\myvhd.vhd”

ATTACH VDISK

CREATE PARTITION PRIMARY

ASSIGN LETTER=X

FORMAT QUICK LABEL=MYVHD

EXIT

Now you can copy stuff onto it in my computer. Then detach the vhd and attach it to your VM in hyper-v. This can be useful for moving files on and off a VM. Or just creating an OS VHD.

No comments:

Post a Comment