scripted resize kvm images

view story

http://serverfault.com – I'm examining the possibility to script the resizing of a kvm image. The goal is to give our customers the possibility to upgrade their vps online. So for instance if a customer has a vps of 10G then they get the option to upgrade to 20G and set the time when the server restarts for the upgrade to take effect. The resizing of the image it self won't be much trouble, but how to script the resizing of the partition and file system inside the vps? I was wondering if it's possible to do this in a robust way and if someone has done this before. I couldn't find much about this on the internet. At (HowTos)