If your disk size is running out you can easily extend the disk space on virtual image on ESXi side. But if within your VM container is running Linux the increase of disk size is a little bit tricky. Below you find a checklist how you increase the disk size of a linux partition. The checklist describes an extension of /dev/sda2 on Ubuntu Linux.
- Make a snapshot of the VM if something goes wrong
- Shut down VM
- Increase disk size of VM on ESXi side as desired
- Startup VM
- Show mounting Point
- Start fdisk
fdisk /dev/sda
- Select and delete 2. partition
Important: Write down starting sector value (in our example with /dev/sda2 is the starting sector 4096) and the file system type. You will need it by partition creation in the next step.p d 2
- Create new partition
Important: First sector value and file system type has to be the same as written down in step before. Do not change anything, otherwise you are going to loose data!n 2 4096 N w
- Resize disk
fsadm resize /dev/sda2
- Restart VM
- Now you should have an increased partition regarding to increased disk size