Resize VMDK on ESXi

You've created a Linux guest VM on ESXi, but now it's outgrown its original storage requirements and you need to resize it.

ESXi 7.0 Ubuntu 18.04

  1. Navigate to web interface for ESXi. Find guest VM. You are not required to turn off the VM.

  2. Select VM. Edit. Hard disk - change size for disk (if there is datastore space available).

  3. SSH (or use console) into the guest VM. Make the following changes.

  4. No reboot required.

parted ---pretend-input-tty /dev/sda resizepart 2 100%
partx -u /dev/sda
pvresize /dev/sda2
lvextend -r vg/lv_root /dev/sda2
  • /dev/sda is the disk you've resized

  • /dev/sdaX is the partition you have an LV sitting in/on

  • /vg/lv_root is the logical volume name which you wish to resize

Source: https://www.ryadel.com/en/linux-resize-extend-disk-partition-unallocated-space-centos-rhel-ubuntu-debian-vm/

Last updated