If you choose to save a snapshot, the progress bar indicates it's still saving but you can continue using the VM. The same applies when resuming. What is it actually doing during that time? If it were still restoring the memory you would expect errors if you try to access memory that hasn't been restored yet.
1 Answer
When you create a snapshot when the virtual machine is running, it
Creates delta disk files (vm-000001.vmdk) and immediately set the VM's storage disks to them in the .vmx
config file. This part is instant as these files start out as blanks (no difference between snapshot and current state).
Copies the VM's RAM to disk
- If
mainMem.useNamedFile
is not defined or isTRUE
in the.vmx
file, then this part is quite instant -- the RAM before snapshot has been updating in real-time on your host's hard disk in a.vmem
file -- so it just needs to rename the old one and slowly copy the post-snapshot RAM to another.vmem
file. The post-snapshot VM's RAM is still in your host computer's RAM, so you can continue working on the VM. - If you have disabled
mainMem.useNamedFile
, then the VM's RAM is copied to hard disk. I am not sure about this part: Any changes to the VM's RAM while it is being copied are saved in a copy-on-write manner to a different part of your host's RAM.
When the VM is being restored from a snapshot, any memory access to parts that haven't been written into the host computer RAM is read from your host computer hard disk.
-
That sounds plausible. I don't see .vmem files being written but apparently useNamedFile is Windows only. Mar 14, 2015 at 0:50