Search This Blog

Tuesday, November 08, 2011

VHD compacting error–limitation in file system

I had used the sysinternal tool (disk2vhd) to create a VHD image of one my desktop machines that I wanted to virtualise.

I got this VM up and running in Hyper-V, and after removing a number of programs and files, I wanted to compact the VHD file. So using Hyper-V to manage the disk, I went to compact the disk. When I got this error

I have truncated the error message

System failed to compact ‘……….vhd’ ….. due to a file system limitation.

Anyway after a quick web search I discovered this was probably due to snapshots in the VHD. So I run up the VM and ran the following command.

vssadmin delete shadows /all

It must also be noted that I think vssadmin is being replaced with diskshadow (edit: diskshadow is only available currently on windows 2008 server) so I think you can do the same thing with that program.

diskshadow

DISKSHADOW> delete shadows all

References:

http://www.expta.com/2010/06/unable-to-compact-vhd-due-to-file.html

http://technet.microsoft.com/en-us/library/cc772172%28WS.10%29.aspx

http://angrytechnician.wordpress.com/2011/02/23/vssadmin-is-dead-long-live-diskshadow/


Share/Bookmark

1 comment:

  1. GSCopy Pro v6.0 (RoboCopy Alternative) with Open File Agent
    GSCopyPro is a single command-line tool (CLI) that can copy, replicate and move files from one folder to another. This folder can be on the same machine/ server or another server elsewhere. What makes GSCopyPro stand out from other competitors is the fact it works on 32-bit as well as 64-bit systems and has no restrictions. It can easily be scheduled to run as a scheduled task and fully automated. GSCopyPro also comes with an open file agent which can copy files that are locked/ opened by other processes. This feature is supported in all windows versions from widows XP/ 2003 and later.
    Go To:>> http://www.gurusquad.com/GSCOPYPRO

    ReplyDelete