Virtual Disk Management Utilities

The prl_disk_tool utility is used to manage virtual hard disk drives.

Only use prl_disk_tool on disks of stopped virtual machines.
1
2
prl_disk_tool <command> [<options>] --hdd <disk_path> [<options>]
prl_disk_tool --help

prl_disk_tool compact

Removes all empty blocks from the expanding virtual disk to reduce its size on the physical hard disk. The virtual disk must be formatted to NTFS, ext2/ext3/ext4, btrfs, or xfs.

1
2
prl_disk_tool compact --hdd <disk_path> [--force]
prl_disk_tool compact -i, --info --hdd <disk_path>
NameDescription
--hdd <disk_path>Full path to the virtual disk.
--forceForces the compacting operation for suspended virtual disks.
-i, --infoDo not compact the virtual disk; just display the information about the size the disk will have after compacting.

prl_disk_tool merge

Merges all snapshots of the virtual hard disk.

1
prl_disk_tool merge --hdd <disk_path>
NameDescription
--hdd <disk_path>Full path to the virtual disk.

prl_disk_tool resize

Changes the capacity of the specified virtual disk. During resizing, all data present on the disk volumes are left intact. You can also resize the last partition using the --resize_partition option. The supported file systems are NTFS, ext2/ext3/ext4, btrfs, or xfs.

1
2
3
prl_disk_tool resize --size <size>[K|M|G|T] [--resize_partition]
                     --hdd <disk_path> [--force]
prl_disk_tool resize -i, --info [--units <K|M|G|T>] --hdd <disk_path>
NameDescription
--sizeThe new size of the virtual disk. It can be set in kilobytes (K), megabytes (M, default), gigabytes (G), or terabytes (T).
--resize_partition

Resizes the last partition of the specified virtual disk.

You cannot reduce XFS file systems (the default choice for CentOS 7 and Red Hat Enterprise Linux 7).
--hdd <disk_path>Full path to the virtual disk.
--forceForces the resizing operation for suspended virtual disks.
-i, --infoDo not resize the virtual disk; just show the size the disk will have after resizing.
--unitsDisplays the disk size in kilobytes (K), megabytes (M, default), gigabytes (G), or terabytes (T).