Share via


Server 2016 Hyper-V Virtual Machine Always Turns Off

Question

Tuesday, October 18, 2016 2:56 AM | 1 vote

If I try to restart a virtual machine, hyper-v always turns them off instead of rebooting.  I have to use the hyper-v manager to manually start every instance if a restart was issued within the VM.  It does not seem to matter what OS the VM is, it happens with Linux, server 2016 and 2012 R2 instances.

I notice an error:  'VM-****' could not reinitialize. (Virtual machine ID *******-****-****-****-************)

I thought at first it might be permissions but the hyper-v host is in an OU with blocked inheritance.

What might be causing VM's to fail to reinitialize? 

All replies (27)

Wednesday, October 19, 2016 5:48 PM ✅Answered | 1 vote

Yes, all updates applied.

Looks like I moved the Smartpage location but needed additional security applied to the location.

I don't remember having to do this with 2012 or R2.  Also, I seem to remember 2012 R2 best practices recommending Smartpage be located on its own volume.   A BP scan of 2016 doesn't show that recommendation so I moved Smartpage back to the default location on all VM's and the problem disappeared.


Thursday, June 29, 2017 3:31 PM ✅Answered

Just the other week I had this again on another new 2016 server.  As soon as it happened, I blew away 2016 and went back to 2012 R2.  I just don't trust Hyper-V on 2016 to stay running

For clients that insist on using the latest and not so greatest, I found disabling all dynamic memory and insuring 2016 allows NUMA spanning offers the best results.

Most of these new systems also have rather huge arrays or large drive volumes.  I found formatting everything with a 64K sector size seems to help but I can't confirm this.


Tuesday, October 18, 2016 8:32 AM

Hi,

Would you please post the detailed error message? 

Have you tried to restart VMM service and try again?

Did you make any changes before the issue happen?

Best Regards,

Leo

Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected].


Tuesday, October 18, 2016 3:14 PM

Restarting VMM doesn't have any effect.

This is the only reported error and it references the VM by name and the ID:   'VM-****' could not reinitialize. (Virtual machine ID *******-****-****-****-************)

This error occurs once for each VM and only if the VM is rebooted.  The VM starts up at boot on its own which is odd.

No changes were made, Hyper-V has always been this way on this server.  This server is only 13 hours old as of now.


Tuesday, October 18, 2016 3:46 PM

Hi,

Is this a new windows 2016 server and recently setup Hyper-V? Did you check in event viewer for any Hyper-V related errors or warnings and post it here?


Tuesday, October 18, 2016 4:24 PM

Detailed view of the event logs shows only two errors each time a VM is rebooted.  There is only one other warning about creating a self-signed certificate which cleared itself after the certificate was issued.  All the other event entries are information

The following two errors occur once for each VM that tries to reboot:

Error 1:

The description for Event ID 3052 from source Microsoft-Windows-Hyper-V-Worker cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

If the event originated on another computer, the display information had to be saved with the event.

The following information was included with the event: 

VM-S**-**
********-****-****-****-***********
%%2147942403
0x80070003

The locale specific resource for the desired message is not present

The second error is:

'VM-****' could not reinitialize. (Virtual machine ID *******-****-****-****-************)


Wednesday, October 19, 2016 7:26 AM

Hi,

I suppose there maybe something wrong with Hyper-V.

If possible, try to reinstall Hyper-V role to see if it could solve the issue.

Besides, have you installed the following update?

https://support.microsoft.com/en-us/kb/3192366

Best Regards,

Leo

Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected].


Thursday, October 20, 2016 1:59 AM

Hi,

Glad to hear that your issue was solved. Also thanks for your sharing.

If you have any further questions, welcome to post in the forum.

Best Regards,

Leo

Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected].


Friday, October 28, 2016 11:44 AM

Hi a have the same problem do you know what additional security applied to the location

a group called "Virtual Machines" have rights to my c:\hyper-v folder but this group dosent exist


Friday, October 28, 2016 3:48 PM

There is a detailed list of all permissions here

I found the following two permissions on a default system:

"NT VIRTUAL MACHINE\Virtual Machines" (advanced permissions; list folder,read attributes,read extended, create files, create folders and read permissions)

"SERVERNAME\Hyper-V Administrators" Full control

Unfortunately after a week of work on this server it still has some related issues.   It takes 3 or 4 VM reboots before the problem occurs.   I have seen this at another site also with no resolution.  If I reboot a random VM 4 or 5 times and then try to shut the server down, the hyper-v management hangs on screen shutting down forever.


