Basic steps are as follows.
- Shutdown VM
- From XenCenter, insert the CentOS iso into the VM’s Virtual DVD drive.
- Boot the CentOS VM in recovery mode. If you need help with that check this post out.
- On the grub menu, select recover OS Installation.
- Run through the recovery and mount the VM’s disk where CentOS is installed
- You should now be able to drop to a prompt and chroot /sysimage
- Change the root password with passwd
- Shutdown the VM
- Eject the CentOS iso
- Boot up the VM and login with the new password