There is an order of operations to defragment the disks of a (VMware Workstation) VM.

  1. First, use the defragmentation utility in the operating system running on the VM to defrag… just like a real machine.
  2. Use the Utility provided by the VM software to defragment(machine must be powered down). VM->Settings->Hardware->Hard Disk->Utilities(Button).
  3. Use the defragmentation utility in the HOST operating system to defrag the disk files of the virtual machine.