Article ID: 113437, created on Mar 10, 2012, last review on Feb 16, 2017

  • Applies to:
  • Virtuozzo containers for Windows 4.6

WARNING: This article should not be used with Virtuozzo containers for Windows 6.0.

Symptoms

There are system files (mostly libraries with a .dll extension or drivers with the .sys extension) that appear to have a size of zero, as seen inside the container or the %vzroot%\root\CTID\c directory tree on the node.

This can lead to a variety of symptoms:

  • The container cannot start with one of the following error messages:

    • Container 101 raised hard error with a status C0000135 and will be shutdown
    • Shutdown initiated while waiting for Winlogon in container 101
    • Parallels Virtuozzo Containers API function call 'VzkrnlStartVps' failed dwErr=0x000004FB - This error specifically points to broken drivers
    • Parallels Virtuozzo Containers API function call 'VzkrnlStartVps' failed dwErr=0x000003EE
    • Parallels Virtuozzo Containers API function call 'VzkrnlStartVps' failed dwErr=0x00000003
    • RootSession timeout (300 secs)
    • Failed to wait for SC_AutostartComplete in CT 101
    • Shutdown initiated while waiting for SCM (Service Control Manager) in container
  • The container starts, but some core system functionality is not working (Remote Desktop Protocol, Internet Explorer, and so on)
  • Applications malfunction or crash in the container
  • Other abnormalities in system behavior

This issue is likely to occur after container migration or a restore operation.

Cause

There is a known issue where update removal is handled incorrectly by Virtuozzo containers for Windows.

If several updates that patch the same file are installed on the source node and some of these are not installed on the destination node, Virtuozzo containers will remove the update from the container. The hardlink attribute to the WinSxS location also will be removed from the respective file. Since other updates are listed as installed in the container, the hardlink will not be recreated.

For more details on the Windows 2008 and Windows 2008R2 update installation mechanism, refer to this article:

113634 Microsoft Updates and Virtuozzo containers for Windows

Resolution

The examples below assume that your Virtuozzo root directory is D:\vz and the container ID is 101
To get a list of the zero-sized files, use the instructions at the end of this article.

It is essential you have a recent container backup before applying the resolution below.

Windows 2008 servers

To resolve the issue:

Step 0

In case the container status is stopped, mount it first:

vzctl mount 101

Step 1

Get the origin of the zero-sized file. This could be a Microsoft KB ID if the file came with a Windows Update, or the base OS file, which comes with the default Windows installation.

If the server has Windows Powershell installed, download the vzcbs.ps1 script and use it to detect where the file came from. Navigate to the directory where the script is located and run it as per the following examples.

Example of a Microsoft KB ID file:

PS C:\> ./vzcbs.ps1 -ctid 101 -path \Windows\System32\drivers\tcpip.sys
package_3_for_kb2868623

Example of a base OS file:

PS C:\> ./vzcbs.ps1 -ctid 50 -path "C:\windows\system32\aaclient.dll"
microsoft-windows-remotedesktopclient-winip-package

Alternatively, it is possible to scan through the container update log files to get the KB ID.

  1. Retrieve the exact link the file has:

    PS C:\> vzfsctl lnkctl 101 --link C:\vz\private\101\root\windows\system32\drivers\tcpip.sys | select-string "File is"
    File is a link: 63:{\Windows\WinSxs\amd64_microsoft-windows-tcpip-binaries_31bf3856ad364e35_6.1.7601.18203_none_114dcae97cfeb81b\tcpip.sys}
    

    If vzfsctl reports that "File is not link", check the following article:

    124308 File is not link: broken links after Windows updates installation

  2. Search for the exact version-hash in the logs:

    PS C:\> select-string "6.1.7601.18203_none_114dcae97cfeb81b" C:\vz\private\101\updates\*.info.txt -list
    
    vz\private\50\updates\KB2868623.info.txt:101:SF:0x2,"WinSxs\Manifests\amd64_microsoft-windows-tcpip-binaries_31bf3856ad364e35_6.1.7601.18203_none_114dcae97cfeb81b.manifest"
    

    Here we can see that the file comes from the KB2868623 update.

    The same can be done in cmd.exe if there is no Powershell available:

    C:\> find /C "6.1.7601.18203_none_114dcae97cfeb81b" C:\vz\private\101\updates\*.info.txt > results.out
    

    Open the results.out file and find the lines that are not 0:

    ---------- C:\VZ\PRIVATE\50\UPDATES\KB2868623.INFO.TXT: 4
    

    Here you will see the required KB ID.

    If the file cannot be found in the update logs, it is a base OS file.

Step 2

  • If it is a Microsoft KB:

    1. Get the origin of this file on the node:

      PS C:\> ./vzcbs.ps1 -path \Windows\System32\drivers\tcpip.sys
      package_5_for_kb2957189
      
    2. Remove the following registry entry for the container from the node side:

      reg delete HKLM\vz101\MACHINE\Software\Microsoft\Windows\Currentversion\Uninstall\KB2957189 /f
      
    3. Remove/rename the corresponding log files in the container's private directory:

      move D:\vz\private\101\updates\KB2957189.info.txt D:\vz\private\101\updates\KB2957189.info.txt.old
      move D:\vz\private\101\updates\KB2957189.install.txt D:\vz\private\101\updates\KB2957189.install.txt.old
      
  • If it is a base OS file, link it directly to the same file on the node:

    vzfsctl lnkctl 101 --link D:\vz\private\101\root\windows\system32\aaclient.dll --dst \windows\system32\aaclient.dll --system
    

    NOTE: UAC should be disabled on the hardware node, as this may block the usage of the vzfsctl utility and prevent you from relinking the file(s).

For more complex cases, it is recommended to contact Virtuozzo Support for a resolution.

