How can I shrink a Win XP VM which is large due to winsxs directory

0

I have a old Win XP system running as a Virtualbox guest on a linux host. The image is really large because of an (apparent) large winsxs directory on the windows guest.

I know that this is due to the fact that because of the hardlinks the size is not calculated correctly, but on the linux host, this space is really occupied.

Using vboxmanage's compact (after an sdelete on the win guest) command on the linux host doesn't help:

vboxmanage modifymedium --compact /path/to/thedisk.vdi

So what can I do about this?

student

Posted 2017-11-01T20:32:53.337

Reputation: 455

"So what can I do about this?" - You cannot the WinSxS directory should not be modified. The current size is what is required for your system to function. There are no tools to reduce the size of the WinSxS directory on Windows XP. What you want isn't possible. – Ramhound – 2017-11-01T20:35:50.983

Following this anwer: https://superuser.com/a/372191/53616 the winsxs directory contains actually hardlinks because of that windows reports the occupied space wrong. So, actually much less space is used than reported by windows.

– student – 2017-11-01T20:39:02.697

I am more familiar with that fact, check my answers on WinSxS, my point is no tools exist to reduce the actual size. Only Windows 7 has a single DISM command to reduce the size. Even then Windows 7 options are pale in comparison to DISM on Windows 8+. Sounds like your current problem is a VirtualBox issue not a Windows issue. Sadly, VirtualBox doesn't support shrinking virtual hdds. – Ramhound – 2017-11-01T20:48:42.537

No answers