Article ID: 113771, created on Apr 26, 2012, last review on Nov 16, 2014

  • Applies to:
  • Virtuozzo containers for Windows 4.6
  • Virtuozzo containers for Windows 4.5
  • Virtuozzo containers for Windows 4.0

Symptoms


A container does not start with this error: 'RegUnLoadKey' failed, code 0x57:
C:\Users\Administrator>vzctl start 101
Starting container ...
Windows API function call 'RegUnLoadKey' failed, code 0x57 vz101
Windows API function call 'RegUnLoadKey' failed, code 0x57 vz101
Windows API function call 'RegUnLoadKey' failed, code 0x57 vz101
Windows API function call 'RegUnLoadKey' failed, code 0x57 vz101
Windows API function call 'RegUnLoadKey' failed, code 0x57 vz101
Windows API function call 'RegUnLoadKey' failed, code 0x57 vz101
Windows API function call 'RegUnLoadKey' failed, code 0x57 vz101
Windows API function call 'RegUnLoadKey' failed, code 0x57 vz101
Windows API function call 'RegUnLoadKey' failed, code 0x57 vz101
Windows API function call 'VzkrnlLoadHive' failed, code 0x5 CTID 101
Cannot mount disk for container 101

Cause

Most likely, some of the container registry hives did not get unmounted. Normally, the container registry is not mounted when a container is in the "stopped" state.

The below commands for the stopped container should not list any registry entries:
reg query hklm\vzCTID

reg query hku\veCTID_users

Example of broken container:
C:\Users\Administrator>vzlist 101

     VEID  NPROC  STATUS   IP_ADDR  HOSTNAME
      101     --  stopped  --       CT101

C:\Users\Administrator>reg query hklm\vz101\machine

HKEY_LOCAL_MACHINE\vz101\machine\COMPONENTS
HKEY_LOCAL_MACHINE\vz101\machine\HARDWARE
HKEY_LOCAL_MACHINE\vz101\machine\SAM
HKEY_LOCAL_MACHINE\vz101\machine\SECURITY
HKEY_LOCAL_MACHINE\vz101\machine\SOFTWARE
HKEY_LOCAL_MACHINE\vz101\machine\SYSTEM

C:\Users\Administrator>reg query hku\ve101_users

HKEY_USERS\ve101_users\.DEFAULT
HKEY_USERS\ve101_users\S-1-5-19
HKEY_USERS\ve101_users\S-1-5-19_Classes
HKEY_USERS\ve101_users\S-1-5-20
HKEY_USERS\ve101_users\S-1-5-20_Classes

Resolution


  1. Rename the container configuration file and private area folder:
    ren VZROOT\Conf\CTID.conf CTID.conf.hide
    ren VZROOT\private\CTID CTID.hide
  2. Unload the mounted hive(s):
    reg unload hklm\vzCTID
    reg unload hku\vzCTID_users
  3. Rename the container configuration file and private area:
    ren VZROOT\Conf\CTID.conf.hide CTID.conf
    ren VZROOT\private\CTID.hide CTID

You should now be able to start the container without any issues.

6c20476fe6c3408461ce38cbcab6d03b d02f9caf3e11b191a38179103495106f 965b49118115a610e93635d21c5694a8 28d0f7cc091e3b9304fa556c03f9a940 d09cb2230ee0cfa720ed0f2a3cc39452 2897d76d56d2010f4e3a28f864d69223

Email subscription for changes to this article
Save as PDF