VMware Cloud Community
melgish
Enthusiast
Enthusiast

What exactly does vmware-vdiskmanager -d do?

I can run defrag inside my guest ... I know that shifts the stuff around insde my VMDK file(s)

I can run defrag on my host (ok I can't cause it's ubuntu, and the ubuntu communtiy would beat me to death for even suggesting it) and I know that will shift around the blocks that make up the VMDK on the media.

So exactly what does vmware-vdiskmanager -d do?

0 Kudos
6 Replies
weinstein5
Immortal
Immortal

Since the vmdk still is stored in blocks it will defrag similar to a defrag within the guest o/s organizing the data stored inside the vmdk

If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful
0 Kudos
ronmanu07
Enthusiast
Enthusiast

vmware-vdiskmanager -d is used to defragment a local virtual disk. Defragment consolidates sparse disk, moving data to lower‐numbered sectors. This is independent of any defragmentation tools in the guest operating system, which work on volumes stored inside the VMDK. Defragmenting does not reclaim unused space on a virtual disk. To do this, you must shrink the disk.

Hope this helps.

0 Kudos
melgish
Enthusiast
Enthusiast

So this command has no effect on a disk that's pre-allocated?

0 Kudos
weinstein5
Immortal
Immortal

other than reorganizing the data within the preallocated vmdk -

If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful
0 Kudos
melgish
Enthusiast
Enthusiast

To what end? It seems to me re-arranging bits within the VMDK without knowing the intimate details of the virtual partitions (from a Guest OS point of view) is risky at best. Why else would the docs recommend defragmentation within the guest? If my VM is expecting a block device with a proprietery block arrangment, how will this tool know how to defragment it?

So I'm back to what exactly does it do? It may be intutive to everyone else, but I just don't get it.

0 Kudos
RDPetruska
Leadership
Leadership

To what end?

The same result as running a disk defragmenter on ANY computer... a defragmented hard drive. I'm not sure I understand your concerns...

Remember that you can ONLY do this if the guest has the VMware Tools installed (to the best of my knowledge, anyway) - so the utility, paired with the Tools, does have the knowledge you claim it requires.

0 Kudos