I just installed Windows 2012 R2 server for lab testing, and installed the Hyper-V role over it, then noticed that the server shutdown automatically after a period of time.
by checking the event viewer, below event was logged prior the shutdown:
Log Name: System
Source: USER32
Event ID: 1074
Description:
The process C:\Windows\system32\wlms\wlms.exe (<Computer Name>) has initiated the shutdown of computer <Computer Name> on behalf of user NT AUTHORITY\SYSTEM for the following reason: Other (Planned)
Reason Code: 0x80000000
Shutdown Type: shutdown
Comment: The license period for this installation of Windows has expired. The operating system is shutting down.
As the event states: The license period for this installation of Windows has expired.
Activating the server will solve this problem permanently, but for meanwhile I re-armed the activation using this command:
Slmgr.vbs -rearm