Saturday, October 29, 2016 5:46 PM


Saturday, October 29, 2016 5:47 PM

Found the problem standard checkpoints works Production checkpoints cases the problem


Wednesday, November 9, 2016 4:52 PM

Unfortunately checkpoints has no effect.

I am constantly facing this issue with every new Windows 2016 Server.  Hyper-V running Server 2012 R2 on the same model Dell server works flawlessly in the same environment.

Sometimes hyper-v operates flawlessly, stopping, restarting virtual machines without any problems.  The server reboots perfectly sometimes without hanging indefinitely at the "stopping hyper-v".

Sometimes hyper-v fails miserably.  I try to stop a VM and it hangs stopping.  I determine the PID and kill it and magically the VM starts.  It does not matter which VM, once this starts it affects all VM's and the hyper-v management service.

Sometimes after a VM hangs stopping it refuses to start with varying errorors.  The latest is  "'VM-XXX' failed to start worker process: A Compute System with the specified identifier already exists."  Also, when trying to view the settings the console window comes up blank and hangs there forever.

The server is a domain member in an isolated OU where inheritance is blocked.  The required service permissions for hyper-v are present and identical when hyper-v is hanging or operating normally, I have verified this with gpresult.   I've even tried adding the service permissions to the default domain policy with the server in an appropriate OU and the problem eventually occurs.  It does not seem to be permissions related but rather something in the OS is hanging hyper-v.  I've also tried removing the server from the domain and the same symptoms occur.

I have never used a checkpoint and changing all checkpoint options from production to standard had no effect at all.  There is no pass through hardware in any of these VM's.  The network adapter is shared and allowing management selected or not has no effect.  The network adapters are Intel i350's and I've tried Intel's network drivers for Windows 2016, Dell's drivers and the native drivers and it had no effect.  There is a mixture of core and full GUI VM's ranging from Windows 2012 R2 standard to Server 2016 Standard.  All of the VM's share a single network adapter and I've tried deleting a VM and recreating it completely new and when the server acts up, it fails in exactly the same way as other existing VM's.  Even Linux VM's hang stopping, won't startup after without killing their PID and sometimes won't even start again with the same Compute System or reinitialize event log error.

I am at a total loss here, this has never happened to me on previous versions of Windows server.  The problem appears to be Windows holding onto something.  Searching the symptoms reveals mostly ancient articles about hyper-v in Windows 2008 R2 but so far none has any effect.


Saturday, November 26, 2016 11:54 AM

