Virsh Authorization
If Virsh is set for Auth
If attempting to use any virsh commands and get auth request you will either need the auth credentials or to create your own.Example:
$ virsh list
Please enter your authentication name: root
Please enter your password:
error: Failed to reconnect to the hypervisor
error: no valid connection
error: authentication failed: authentication failed
Solution
$ saslpasswd2 -a libvirt <username>
On April 1, 2020 4:53:42 AM GMT+03:00, Mark Steele <msteele@telvue.com> wrote:
>Hello,
>
>We are on an older version (3.x - cannot be specific as I cannot get my
>ovirt hosted engine up).
>
>We experienced a storage failure earlier this evening - the hosted
>engine
>was originally installed with this storage domain although we have
>moved
>all VM's and disks off of it.
>
>The storage was restored and all the VM's are now running, but the
>ovirt
>engine is not pinging and is unreachable.
>
>I have attempted to locate it on my HV's using 'virsh list --all' but
>only
>one of those is taking my credentials - all the others fail to
>authenticate.
>
>Is there a way to locate what the credentials are on each HV since the
>default is not working? Additionally, is there any other way to locate
>the
>hosted engine and restart it directly from a HV?
>
>Thank you for your time and consideration.
>
>
>***
>*Mark Steele*
For the virsh, I use this alias:
alias virsh='virsh -c qemu:///system?authfile=/etc/ovirt-hosted-engine/virsh_auth.conf'
In order to reach the HostedEngine, you need to first assign a console password:
hosted-engine --add-console-password --password=pass
It should provide you with IP/port for the console connection (I use VNC, but I'm not sure on v3.X).
Once you got a connection, you can try to fix the issue. Maybe it's just a bad entry in /etc/fstab .
Best Regards,
Strahil Nikolov