4.2. Virtual Disk Management Utilities

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

Warning

Only use prl_disk_tool on disks of stopped virtual machines.

prl_disk_tool <command> [<options>] --hdd <disk_path> [<options>]
prl_disk_tool --help

4.2.1. 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.

prl_disk_tool compact --hdd <disk_path> [--force]
prl_disk_tool compact -i, --info --hdd <disk_path>

Name

Description

--hdd <disk_path>

Full path to the virtual disk.

--force

Forces the compacting operation for suspended virtual disks.

-i, --info

Do not compact the virtual disk; just display the information about the size the disk  will have after compacting.

4.2.2. prl_disk_tool merge

Merges all snapshots of the virtual hard disk.

prl_disk_tool merge --hdd <disk_path>

Name

Description

--hdd <disk_path>

Full path to the virtual disk.

4.2.3. 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.

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>

Name

Description

--size

The 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.

Note

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.

--force

Forces the resizing operation for suspended virtual disks.

-i, --info

Do not resize the virtual disk; just show the size the disk will have after resizing.

--units

Displays the disk size in kilobytes (K), megabytes (M, default), gigabytes (G), or terabytes (T).