Hi again same problem is back again :-( and a dont have the possibility to open a case to MS

maybe we can get attention on this problem soon

Regards

Ricky


Friday, December 23, 2016 5:29 AM

I was hoping KB3201845 solved this issue for me but it didn't.

I have found that if any VM has the DVD media mounted through the Hyper-V settings causes this problem.

If I insure NO VM has any media mounted this problem does not occur.   

Is there some kind of known issue with DVD media being mounted in the management interface?


Monday, March 13, 2017 11:30 PM

Under settings on your Hyper-V host for the VM with the issue - change the location of your smartpages- apply

then change the location back to the original location and apply - fixed my issue


Tuesday, April 11, 2017 2:27 PM

SOLVED: (Solved on Windows Server 2016 Hyper-V)

Problem: Hyper-V 2016 VM off instead of restart

On each machine settings, under management, I had to CHANGE CHECKPOINT SETTINGS to Standard (or you can disable it anyway)

Marian, just trying to help you


Tuesday, April 11, 2017 4:16 PM

Checkpoints aren't having any effect, there are none and even if there is, the symptoms still occur.  Smartpaging also has nothing to do with it, moving it to a dedicated spindle or leaving it on the C drive has no effect.

This issue has lessened to a large degree since I first posted but still occurs.  I have this issue with all 2016 Hyper-V servers that I have dealt with so far (R730, R430, T630 and an R720).  There is no third party software installed except the latest drivers supplied by Dell.

2016 seems to be very finicky with numa memory spanning, turned off or on, both do strange unique unpredictable things.  I can imagine it may be hardware related but for it to happen on 4 completely different Dell models and only with 2016 kind of points back to software.

2016 randomly fails startup a VM due to lack of memory when there is only one VM defined and the memory and processor assigned to that VM is equal to the maximum value shown on the numa configuration page.  If I enable numa spanning, restart the management interface, the VM will start.  If I disable numa spanning and reboot a few times the VM will start sometimes.  This makes no sense.  Whatever the issue, it should be consistent and it is not.

I cannot use dynamic memory, not even for a 2012 R2 core instance with only the file server role.  Eventually after a few automatic reboots due to updates, the VM will fail to reboot.  The first signs there is an issue, Hyper-V will refuse to allocate more memory than was allocated prior to the reboot.  Its as if the Hyper-V memory manager defaults itself to "the last maximum memory value" and will not assign any more.  If the VM attempts to use dynamic memory, the Hyper-V VM instance OS reports out of memory errors.  The Hyper-V host has 60+ gigabytes still available in each numa node yet Windows refuses to allocate it.

Even after disabling dynamic memory, enabling numa spanning, eventually Hyper-V VM's will start getting stuck on shutdown, then the UI will hang when trying to edit VM settings and finally the server will fail to reboot hanging shutting down the Hyper-V management service.


Thursday, June 29, 2017 9:45 AM

Hello gettnmorebetter,

we have exactly the same problem, VMs get stuck in Stopping or Starting Mode, and the only workaround to getting the system running again is killing the vmcompute.exe and vmms.exe.

Afterwards the VMs can be started again.

Did you find a permanent solution to the problem?

The VMs are located on an SMB share and on another system they are situated on a CSV on a SAN Storage. The problem is the same for both 2016 Hyper-V. Our 2012 R2 clusters have no such issue.

Regards


Thursday, November 2, 2017 3:22 PM

We have the same issue and none of the workarounds proposed here helped. Host is on Server 2016 Datacenter & VM is also on Server 2016.

Here are the logs I have collected and does not help any in way.

Log Name:      Microsoft-Windows-Hyper-V-Worker-Admin
Source:        Microsoft-Windows-Hyper-V-SynthNic
Date:          10/31/2017 3:03:18 PM
Event ID:      12598
Task Category: None
Level:         Information
Keywords:     *
User:          NT VIRTUAL MACHINE\78462CB6-C221-424D-9374-25CA8E7DFF52
Computer:      HV-A.COMPANY.COM
Description:
'QA-VM-2K16' Network Adapter (78462cb6-c221-424d-9374-25ca8e7dff52--c10faa33-4c4d-4db1-91f7-0b869f238841) Disconnected from virtual network. (Virtual Machine ID 78462CB6-C221-424D-9374-25CA8E7DFF52)
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
*  <System>

*    <Provider Name="Microsoft-Windows-Hyper-V-SynthNic" Guid="{C29C4FB7-B60E-4FFF-9AF9-CF21F9B09A34}" />*
*    <EventID>12598</EventID>*
*    <Version>0</Version>*
*    <Level>4</Level>*
*    <Task>0</Task>*
*    <Opcode>0</Opcode>*
*    <Keywords>0x8000000000000000</Keywords>*
*    <TimeCreated SystemTime="2017-10-31T19:03:18.481174100Z" />*
*    <EventRecordID>14901</EventRecordID>*
*    <Correlation />*
*    <Execution ProcessID="22048" ThreadID="19608" />*
*    <Channel>Microsoft-Windows-Hyper-V-Worker-Admin</Channel>*
*    <Computer>HV-A.COMPANY.COM</Computer>*
*    <Security UserID="S-1-5-83-1-2017864886-1112392225-3391452307-1392475534" />*
*  </System>*
*  <UserData>*
*    <VmNicNoAvailableMac xmlns="http://www.microsoft.com/Windows/Virtualization/Events">*
*      <VmName>QA-VM-2K16</VmName>*
*      <VmId>78462CB6-C221-424D-9374-25CA8E7DFF52</VmId>*
*      <NicGuid>78462cb6-c221-424d-9374-25ca8e7dff52--c10faa33-4c4d-4db1-91f7-0b869f238841</NicGuid>*
*      <NicName>Network Adapter</NicName>*
*    </VmNicNoAvailableMac>*
*  </UserData>*
</Event>

Log Name:      Microsoft-Windows-Hyper-V-Worker-Admin
Source:        Microsoft-Windows-Hyper-V-Worker
Date:          10/31/2017 3:03:18 PM
Event ID:      3052
Task Category: None
Level:         Error
*Keywords:     *
User:          NT VIRTUAL MACHINE\78462CB6-C221-424D-9374-25CA8E7DFF52
Computer:      HV-A.COMPANY.COM
Description:
The description for Event ID 3052 from source Microsoft-Windows-Hyper-V-Worker cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

If the event originated on another computer, the display information had to be saved with the event.

The following information was included with the event:

QA-VM-2K16
78462CB6-C221-424D-9374-25CA8E7DFF52
%%2147942402
0x80070002

The locale specific resource for the desired message is not present

Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
*  <System>*
*    <Provider Name="Microsoft-Windows-Hyper-V-Worker" Guid="{51DDFA29-D5C8-4803-BE4B-2ECB715570FE}" />*
*    <EventID>3052</EventID>*
*    <Version>0</Version>*
*    <Level>2</Level>*
*    <Task>0</Task>*
*    <Opcode>0</Opcode>*
*    <Keywords>0x8000000000000000</Keywords>*
*    <TimeCreated SystemTime="2017-10-31T19:03:18.491266400Z" />*
*    <EventRecordID>14902</EventRecordID>*
*    <Correlation />*
*    <Execution ProcessID="22048" ThreadID="19608" />*
*    <Channel>Microsoft-Windows-Hyper-V-Worker-Admin</Channel>*
*    <Computer>HV-A.COMPANY.COM</Computer>*
*    <Security UserID="S-1-5-83-1-2017864886-1112392225-3391452307-1392475534" />*
*  </System>*
*  <UserData>*
*    <VmlEventLog xmlns="http://www.microsoft.com/Windows/Virtualization/Events">*
*      <VmName>QA-VM-2K16</VmName>*
*      <VmId>78462CB6-C221-424D-9374-25CA8E7DFF52</VmId>*
*      <ErrorCode>%%2147942402</ErrorCode>*
*      <HResult>0x80070002</HResult>*
*    </VmlEventLog>*
*  </UserData>*
</Event>

Log Name:      Microsoft-Windows-Hyper-V-Worker-Admin
Source:        Microsoft-Windows-Hyper-V-Worker
Date:          10/31/2017 3:03:18 PM
Event ID:      3042
Task Category: None
Level:         Error
Keywords:     *
User:          NT VIRTUAL MACHINE\78462CB6-C221-424D-9374-25CA8E7DFF52
Computer:      HV-A.COMPANY.COM
Description:
'QA-VM-2K16' could not reinitialize. (Virtual machine ID 78462CB6-C221-424D-9374-25CA8E7DFF52)
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
*  <System>

*    <Provider Name="Microsoft-Windows-Hyper-V-Worker" Guid="{51DDFA29-D5C8-4803-BE4B-2ECB715570FE}" />*
*    <EventID>3042</EventID>*
*    <Version>0</Version>*
*    <Level>2</Level>*
*    <Task>0</Task>*
*    <Opcode>0</Opcode>*
*    <Keywords>0x8000000000000000</Keywords>*
*    <TimeCreated SystemTime="2017-10-31T19:03:18.491723100Z" />*
*    <EventRecordID>14903</EventRecordID>*
*    <Correlation />*
*    <Execution ProcessID="22048" ThreadID="19608" />*
*    <Channel>Microsoft-Windows-Hyper-V-Worker-Admin</Channel>*
*    <Computer>HV-A.COMPANY.COM</Computer>*
*    <Security UserID="S-1-5-83-1-2017864886-1112392225-3391452307-1392475534" />*
*  </System>*
*  <UserData>*
*    <VmInitialize xmlns="http://www.microsoft.com/Windows/Virtualization/Events">*
*      <VmName>QA-VM-2K16</VmName>*
*      <VmId>78462CB6-C221-424D-9374-25CA8E7DFF52</VmId>*
*    </VmInitialize>*
*  </UserData>*
</Event>

 


Wednesday, November 8, 2017 1:17 PM

i had teh same issue, server 2016 core on the host and a single guest server 2016 DC.  guest would only shutdown and not reboot. I did a live migration to another server and this appears to have cleared up.  it would seem to support the idea that the permissions had some how changed on the server files and when i live migrated the permissions were recreated on the files and it now works like a champ.  Thanks for all of the post here.  it really helped to get this one narrowed down.

Mark Myerscough, Ph.D. Director, Information Technology Wilber and Associates, P.C.


Wednesday, December 27, 2017 11:49 AM

I have the same issue on Hyper-V 2016 Core

My two hosts are outside AD, there is nothing I can do to them, affected VM's are 2008 R2 and 2012 R2 x64.

I'm thinking that this is related to an hardware driver installed in VM which should not be installed in the first place.


Thursday, December 28, 2017 6:15 PM

Just the other week I had this again on another new 2016 server.  As soon as it happened, I blew away 2016 and went back to 2012 R2.  I just don't trust Hyper-V on 2016 to stay running

For clients that insist on using the latest and not so greatest, I found disabling all dynamic memory and insuring 2016 allows NUMA spanning offers the best results.

Most of these new systems also have rather huge arrays or large drive volumes.  I found formatting everything with a 64K sector size seems to help but I can't confirm this.

Yes yes and yes.  2012 R2 is flawless in this regard. 

With 2016 I share your findings.  I also found the combination of large 64K sectors for the VM VHDX file volumes, disabling all dynamic memory and enabling NUMA spanning seems to have solved the VM issue on all of the 2016 servers I am responsible for.


Friday, December 29, 2017 8:59 PM

I am using the Automatic stop action of "Shut Down" because that's what I want it to do. I'm storing my VMs, and smart paging, on a secondary drive, because my backup solution needs me to do it that way, and I wanted to. I'm storing the configuration files in the default location, so they get backed up.

This shutdown-no-reboot-syslog-error-3072 issue was frustrating to me, as I didn't want my system drive filling up with smart paging files, so I carefully compared the permissions from my target folder to the default (C:\ProgramData\Microsoft\Windows\Hyper-V). Identical, down to the special permissions. When I had changed the targets in the Hyper-V setting, (or less likely on import of my VMs) it had applied identical settings very helpfully, but the reboots were still not working.

My solution: To the root folder for VM Storage, I changed the permissions for the principal "Virtual Machines" from special/read to Full Control. Voila, magically fixed. Sorry that I may have weakened security somehow, but now my machine will reboot. Really Need MS to address this properly, but hope this workaround helps you guys.


Thursday, January 4, 2018 1:35 PM

Hi, thanks for reply,

In my case disabling checkpoint fixed this issue with powering off istead of restart of the machine...

M.

Marian, just trying to help you


Thursday, February 8, 2018 3:48 PM

If I try to restart a virtual machine, hyper-v always turns them off instead of rebooting.  I have to use the hyper-v manager to manually start every instance if a restart was issued within the VM.  It does not seem to matter what OS the VM is, it happens with Linux, server 2016 and 2012 R2 instances.

I notice an error:  'VM-****' could not reinitialize. (Virtual machine ID *******-****-****-****-************)

I thought at first it might be permissions but the hyper-v host is in an OU with blocked inheritance.

What might be causing VM's to fail to reinitialize? 

I seem to be having success by changing the permissions on the Virtual Machine principal to Full Control.

And in regard to that account; check that it is there in the path and inheriting into your VM container tree. I noticed that any VM I created from scratch had the account but those I migrated from older 2008 did not.

The Virtual Machine account can't be added via the GUI but can be via icacls. I went to the top of my VM tree and executed this:

>icacls d:\my\path /grant "*S-1-5-83-0":(oi)(ci)F

I'll break that down. I am granting to the SID of the Virtual Machine principal Full control. The (oi)(ci) sets the inheritance to "apply to all subfolders and files".

You may then need to do some manual cleanup of the subtree.

Anyway, fingers crossed.


Friday, July 20, 2018 3:57 AM

Ths is almost always a permission issue.

If you have moved your checkpoint location, this is probably the number 1 cause.  The new location of the checkpoint folder probably doesn't have the "Virtual Machines" security group on it.  The proper permissions need to be applied to wherever you've put your checkpoints.

The folder that has your virtual machine data (.vmcx, .vmrs files) should have the proper permissions on it.  Try moving it in there. If the folder that holds this virtual machine data does not have this security group applied, that can also cause this problem.

As others mentioned, in order to add proper security to these folders, you need to use the command line to add the proper permissions.  Let's pretend that your VM configuration files and checkpoints were both set to the same folder, (E:\Hyper-V\MyVM\VMconfigurations ) .The permissions normally granted are the following:

>icacls "E:\Hyper-V\MyVM\VMconfigurations" /grant "*S-1-5-83-0":(ci)(WD,AD)

>icacls "E:\Hyper-V\MyVM\VMconfigurations" /grant "*S-1-5-83-0":(ci)R

You can give full permission, but that could potentially be a security risk.  

So, the folder that holds your checkpoints needs this permission, and the folder that holds your .vmcx and .vmrs files needs these permissions.  If you don't have it, you will have strange issues.  

There are some other permissions on these folders too.  Creator Owner needs full control, System needs full control,  and the local administrators group should have full control... but these permissions should be defaults inherited from the root folder.