[ovirt-users] HEVM root reset?

Martin Sivak msivak at redhat.com
Tue Oct 31 09:23:05 UTC 2017


Hi,

you could also do this offline using libguestfs tools:

- Find the path to the disk using virsh -r dumpxml HostedEngine
- Stop the vm using hosted-engine --vm-shutdown
- and then use guestfish tool to edit the filesystem: guestfish --rw -a disk.img

Best regards

Martin Sivak

On Tue, Oct 31, 2017 at 9:00 AM, Simone Tiraboschi <stirabos at redhat.com> wrote:
> Hi,
> the simplest approach is:
>
> hosted-engine --set-maintenance --mode=global
> hosted-engine --vm-shutdown
> # wait for it
> hosted-engine --vm-start-paused
> hosted-engine --add-console-password
> # open a vnc or spice console pointing to the VM
> # when ready
> virsh -c qemu://$(hostname)/system resume HostedEngine
> # quickly stop the boot process from the vnc or spice console
> # force root password as for a regular el7 system
> # shutdown the engine VM
> hosted-engine --set-maintenance --mode=none
>
>
>
> On Sat, Oct 28, 2017 at 11:25 PM, Chas Ecomm <chashock at 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 at ovirt.org
>> http://lists.ovirt.org/mailman/listinfo/users
>>
>
>
> _______________________________________________
> Users mailing list
> Users at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users
>


More information about the Users mailing list