Article ID: 114828, created on Sep 24, 2012, last review on Jun 17, 2016

  • Applies to:
  • Virtuozzo containers for Windows


This article describes how to perform container disk defragmentation on Parallels Virtuozzo Containers for Windows.

The following methods can be used to perform container's disk defragmentation:

  • Using vzctl defrag;
  • Switching the container disk to plain and then back to compact;
  • Using native Windows tools.

Avoiding high fragmentation

We suggest placing the \vz folder into a separate NTFS partition formatted with a 64K block size to reduce the container's root.efd file fragmentation:

  • 112845 VZ partition best practices

Checking container fragmentation

It is possible to check a container's disk fragmentation level using either a custom batch script or native Windows tools:

  • 114829 How to check a container's disk fragmentation level

Performing container defragmentation

Using vzctl defrag

vzctl defrag CTID

For additional disks:

vzctl defrag CTID --drive D:

NOTE: The command does not work for Windows 2008 R2 containers:

  • 8956 Disk defragmentation for Windows 2008 R2 containers fails when you launch it using the vzctl utility

Switching the container disk to plain and then back to compact

vzctl set CTID --save --disktype plain
vzctl restart CTID
vzctl set CTID --save --disktype compact
vzctl restart CTID

For additional container disks, it is possible to use the --drive option:

vzctl set CTID --save --disktype plain --drive D:
vzctl set CTID --save --disktype compact --drive D:

NOTE: The operation requires around 1.5 times the container diskspace limit on a partition with container private areas.

NOTE: This operation may be time consuming, depending on the container diskspace limit and overall disk I\O activity.

Using native Windows tools

Connect to the container (via RDP) and launch the defragmentation tool from the graphical interface or by using the command-line:

defrag /C /H /V

Search Words




defragmentation of container versus in virtuozzo


update crashed


Container not starting




2897d76d56d2010f4e3a28f864d69223 d02f9caf3e11b191a38179103495106f 965b49118115a610e93635d21c5694a8

Email subscription for changes to this article
Save as PDF