1. A method for scanning a virtual machine (VM) running on a host computer, the method comprising: upon a restarting of the VM or a completion of a migration operation of the VM, determining whether the VM has a scan token stored within a context of the VM, the scan token containing a value associated with an ongoing scan operation for the VM at a time of suspension or migration of the VM; when it is determined that the VM has the scan token, determining whether a corresponding scan token for the VM is present and current in a storage location outside the context of the VM; causing the ongoing scan operation to resume when the corresponding scan token is present and current in the storage location; and causing the ongoing scan operation to be canceled when it is determined that the corresponding scan token is not present, or if the corresponding scan token is present, that the corresponding scan token is not current.