Open concaf opened 3 years ago
It's correct that crc provides no way of overriding qemu:///system, it expects that by adding the current user to the libvirt group, then access to qemu:///system will be passwordless.
Regarding your situation, reading https://libvirt.org/auth.html#Auth_client_config it seems setting LIBVIRT_AUTH_FILE=/etc/ovirt-hosted-engine/virsh_auth.conf
could avoid this issue?
@cfergeau thanks for the prompt reply.
So the user is already a part of the libvirt
group -
$ groups
server1 wheel libvirt
but that doesn't help. However, your other suggestion of setting LIBVIRT_AUTH_FILE
worked for me.
Unfortunately, it works fine for crc setup
but then fails again for crc run
, see logs here - https://paste.centos.org/view/7ca20233
Did you exported LIBVIRT_AUTH_FILE=<>
or you used LIBVIRT_AUTH_FILE=<> crc setup
? export should work for both the commands and also there are other way listed on same doc.
setup
uses virsh
, which uses virConnectOpenAuth(uri, virConnectAuthPtrDefault, 0)
to connect to libvirt, while start
goes through the libvirt machine driver, which uses libvirt-go directly, which uses virConnectOpen()
. Maybe the different behaviour comes from here.
@cfergeau In that case we should create/move this issue to driver side so we can able to create connection accordingly?
@cfergeau In that case we should create/move this issue to driver side so we can able to create connection accordingly?
If my theory is correct, at this point this is just an unverified guess :)
Yes, I export
ed LIBVIRT_AUTH_FILE
- it worked for crc setup
but not for crc start
. @cfergeau theory seems correct :)
One would expect all crc
subcommands to respect a given env var.
I filed https://gitlab.com/libvirt/libvirt-go/-/merge_requests/24 , when this is merged we'll have to figure out how to make use of this in the libvirt driver (where we prefer to keep a fixed libvirt-go version).
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
General information
crc setup
before starting it (Yes/No)? YesCRC version
CRC status
CRC config
Host Operating System
Steps to reproduce
I have oVirt installed on my machine and I believe it has set up SASL authentication for
virsh
. When I runsudo virsh list
, I need to provide authentication -or provide an authfile to
virsh
as such -Now, the problem is that CRC gives me no such option to pass credentials to
virsh
and hence it fails.crc setup
Expected
crc setup
should work.Actual
Logs
Already posted above