5 Replies Latest reply on Apr 23, 2016 2:59 PM by IReallTryhard

    Compact doesn't seem to work

    IReallTryhard Enthusiast

      Latest version of Player and Ubuntu 14.4 LTS. It was getting bloated so I cleaned a whole bunch off stuff out and Ubuntu File Manager is now showing, "4.7gb used, 14.2gb free."

       

      Player was showing 19.4gb used so I tried "Compact" and it took a few seconds. Then using the "Player/Manage/Virtual Machine Settings" again,  the size is still showing 19.4gb. I tried Defrag and waited seven minutes and still 19.4gb.

       

      I'd like to reclaim some of that free space Ubuntu is showing as it will cut down on backup time. Right now it is backing almost 20G of which more than 3/4 is empty space in Ubuntu.

       

      How can I get some space back?

       

      Are Defrag and Compact not intended for what I think they should be doing from their description?

        • 1. Re: Compact doesn't seem to work
          wila Guru
          vExpertUser ModeratorsCommunity Warriors

          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

          | Author of Vimalin. The virtual machine Backup app for VMware Desktop Products
          | Vimalin : Automated backups for VMware Fusion and VMware Workstation Professional
          | More info at https://www.vimalin.com
          | Twitter @wilva
          | VMware Wiki at http://www.vi-toolkit.com
          • 2. Re: Compact doesn't seem to work
            IReallTryhard Enthusiast

            Ooops, thanks Wil, my mistake, but the host is win8.1. I just did disk-search for "vmware-vdiskmanager" and nothing found on my C: drive.

            Found this online

            VMware KB: Repairing a virtual disk in Workstation

            and this

            VMware KB: Increasing the size of a virtual disk

            But nothing matches up on my stock-installation of Player 12.0.0, for the vmware-vdiskmanager.

             

            I guess it is in the paid-only version and not the free.

             

            What's a poor, retired old fart to do?

            • 3. Re: Compact doesn't seem to work
              wila Guru
              User ModeratorsCommunity WarriorsvExpert

              More my mistake I guess as I wasn't 100% sure if VMware did include this file with VMware Player or not.

              Guess not.. Normally I recommend people install the full suite (VMware Workstation) and when that expires you still have a working VMware Player left - with all the extra tools.

               

              Anyways.. I digress. It should be part of the VMware Virtual Disk Development Kit, but for completeness here's another discussion that lists the possibilities:

              Download vmware-vdiskmanager.exe separately? Show version?

               

              PS: I just downloaded the VDDK 6.0.2 down here. Had to go back and redownload after logging in as the VMware portal claimed "maintenance".. I tend to not believe that and try again,  after that the download went through.

              --

              Wil

              | Author of Vimalin. The virtual machine Backup app for VMware Desktop Products
              | Vimalin : Automated backups for VMware Fusion and VMware Workstation Professional
              | More info at https://www.vimalin.com
              | Twitter @wilva
              | VMware Wiki at http://www.vi-toolkit.com
              • 4. Re: Compact doesn't seem to work
                IReallTryhard Enthusiast

                Wila, persistence pays. Got 6.02 OK, thanks. Will follow through your process and see what's what before marking your latest response as "Correct Answer."

                 

                An amusing note in that thread you pointed me at...

                DerekShaw:

                "'cause I keep having to find it again and again"

                 

                I have been using VMware for many years and they seem masters at the art of hiding and experts at no-longer-working KBs.

                • 5. Re: Compact doesn't seem to work
                  IReallTryhard Enthusiast

                  - Wooo Hooo that reclaimed 14GB!

                   

                  Awesome help, thanks again wila.