Patent ID: 8775716

Claim:
A computer-implemented method for defragmenting physical storage of a virtual machine, comprising: identifying a physical storage device, wherein the physical storage device hosts the virtual machine; obtaining prefetch information associated with prefetch data accessed by the virtual machine during a startup of at least one of the virtual machine or an application on the virtual machine, wherein: the virtual machine comprises a virtual disk; the prefetch information comprises a prefetch-data-access order; obtaining the prefetch information comprises mounting, by a defragmentation module, the virtual disk of the virtual machine and reading a virtual disk file system of the virtual disk; identifying, within the prefetch information, a geometry specification of the virtual disk that maps storage locations of the virtual disk to storage locations on the physical storage device that hosts the virtual machine; decreasing a startup time of the startup of at least one of the virtual machine or the application on the virtual machine by defragmenting, based on the prefetch information, the prefetch data on the physical storage device, wherein the defragmenting comprises: using the geometry specification of the virtual disk to identify the prefetch data on the virtual disk; retrieving the prefetch data; moving at least a portion of the prefetch data from one location on the physical storage device to another location on the physical storage device according to the prefetch-data-access order such that access time during the startup of at least one of the virtual machine or the application on the virtual machine for defragmented prefetch data is less than access time during the startup of at least one of the virtual machine or the application on the virtual machine for the prefetch data before defragmenting.