Article ID: 1602, created on Oct 6, 2008, last review on May 11, 2014

  • Applies to:
  • Virtuozzo containers for Windows 4.5
  • Virtuozzo containers for Windows 4.0
  • Virtuozzo for Windows 3.5.1 SP1


To defragment a virtual disk of a certain container, simply run the standard defragmentation tool inside the container in the same way as with a physical server.

Starting from Parallels Virtuozzo Containers 4.0, by running the "vzctl defrag" command on the node, you can check the degree of the virtual disk fragmentation and, if necessary, improve the efficiency of virtual disks by performing defragmentation.

vzctl defrag CT_ID --drive drive [--force] [--analysis]

CT_ID is the ID of the container whose virtual disk drive you want to defragment/analyze.
--drive drive is the name of the drive to be defragmented/analyzed. A name can be specified in one of the following formats: X, X:, X:\.
--force is the option that forces disk defragmentation. You can use this option if you do not have enough free space on the virtual disk. Keep in mind that forcing a defragmentation when there is insufficient disk space may result in partial disk defragmentation.
--analysis is used to analyze the virtual disk without performing its defragmentation.

A real life example:

vzctl defrag 100 --drive D:

Note: Do not forget to make a backup before performing virtual disk defragmentation.

965b49118115a610e93635d21c5694a8 d02f9caf3e11b191a38179103495106f 1348db476c8a5844ffbef8d503db9c15 28d0f7cc091e3b9304fa556c03f9a940 d09cb2230ee0cfa720ed0f2a3cc39452 2897d76d56d2010f4e3a28f864d69223

Email subscription for changes to this article
Save as PDF