Article ID: 8592, created on Jun 15, 2010, last review on Feb 2, 2015

  • Applies to:
  • Virtuozzo containers for Windows

Symptoms

  1. A container cannot start with the error below:

    ERROR:Windows API function call 'RegUnLoadKey' failed, code 0x57 vzCTID
    ERROR:Windows API function call 'VzkrnlLoadHive' failed, code 0x2 CTID
    
  2. There is no S-1-5-19_Classes and S-1-5-20_Classes branches in the container registry:

    C:> vzctl mount CTID
    C:> reg query HKLM\vzCTID\USER\S-1-5-19_Classes /ve
    ERROR: The system was unable to find the specified registry key or value.
    

Cause

Missing S-1-5-19_Classes and S-1-5-20_Classes branches in the container registry prevents the container from starting.

Resolution

  1. Use the following command to find where the container is located:

    vzquota stat 151
    
    disk  resource   usage     hardlimit  path
         C:    1k-blocks  4538498  8192000  E:\vz\Private\151\151.efd
    
  2. Use this command to get the container's GUID and mount the container:

    vzcfgt get 151 guid
    {2F5594665-30A0-4472-9F6F-F7CBB106DB91}
    
    vzdskctl mount E:\vz\Private\151\root.efd {2F5594665-30A0-4472-9F6F-F7CBB106DB91}
    SUCCESS 
    
  3. Create a temporary directory and set the mount point of the container's image to it:

    mkdir c:\vz\temp\mp151
    
    vzdskctl set_mp "c:\vz\temp\mp151" "{2F5594665-30A0-4472-9F6F-F7CBB106DB91}"
    SUCCESS
    
  4. Load the 'user' registry hive from inside the container:

    reg load HKLM\temphive C:\vz\temp\mp151\vzquota\user
    The operation completed successfully.
    
  5. Create a fix.reg file with the following content:

    ---------------------------------------------
    Windows Registry Editor Version 5.00
    [HKEY_LOCAL_MACHINE\temphive\S-1-5-19_Classes]
    [HKEY_LOCAL_MACHINE\temphive\S-1-5-20_Classes]
    ---------------------------------------------
    
  6. Merge it:

    fix.reg
    
  7. Unload the hive:

    reg unload HKLM\temphive
    
  8. Unmount the container:

    vzdskctl umount {2F5594665-30A0-4472-9F6F-F7CBB106DB91}
    
  9. Remove the temp directory:

    cmd /c rmdir C:\vz\temp\mp151
    
  10. Start the container:

    vzctl start 151
    

Search Words

code 0x2

Windows API function call 'RegUnLoadKey' failed, code 0x57

RegUnLoadKey

VzkrnlLoadHive

parallels services cannot automatic start after reboot

code 0x57

Windows API function call 'VzkrnlLoadHive' failed, code 0x2

ERROR:Windows API function call 'VzkrnlLoadHive' failed, code 0x2

S-1-5-20_Classes

ERROR:Windows API function call 'RegUnLoadKey' failed, code 0x57

S-1-5-19_Classes

965b49118115a610e93635d21c5694a8 d02f9caf3e11b191a38179103495106f 2897d76d56d2010f4e3a28f864d69223

Email subscription for changes to this article
Save as PDF