5

I know it's possible because sleep works in HyperV under Windows 8.

edit: I know this is probably not "supported".

Fowl
  • 406
  • 2
  • 5
  • 22
  • 6
    `know` is a very strong word. – MDMarra Sep 21 '12 at 13:17
  • I'm curious what the use case is for sleeping a hyper-v server. – ErnieTheGeek Sep 21 '12 at 13:18
  • I'm running Server 2012 (without Hyper-V installed though), and the only place I see a sleep option is on the shutdown menu accessible via `Alt+F4` from the desktop. Via the regular shutdown menu (in the charms bar or whatever it's called), I only have Shutdown and Restart. – Chris McKeown Sep 21 '12 at 13:26
  • 2
    I'm interested in the downvotes. Is saving energy not a key reason for virtualisation? Or is asking the 'impossible' poorly regarded? – Fowl Sep 22 '12 at 01:09
  • I didn't downvote, but: 1. Lack of evidence of research (even as little as "I found a link to where it's "not supported" 2. Making unsupported assumptions about two different products being the same. 3. Something well outside "normal" for a professional environment; it's usually a good idea to add a sentence about why you're creating an unsupported, odd-ball configuration. – Chris S Aug 13 '13 at 13:18

2 Answers2

12

On the server version of Windows, you can't. Once the Hyper-V role loads, hibernate and sleep are disabled.

You can sleep on Windows 8 Hyper-V because it is "Client Hyper-V" in which sleep states remain enabled. (Windows IT Pro has a list of differences between Server and Client Hyper-V, and this appears among them.)

If you really need Hyper-V installed but still want to enable sleep/hibernate selectively, a workaround is available which will disable the Hyper-V role from loading. When it's not loaded, you can put the machine to sleep/hibernate it. You need to reboot after applying these registry keys.

Gain hibernation/sleep - lose Hyper-V:

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\hvboot]
"Start"=dword:00000003

Lose hibernation/sleep - gain Hyper-V:

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\hvboot]
"Start"=dword:00000000
Michael Hampton
  • 244,070
  • 43
  • 506
  • 972
  • 1
    Thanks but this is the best answer for Windows Server 2008 R2 and earlier, not Windows Server 2012. HyperV now supports sleep I just need to figure out how to enable it on Server. – Fowl Sep 21 '12 at 13:19
  • What makes you think Microsoft changed their mind on this? – Michael Hampton Sep 21 '12 at 13:23
  • I don't think it's a case of "changed their mind" more as a "implemented the feature". Docs are here: http://technet.microsoft.com/en-us/library/hh857623.aspx – Fowl Sep 21 '12 at 13:24
  • You have to use Windows 8 for that. – Michael Hampton Sep 21 '12 at 13:25
  • It's the same binaries, just different configuration. – Fowl Sep 21 '12 at 13:27
  • Well, you have your answer. I'm sorry you don't like it, but that doesn't make it wrong. – Michael Hampton Sep 21 '12 at 13:27
  • 1
    @Fowl, the binaries for Hyper-V in Win8 and Server2012 are not the same. I couldn't enumerate every difference, but there definitely are differences. – Chris S Sep 21 '12 at 13:51
  • 2
    @ChrisS [Sleep is supported for Windows server 2012](http://technet.microsoft.com/en-us/library/hh831410.aspx#BKMK_Sleep1) – oleksii Aug 13 '13 at 11:40
  • @oleksii Maybe you mean to direct that toward someone else? I never said anything about sleep support. – Chris S Aug 13 '13 at 13:15
  • @ChrisS sorry, that's right :) I asked a new question as the solution described in this answer doesn't work for me. Thanks. – oleksii Aug 13 '13 at 14:45
  • @oleksii The documentation you linked to is still wrong. Expect MS to correct it soon. – Michael Hampton Aug 13 '13 at 14:46
  • @MichaelHampton cheers, I will wait until Win Server 2012 R2 RTM version is available and perform an upgrade. – oleksii Aug 13 '13 at 14:59
1

There are a variety of features in Hyper-V that don't work when you sleep the host machine. Most of them, like SR-IOV networking, revolve around the use of an I/O MMU. Client (Windows 8) Hyper-V doesn't support an I/O MMU, so it can sleep.

Jake Oshins
  • 5,146
  • 18
  • 15