Reducing the Virtual Disk Capacity
Parallels Server Bare Metal provides a possibility to reduce the size of an expanding virtual disk by setting the limit the disk cannot exceed. In general, the process of reducing a virtual disk includes these steps:
-
Finding out the minimum capacity to which the disk can be reduced.
-
Running the
prl_dsk_tool resize
command to reduce the disk.
Checking the Minimum Disk Capacity
Before reducing a virtual disk, you may wish to see the minimum capacity to which it can be reduced. To do this, use the
prl_disk_tool resize --info
command. For example, you can run the following command to get detailed information on the
MyVM-0.hdd
disk:
# prl_disk_tool resize --info --hdd /vz/MyVM.pvm/MyVM-0.hdd
Operation progress 100 %
Disk information:
Size: 65537M
Minimum: 2338M
Minimum without resizing the last partition: 65523M
The information on the virtual disk is presented in the form of the following table:
Column Name
|
Description
|
Size
|
The virtual disk disk capacity, in megabytes, as it is seen from inside the virtual machine.
|
Minimum
|
The virtual disk capacity, in megabytes, after resizing the disk using the
prl_disk_tool
utility with the
--resize_partition
option.
|
Minimum without resizing the last partition
|
The virtual disk capacity, in megabytes, after resizing the disk using the
prl_disk_tool
utility without the
--resize_partition
option.
|
Reducing the Disk Size
Once you know the minimum capacity of the virtual disk, you can start reducing it. For example, to reduce the
MyVM-0.hdd
disk to 30 GB, you can execute the following command:
# prl_disk_tool resize --size 30G --hdd /vz/MyVM.pvm/MyVM-0.hdd --resize_partition
Operation progress 100 %
When reducing the disk capacity, keep in mind the following:
-
You cannot reduce the capacity of a virtual disk if the virtual machine using this disk is running.
-
The virtual machine using the virtual disk you want to configure must not have any snapshots. Otherwise, you will be informed of this fact:
# prl_disk_tool resize --size 68000 --hdd /vz/MyVM.pvm/MyVM-0.hdd/
This disk has one or more snapshots and cannot be resized.
You need to delete snapshots using the pctl tool before resizing the disk.
In this case, you should delete all existing snapshots and run the command again. To learn how to delete virtual machine's snapshots, refer to
Deleting a Snapshot
.
-
The capacity of an expanding virtual disk shown from inside the virtual machine and the size the virtual disk occupies on the server's physical disk may differ.
|