I have CentOS 5.5 running in a VM on XenServer. I've shutdown the VM, changed the hard drive size from 24GB to 30GB and rebooted it. The root partition (/dev/xvda1) is still showing the same size it was before.
How can I extend this partition?
You need to do two things:
1) resize the /dev/xvda1 with the partition editor of your choice and extend the partition. In fdisk this happens with deleting the partition and re-creating it with the exactly same starting block and with the new, bigger ending block. Then save changes and possibly reboot so the new partition layout gets activated.
2) resize the underlying filesystem; for example, an ext3 filesystem (which I suspect you have due the CentOS) would be resized with
Be sure to have backups of your virtual machine if you have anything important there!