Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 219257

Re: Compact doesn't seem to work

$
0
0

Hi,

 

First step... Shut down the VM and make a backup then...

 

Before we try to shrink the virtual disk files, we should try to remove any unneeded files from the virtual machine to free space.

For example, on Debian-based VMs, you can run

apt-get autoremove apt-get clean all 


to clear out the local repository of retrieved package files.

Next, run as root (sudo won't work)

cat /dev/zero > /zero.fill;sync;sleep 1;sync;rm -f /zero.fill 

to fill the unused space with zeros.

Then power down the VM and open a terminal on the Linux host.

Navigate to the directory where the .vmdk files are located, e.g.:

cd /var/lib/vmware/Virtual\ Machines/Ubuntu\ 14.04/

now run vmware-vdiskmanager -k eg:

/wherever-vmware-has-installed-this/vmware-vdiskmanager -k ubuntu.vmdk

 

Sorry to lazy to go look up the location of where vmware-vdiskmanager lives, but that's the steps if you want to shrink.

 

Enjoy,

--

Wil


Viewing all articles
Browse latest Browse all 219257

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>