You might be better off rebuilding. It shouldnt be that hard albeit slightly time consuming. Is this a production environment or is it a lab/test area? 

Two possible ways for this, I think...

1.) Not sure if HE will use it but if you right click on the HostedEngine VM in the web UI and click edit, then "Initial Run" you may be able to use this and set a new root password there and then reboot it. oVirt HE should pick up the new settings, however, I have only used this on glance VM templates and had moderate success there so not sure if this will work for HE
or
2.) And be very cautious, again could be a complete hack....shut down the hosted engine and navigate to its disk storage. Take a backup of the image with qemu-img or rsync --sparse. You can then mount the HE raw disk with a loopback device, activate the LVMs, and then remove the root password from there. Not sure if RHEL7, systemd, or SELinux will block this on reboot, but it'd be my last ditch resort but only after rebuilding the cluster is out of the question 

On Sat, Oct 28, 2017 at 5:25 PM, Chas Ecomm <chashock@speakfree.net> wrote:

TIA for any guidance you can give me here, I’m in a bit of a pickle and have spent many hours reading many posts and blogs that don’t seem to get me where I need to be, and despite my gut feeling that someone has had to have dealt with this somewhere else, my google-fu is failing me in finding anyone who has dealt with this particular problem.

 

My issue:

 

I’ve inherited a 4.1 hosted-engine setup.  This is for a non-profit, so the previous consultant did what she could to save capital expense by using older gear and oVirt rather than VMware/Hyper-V and newer equipment.  For the most part it has worked quite well as I understand it.  This particular setup has gone from 3.5 with a standalone engine to 4.1 with a hosted engine, in case that matters.

 

The VMs hosted on the 2 clusters associated with this engine are currently working fine, but I am trying to get into the hosted-engine VM, and either there was a problem with the root password during setup and the hosted-engine-setup script didn’t catch it or I’ve been given a bad password.  The previous admin didn’t setup any alternative users, which is a major no-no in my book, and so I’m trying to do that – but I can’t login to the VM.  I can log into the portal and manage the hosts, storage, VMs, etc., just not the HEVM.  As I understand it, even if I could set aside my need for alternate users, when it comes time to upgrade I will need access to the HEVM, so I have to solve this at some point.

 

If this were a physical machine, I’d reboot in single user mode and work at things from there, but it’s not, and I’ve not found a good guide to get to the engine console to put it into single user mode.  I’ve found lots (and lots, and lots) of links on the oVirt docs site regarding hosted engine setups that simply don’t exist as pages anymore and others that don’t address this issue, as well as a couple of links on the RedHat site that made me think I could connect via ssh to the host running the VM, and do some sort of X forwarding, but I haven’t come anywhere close to success with that, and since I can’t log into the VM, I’m not sure how that would work anyway.  I’ve always struggled with X forwarding, too, so that doesn’t help, I’m sure.

 

I read a few posts from what look like the early days of the hosted-engine OVA implying you could launch a console from the management portal and maybe try to reboot and set single user mode there, but they all dead-ended.  Also, I may be confused on how the hosted engine works (I find this much more confusing than either VMware or Hyper-V), but if I’m connected to the console via the oVirt management portal and I reboot the VM to try and get into single user mode, wouldn’t I lose my connection and still not be able to get into single user mode?

 

I can connect via hosted-engine –console, but that asks me for the root password, which of course I don’t have. 

 

Am I just doomed to have to rebuild this whole set of servers from scratch or is there some way I could either re-run hosted-engine –deploy so I can set the root password and not lose my current config; or alternatively is there a way to get the VM into single user mode and accessible so I can use normal Linux practices for a lost root password?

 

Thanks for listening and for any help you can possibly give.  I’m sure there’s some simple thing that I’ve overlooked, but after hours and hours of trying to solve this one on my own, I have to admit the need for help.

 

Thank you!!!!


_______________________________________________
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users