how to reset a VM's forgotten root password?

Hi,

How do I reset a virtual machine’s root password when the client has forgotten it, and Cloudmin reports “Login failed” with the password we have?

mount -o loop /xen/imagename.img /mnt/xen-imagename
chroot /mnt/xen-imagename

passwd root

exit
umount /mnt/xen-imagename

thanx. I was hoping there was an easier way, via the web interface.

Eric, could you please look into adding such an option?

There is a way to do this via the UI - just shut down the VM, then go to System Operations -> Change Password. This will update the VM’s filesystem directly, so it works even if Cloudmin cannot SSH into the system anymore.