Here’s what you’ll need to do.
Once the virtual machine’s OS has finished defragmenting, shut down the virtual machine.
Then, open your VMware virtual disk properties.
To do this in VMware Workstation, double-choose the Hard Disk info on the virtual machine’s main page.
Then choose the Hard Disk entry from the Hardware tab if it’s not already selected.
smack the Utilities button
VMware will start defragmenting your virtual disk.
This may take a while depending on your virtual machine’s size and how often you defragment it.
Once it’s done, you’ll be notified that the defragment is completed.
To improve performance even more, you should also regularly defragment your host computer’s hard drive.