
The major difference between those two modes: Suspend writes memory to disk and the Guest OS enters hibernate/sleep state. Powers off the virtual machine. The virtual machine does not attempt to shut down the guest operating system gracefully. Kindly refer to these related guides: How to logoff, restart, or shutdown Windows PC or Server remotely via Command Prompt and PowerShell, how to restore a VM to its previous state (restoring a checkpoint), Unable to Shutdown a HyperV Virtual Machine, how to use command prompt to shutdown and restart your computer, and here are some Handy Command-Prompt Shutdown Commands. By default, Workstation Pro prompts you to select an action when you close a powered-on virtual machine and when you exit Workstation Pro while virtual machines are running on the local host system.
Suspend a Virtual Machine
Suspending a virtual machine is analogous to putting a computer into sleep mode. When a virtual machine is suspended, the current state of the operating system and applications is saved, and the virtual machine is put into a suspended mode. By this I mean, suspend writes memory to disk and the Guest OS enters hibernate/sleep state. To suspend a virtual machine from the toolbar, select the virtual machine and click the suspend button.
When the VM has been suspended, you can use the resume the virtual machine feature. In this way, the applications that were running previously before the suspension will resume their running state with their content unchanged. After you resume a virtual machine and do more work, you cannot return to the state that the virtual machine was in when you suspended it. To return to the same state repeatedly, you must take a snapshot
. See these guides on how to create and delete a snapshot on VMware Workstation, and Backup: How to create a HyperV checkpoint.
Note: How quickly the suspend operation performs depends absolutely on the amount of data changed after you started the virtual machine. The first suspend operation usually takes longer than subsequent suspend operations. When you suspend a virtual machine, Workstation Pro creates a virtual machine suspended state (.vmss or .vmem) file set in the working directory. How quickly the resume operation performs depends on how active the virtual machine is. The more active the virtual machine is, the longer it will take to resume. It also depends on whether the virtual machine suspended state (.vmss or .vmem) file set is already in the physical memory of the host system. If it is, the virtual machine will resume much faster.
Powered Off
When you initiate the power-off functionality, the virtual machine does not attempt to shut down the guest operating system gracefully. Power off is similar to shutdownas it writes nothing to disk and stops the Guest OS completely. By default, Workstation Pro powers off the virtual machine abruptly. The effect is the same as using the power button on a physical machine.
Run in Background
You are not required to power off a virtual machine that is running on the local host system before you exit Workstation Pro. You can exit Workstation Pro and leave the virtual machine running in the background. WHen you have decided to run your VM in the background, this is what hapapnes.
- You will be able to interact with the virtual machine through VNC or SSH etc.
Cancel
This simply means to cancel the operation, which invariabl means that you are no longer interested in suspending, running the VM in the backgroung or shutting it down.
I would recommend to be conscious and intentional when selectiong any of these functions. Shutting down VMs (guests) gracefully would be the ideal thing to do. But if you wish to return to the same window, then I will recommend suspending the VM as this will ensure the state is saved
.
You may also decide to shutdown the VM from the OS itself before closing the tab. Here you will have to click on the Start Menu, select the Power option and then click on shutdown. You may be requested to specify a reason for the shutdown.
Now that the VM isn’t running anymore, you should be able to close the window without having to slect any of the operations discussed above. Here is a guide you may be interested in: How to use command prompt to shutdown and restart your computer.
I hope you found this blog post helpful. If you have any questions, please let me know in the comment session.