Do I need to shut down before powering off a VM?

Posted on

QUESTION :

Sometimes I’m starting a VM to do a quick test. I start up the VM, do the test and then power off. However, doing this I get the warning

Check that you have shut down your guest operating system before powering off.

Are you sure you want to power off the virtual machine “”?

[ ] Do not show this message again.

Reading some VMWare documentation about Power off, I understand that there may be data/disk corruptions if the power off occurs during a write operation.

Given the fact that I will always revert to a snapshot and not power on from the state I powered off, is there any risk in powering off a running VM?

In my opinion, the data of that session should be written into a new disk file which will be deleted when reverting to another snapshot. Is this correct?

Versions:
VMWare: 10.0.1
Guest OS: all Windows only (but shouldn’t actually matter)
Host OS: Windows 7 (should also not matter)

ANSWER :

If you always revert to a stable (consistent) snapshot there is no problem in powering off the VM.

Immediate poweroffs can result in filesystem inconsistencies because there might still be unflushed caches in memory or write operations in progress. Since you are reverting to a snapshot, which always has a consistent state, there shouldn’t be any problem.

Keep in mind if you make changes to your disk, and want to create a new snapshot from that, you should shutdown gracefully (to prevent filesystem corruption).

Turning off a VM is roughly the same as turning off your physical machine. I’ve done it heaps of times…but that doesn’t mean that the OS that’s running inside won’t complain the next time you start up.

However, as others have already mentioned, snaphots can save the day.

The proper answer would be to suggest to always shutdown (or save state)

Leave a Reply

Your email address will not be published.