Windows 2003 servers

Use the fixlinks2003.cmd script to forcibly relink all core system files to the same files on the hardware node. Navigate to the directory where the script is located and run it as in the following examples:

C:\> vzctl stop 101 && vzctl mount 101
C:\> .\fixlinks.cmd 101
C:\> vzctl start 101

If applications malfunction (e.g. Internet Explorer), the zero-sized files should be relinked one-by-one from the required directory. For example:

for %i in (iedvtool.dll ieproxy.dll jsdbgui.dll xpshims.dll) do vzfsctl lnkctl 101 --link "d:\vz\private\101\root\Program Files\Internet Explorer\%i" --dst "\Program Files\Internet Explorer\%i" --system

For more complex cases, it is recommended to contact Virtuozzo Support for a resolution.

Additional details

The following scripts can be used to list the zero-sized files inside a container.

Powershell

## defining CTID
$ctid = 101 
## getting the CT root directory location
$ctroot = vzcfgt getctroot $ctid C 
## mounting the CT in case it's not mounted
vzctl mount $ctid
## defining paths (they can be added or removed upon necessity)
$paths = ("$ctroot\windows\system32", "$ctroot\windows\syswow64", "$ctroot\windows\servicing", "$ctroot\windows\assembly", "$ctroot\windows\microsoft.net", "$ctroot\windows\fonts", "$ctroot\program files*") 
## C:\Windows directory is processed separately to avoid recursion
$files = @(); $files += ls -force "$ctroot\windows" 2>$null | ? { $_.PSIsContainer -eq $false -and $_.length -lt 1 -and $_.fullname -notmatch "\.dat\d?$|\.log\d?$|\.tme\d?$|\.tmp\d?$|\.err\d?$|\.web\d?$|regback|systemprofile|NativeImages|assembly\\temp" }
## All other directories are scanned recursively
foreach ($path in $paths) { $files += ls -force -recurse $path 2>$null | ? { $_.PSIsContainer -eq $false -and $_.length -lt 1 -and $_.fullname -notmatch "\.dat\d?$|\.log\d?$|\.tme\d?$|\.tmp\d?$|\.err\d?$|\.web\d?$|regback|systemprofile|NativeImages|assembly\\temp" } } 
## Getting the final output
$files | select -exp fullname 

cmd.exe

:: defining CTID
set ctid=101
:: getting the CT root directory location
for /f %i in ('vzcfgt getctroot %ctid% C') do set ctroot=%i
:: mounting the CT in case it's not mounted
vzctl mount %ctid%
:: defining path (they can be added or removed upon necessity)
set SYS32="%ctroot%\windows\system32"
set SYS64="%ctroot%\windows\syswow64"
set SERV="%ctroot%\windows\servicing"
set ASSEM="%ctroot%\windows\assembly"
set DOTNET="%ctroot%\windows\microsoft.net"
set FONTS="%ctroot%\windows\fonts"
set PROG="%ctroot%\program files"
set PROG86="%ctroot%\program files (x86)"
:: C:\Windows directory is processed separately to avoid recursion
for /f "tokens=4,5" %i in ('dir /a-d %ctroot%\windows') do if %i==0 echo "%ctroot%\windows\%j" >> zero.txt
:: All other directories are scanned recursively
for /f "delims=" %i in ('dir /b/s/a-d %SYS32% %SYS64% %SERV% %ASSEM% %DOTNET% %FONTS% %PROG% %PROG86%') do if "%~zi" leq "0" echo "%~fi" >> zero.txt
:: Getting the final output
type zero.txt | findstr /V /I ".dat .log .tme .tmp .mui .err .web regback systemprofile nativeimages assembly\temp "  

Search Words

container does not start

windows updates

container is stuck starting

ERROR:Parallels Virtuozzo Containers API function call 'VzkrnlStartVps' failed dwErr=0x0000013D

container won't start after restor

remote desktop font size

starting

unable to start container

Can't connect through RDP with container

System files not zero-sized, cannot create link

aaa

RootSession timeout

Fehler beim Laden des Plug-Ins für 481

container stuck in starting state

After migration CT not reachable anymore

migration container

Shutdown initiated while waiting for SCM (Service Control Manager) in container

update

dciman32.dll

dwErr=0x0000013D

Cant start container with error. virtuozzo

Issues with container winweb06

Shutdown initiated while waiting for LogonUI in container

dwErr=0x00000287

Cant connect to container through RDP because of diferent IE9 version

dwErr=0x00000003

RootSession timeout (300 secs)

dwErr=0x000003EE

C0000034=DrvrldrLoadBootDrivers failed

Parallels Virtuozzo Containers API function call 'VzkrnlStartVps' failed

Virtuozzo API function call 'VzkrnlStartVps' failed dwErr=0x0000013D

can't start container

vzKrnlStartVPS dwErr=0x000003EE

restart container

ERROR:Virtuozzo API function call 'VzkrnlStartVps' failed dwErr=0x0000013D

Faulting application name: Ssms.exe, version: 2007.100.1600.22, Faulting module path: KERNEL32.DLL

fd

Parallels Virtuozzo Containers API function call 'VzkrnlStartVps' failed dwErr=0x00000003

IIS Exception from HRESULT: 0x80070002

windows update

VzkrnlStartVps

container not reachable

Shutdown initiated while waiting for RootSession

C0000135

winlogon.exe has initiated the power off

Failed to wait for SC_AutostartComplete

Virtuozzo container RDP

Shutdown initiated

remote desktop

d02f9caf3e11b191a38179103495106f 2897d76d56d2010f4e3a28f864d69223 965b49118115a610e93635d21c5694a8 6c20476fe6c3408461ce38cbcab6d03b

Email subscription for changes to this article
Save as PDF