Article ID: 112936, created on Dec 2, 2011, last review on May 11, 2014

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


This article describes how to prepare containers with .NET Framework installed for mass cloning in order to speed up the deployment process and improve density.

Each time .NET update is installed the mscorsvw.exe performs assemblies cache optimization.
That means, if container with outdated .NET binary cache is used for mass cloning, the CLR optimization service will recompile assemblies for each cloned container after its start. 
The behavior can be observed when an existing container with Parallels Plesk Panel is cloned after several .NET updates were installed on the node. 

To minimize the impact of this process it is advised to prepare a sample container for cloning.


Follow these steps to prepare a sample container for mass cloning:
  1. Enter to a container which will be used as sample for cloning
  2. Run cmd.exe as Administrator
  3. Go to directory with .NET 32-bit assemblies and rebuild the cache:
    cd C:\windows\Microsoft.NET\Framework\v4.0.30319\
    ngen.exe update
    Wait until the operation is completed.
  4. Go to directory with .NET 64-bit assemblies and rebuild the cache:
    cd C:\windows\Microsoft.NET\Framework64\v4.0.30319\
    ngen.exe update
    Wait until the operation is completed.

Now this container can be used for cloning without the need to rebuild .NET cache upon each container start.

NOTE 1: Full .NET cache rebuild will require 2-3 hours
NOTE 2: On 64-bit nodes both 32-bit and 64-bit .NET caches should be rebuilt

Additional information

6c20476fe6c3408461ce38cbcab6d03b d02f9caf3e11b191a38179103495106f 965b49118115a610e93635d21c5694a8 d09cb2230ee0cfa720ed0f2a3cc39452 2897d76d56d2010f4e3a28f864d69223

Email subscription for changes to this article
Save as PDF