Most of the time when you install a linux system, and when not making usage of LVM, the default parition layout will consist of something like a large main partition, and an extended partition with a swap volume on it.
If you want to extend a disk of a linux virtual machine, you will have to reconfigure your disk on the hypervisor, and afterwards, re-arrange your partition lay-out on your linux virtual machine. This howto serves as a working procdure to resize your virtual disk in the right way.
First disable your swap space.
$ swapoff /dev/sda5
Comment out the swap partition out in /etc/fstab
Now edit your partition table, delete the swap partitions:
$ fdisk /dev/sda #-- delete partition 5, then 2 and write changes #-- shutdown the vm #-- resize vm disk in hypervisor #-- boot up the vm
Now edit your partition table to resize your main partition, and re-create the swap partition:
$ fdisk /dev/sda #-- delete partition 1, and recreate it with new size leaving room for swap partition #-- create extended partition 2 #-- create logical partition 5 #-- change type of logical partition to 82 #-- write changes #-- reboot $ mkswap /dev/sda5 $ blkid /dev/sda5 #-- enter uuid in /etc/fstab #-- enter uuid in /etc/initramfs-tools/conf.d/resume $ update-initramfs -u $ reboot $ resize2fs /dev/sda1