A container is in
startingstate for quite long time with more than 16 processes:
C:\>vzlist -a 101 VEID NPROC STATUS IP_ADDR HOSTNAME 101 32 starting 192.168.1.13 ct101
There is a hung
vzctl.exeprocess on the hardware node, related to the container:
C:\>wmic process WHERE "commandline like '%vzctl%' and name <> 'wmic.exe'" get processid,caption,commandline Caption CommandLine ProcessId vzctl.exe vzctl exec2 --skiplock 101 cmd /c mkdir "C:\System Volume Information" 59220
After killing the
vzctl.exeprocess and releasing the container, it is not possible to enter it:
C:\>vzctl enter 101 Microsoft Windows [Version 6.1.7600] Copyright (c) 2009 Microsoft Corporation. All rights reserved. The command prompt has been disabled by your administrator. Press any key to continue . . . VZExec: Returned with code 255 Command 'enter' is successfully finished
The issue comes from the fact that CMD access is disabled system-wide on the affected container:
C:\>reg query "HKEY_LOCAL_MACHINE\vz101\USER\.DEFAULT\Software\Policies\Microsoft\Windows\System" HKEY_LOCAL_MACHINE\vz101\USER\.DEFAULT\Software\Policies\Microsoft\Windows\System DisableCmd REG_DWORD 0x1
As a result,
vzctl exec actions, defined in the startup script for containers, cannot be executed and hang.
Enable CMD for the container:
C:\>reg delete "HKEY_LOCAL_MACHINE\vzCTID\USER\.DEFAULT\Software\Policies\Microsoft\Windows\System" /v DisableCmd /f
CTID with the proper container's ID value, keeping
vz in the registry key name).
That is, for the container #101, the command should be:
C:\>reg delete "HKEY_LOCAL_MACHINE\vz101\USER\.DEFAULT\Software\Policies\Microsoft\Windows\System" /v DisableCmd /f
112953 How to deal with container stuck in transitional status.
113519 No privileges to execute cmd.exe inside the container.
119081 "vzctl enter" fails. Failing service inside a container.
117863 "vzctl enter" fails. RDP attack.
115821 PVA Agent service is stuck in "START_PENDING" state.