My Google-Fu is weak. Compacting ESXi VMDK?

Discussion in 'Virtualized Computing' started by burritoincognito, Mar 15, 2017.

  1. burritoincognito

    burritoincognito Gawd

    Messages:
    659
    Joined:
    Sep 17, 2012
    I've got some thin provisioned virtual machines that don't get much use. They're each set for a 40GB drive.. And, they've used all that space, but now that I've run a cleanup, they're down to about 20GB of used area.

    I don't want to SHRINK anything, I just want something comparable to what Workstation can do with its compact capability, get the VMDK back down to a smaller size. When you've got about 6 using twice the space they need to thanks to Windows Update bloat and other temp files.

    I could probably clean this up with VMware Converter, and just work with that, but I was curious if there's some way I can do it within VMware, rather than having to take a machine offline, and convert it into a new one.
     
  2. ND40oz

    ND40oz [H]ardForum Junkie

    Messages:
    11,125
    Joined:
    Jul 31, 2005
    Storage vMotion to a different datastore and make sure you pick thin provision. It'll shrink it down during the process of moving it and the box never has to come down.
     
  3. burritoincognito

    burritoincognito Gawd

    Messages:
    659
    Joined:
    Sep 17, 2012
    doesn't storage vmotion require more than the freeware VMware though? I had full license of 5.5 from my old job, but I've moved on to 6.5 and don't have the licensed features any more.
     
  4. ND40oz

    ND40oz [H]ardForum Junkie

    Messages:
    11,125
    Joined:
    Jul 31, 2005
    Generally any advanced features require licensing, just like workstation and fusion do to perform the same function.

    You can try doing it this way, but the machine will need to come down to move the vmdk.
     
  5. burritoincognito

    burritoincognito Gawd

    Messages:
    659
    Joined:
    Sep 17, 2012
    That shrinks it though. I'm not looking for that. I set 40GB, and want to leave it at 40GB...but if it's housing just 21GB of data, I want it to take up 21GB on the disk.

    VMware Workstation does this with the compact feature, as that's how I just took care of it.
    Set up the VM on VMware Workstation so I'd have the system on my laptop. Ran a compress as the VMDK had expanded to use all the allotted space during the setup (set to 40, using 40), and ended up with a VMDK set to 40GB using just 21GB on my C drive. Zipped a copy for future use, and used Converter to upload it up to my ESXi box.

    I'm just looking to clean up other vmdks on my datastore.
     
  6. ND40oz

    ND40oz [H]ardForum Junkie

    Messages:
    11,125
    Joined:
    Jul 31, 2005
    After you shrink it, then just make sure it's thin provisioned and expand disk again. You can either do it using the licensed features that make things easy or do complicated workarounds that allow you to do it for free but are time consuming. If you have a paid copy of VMWare workstation, import it into it, compact it and then export it back out to ESXi. Otherwise, put an ESXi host in evaluation mode and use Storage vMotion. But if this is going to become a normal thing or a production environment, buy a license.
     
  7. burritoincognito

    burritoincognito Gawd

    Messages:
    659
    Joined:
    Sep 17, 2012
    Buying a license is part of my to-do list now that I have something more substantial than a NUC running my environment. I just have to get work to sign off on it so they'll pay for it. Or, maybe I'll do it. After all, I'm using their MSDN account since TechNet went away.

    I don't foresee it being a common occurrence. It's not something I ever need to do at work, as our Compellent SAN basically does that in how it provisions things within the device itself.
     
  8. Shockey

    Shockey [H]ard|Gawd

    Messages:
    1,984
    Joined:
    Nov 24, 2008
    Might be worth looking into VMUG. like MSDN but for vmware products ;)

    I signed up for it. Think it was 200 a year roughly.
     
  9. burritoincognito

    burritoincognito Gawd

    Messages:
    659
    Joined:
    Sep 17, 2012
    I'm definitely going to look into that! Thanks!
     
  10. Dytralis

    Dytralis Limp Gawd

    Messages:
    358
    Joined:
    Feb 6, 2003