Skip to content

Instantly share code, notes, and snippets.

@soardex
Created May 18, 2015 13:42
Show Gist options
  • Save soardex/19bf3900425f9cc82a22 to your computer and use it in GitHub Desktop.
Save soardex/19bf3900425f9cc82a22 to your computer and use it in GitHub Desktop.
Mounting and Creating VHD in Windows
# run `diskpart` command
# inside diskpart type the commands
# this commands create 16GB of virtual hard disk
create vdisk file="file.vhd" maximum=16000
# attach the vdisk and create partition
attach vdisk
create partition primary
# assign drive letter
assign letter=n
# format the vdisk it must be selected if not selected
# use `select volume [number]`
format
# to detach vdisk
detach vdisk
# list disks that can be mounted
list disk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment