Home > Computer Programming > how to clean up and freespace your vhd files

how to clean up and freespace your vhd files


If you were using virtual machine on aos client/server sometimes there was a significant space on the vhd file, if you dont clean it up, it will takes your physical drive space

this is the solution to clean up and freespace your vhd file

  1. download SDelete or here20151008-0930
  2. run disk tools on your virtual machine (disk scan and defrag)
  3. run sdelete on your virtual machine (use this command : sdelete.exe -z C:)
  4. shutdown the virtual machine
  5. locate the vhd that used by virtual machine20151008-0934

    look at the vhd size before we compact it by diskpart

    look at the vhd size before we compact it by diskpart, 104GB

  6. run console, diskpart
    diskpart usage

    diskpart usage

    1. select vdisk file=”[your vhd path]”
    2. attach vdisk readonly
    3. compact vdisk
    4. detach vdisk
    5. exit
  7. vhd size after we compact it by diskpart 20151008-0929

-RF-

Categories: Computer Programming
  1. No comments yet.
  1. No trackbacks yet.

Please kindly Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: