How to change VPS disk size manually

From ISPWiki
Jump to: navigation, search
Hierarchy: VMmanager KVM -> VIRTUAL MACHINES

In VMmanager you can enlarge the VPS disk size.

  • Currently it is not possible to enlarge disk size on the RBD storage
  • for enlarging disk size on File and NFS storages, you need to have libvirt 0.9.10 and later

VMmanager configuration

Enlarging disk size

Browse to the Virtual machines module, select your VPS and click the "Disks" icon


Select your disk and click "Edit"


Enlarge the disk size. ATTENTION You cannot reduce the disk size

and click "OK"

Please note: set a lower boot priority for booting from the rescue disk

Connecting the rescue disk

SSH access the server and execute the following commands

root@vm:~# cd /nfsshare/iso/
root@vm:~# wget -O rescueFree.iso ""
root@vm:~# wget -O rescue.iso "

Or download other iso that you like

In the "Virtual disks" module click "ISO".

  • For linux - rescue.iso
  • For FreeBSD - rescueFree.iso
  • For Windows you do not need to boot from ISO


Enlarging disk size on different systems


Boot from rescueFree.iso - LiveCD FreeBSD. Then select


Log in as root and execute (our disk is connected as vtbd0, we need the third section):

gpart recover /dev/vtbd0
gpart resize -i3 /dev/vtbd0
growfs /dev/vtbd0p3

Confirm that you want to enlarge the size. Connect ISO and boot into the system

Linux ext2/ext3/ext4

Boot from rescue.iso. Select the first variant


Log in as root and open

fdisk /dev/vda

We need the third action (type in the first letters, see comments after # ):

d # Delete the section (data  won't be deleted)
3 # Section number
n # Create a new section 
p # Primary
3 # Section number 

Fdisk will select the correct first and last section, you will only double-press Enter

w # specify  the new table on the disk 

Run the disk check

e2fsck -f /dev/vda3

Enlarge the FS

resize2fs /dev/vda3

That's all. Disable ISO and reboot


After you have enlarged the disk size, restart the VPS. Browse to Server Manager -> Disk Management

Right click to select your disk. Make Extend Volume


Confirm all the Wizard actons to enlarge the disk space