How To Reset A Forgotten root Password On A Linux Virtual Machine on XenServer
From Xencenter select the virtual machine you want to boot in single user mode.
Shut down your virtual machine using the Xencenter controls.
Right click on the Boot Options for your virtual machine and select Properties.
Change the OS Boot Parameters to
NOTE If you already have something in the OS Boot Parameters you will need to take note of this as you will need to put it back once the password reset is complete.
Save and Start your virtual machine
Your system will now boot up in single user mode.
Now its time to change your password
machinename# passwd root
Type in your new password you will then be asked to confirm it.
Your password has now been reset.
Shutdown your virtual machine.
machinename# shutdown -h now
Now go Back to the Xencenter Application and Startup options and remove rw init=/bin/bash and change it back to whatever was there before.
Start up your virtual machine and you should be able to logon with your new root password.