The following steps will let you accomplish the task.
- Backup the image first.
- Check if it is in qcow2 format:
file winxp.qcow2
- Boot the image and take note of the current sizes of the entire disk (use fdisk command) and partitions (use df command).
- Resize the image (for example add 10GB of unallocated space):
qemu-img resize winxp.qcow2 +10GB
- Run qemu to boot the gparted[1] live cd:
qemu-system-i386 -hda winxp.qcow2 -cdrom gparted-live.iso -boot d
- From within gparted live resize the nearly full partition to "eat" the unallocated space we added (10 GB). Apply the changes. You may need to move partitions especially if you have many. Exit from gparted live.
- Boot the image and check if the changes have been reflected. Again use df and fdisk commands.