How to extend debian cloud partition

I often use debian cloud image both for lab and test virtual machines. By default, those images are only 2 GB and sometimes I need more space.

Step 1 : Extend “Physical disk”

On proxmox :

[VM] > Hardware > [disk] > Disk Action > Resize

On UTM :

[VM] > Settings > [disk] > Resize

Step 2 : Resize the partition

Start the VM and install cloud-guest-utils

apt install cloud-guest-utils

Resize the root partition with growpart

# growpart [disk] [partition number]
growpart /dev/vda 1

Restart and Voila !