[prev in list] [next in list] [prev in thread] [next in thread]
List: libvirt-users
Subject: Re: How to configure the default connection for virsh
From: Nir Soffer <nsoffer () redhat ! com>
Date: 2024-04-18 20:53:33
Message-ID: CAMRbyyvv9UWuPxsPnYiA5Nk+6ankdVT9NcEPnOZsH2OyeB2paA () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
On Thu, Apr 18, 2024 at 5:20 PM Daniel P. Berrangé <berrange@redhat.com>
wrote:
> On Thu, Apr 18, 2024 at 05:07:24PM +0300, Nir Soffer wrote:
> > We are using minikube vms, which require adding the user to to libvirt
> > group[1].
> > We use `virsh -c qemu:///system` for debugging these vms or related
> libvirt
> > networks.
> >
> > Using virsh without specifying the '-c' argument is a common mistake that
> > leads to
> > trouble, for example creating the libvirt default network incorrectly.
> >
> > I wonder if it is possible to configure virsh so it uses -c
> qemu:///system
> > by default?
>
> The $HOME/.config/libvirt/libvirt.conf client config file can contain
>
> uri_default = "qemu:///system"
>
> Or you can set per shell with
>
> export LIBVIRT_DEFAULT_URI=qemu:///system
>
> Or you can set it just for virsh with
>
> export VIRSH_DEFAULT_CONNECT_URI=qemu:///system
>
> See:
>
> https://libvirt.org/uri.html#default-uri-choice
> https://libvirt.org/manpages/virsh.html#environment
>
>
Awesome, thanks!
[Attachment #5 (text/html)]
<div dir="ltr"><div dir="ltr">On Thu, Apr 18, 2024 at 5:20 PM Daniel P. Berrangé \
<<a href="mailto:berrange@redhat.com">berrange@redhat.com</a>> \
wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" \
style="margin:0px 0px 0px 0.8ex;border-left:1px solid \
rgb(204,204,204);padding-left:1ex">On Thu, Apr 18, 2024 at 05:07:24PM +0300, Nir \
Soffer wrote:<br> > We are using minikube vms, which require adding the user to to \
libvirt<br> > group[1].<br>
> We use `virsh -c qemu:///system` for debugging these vms or related libvirt<br>
> networks.<br>
> <br>
> Using virsh without specifying the '-c' argument is a common mistake \
that<br> > leads to<br>
> trouble, for example creating the libvirt default network incorrectly.<br>
> <br>
> I wonder if it is possible to configure virsh so it uses -c qemu:///system<br>
> by default?<br>
<br>
The $HOME/.config/libvirt/libvirt.conf client config file can contain<br>
<br>
uri_default = "qemu:///system"<br>
<br>
Or you can set per shell with <br>
<br>
export LIBVIRT_DEFAULT_URI=qemu:///system<br>
<br>
Or you can set it just for virsh with<br>
<br>
export VIRSH_DEFAULT_CONNECT_URI=qemu:///system<br>
<br>
See:<br>
<br>
<a href="https://libvirt.org/uri.html#default-uri-choice" rel="noreferrer" \
target="_blank">https://libvirt.org/uri.html#default-uri-choice</a><br> <a \
href="https://libvirt.org/manpages/virsh.html#environment" rel="noreferrer" \
target="_blank">https://libvirt.org/manpages/virsh.html#environment</a><br><br></blockquote><div><br></div><div>Awesome, \
thanks!</div><div> </div></div></div>
[Attachment #6 (text/plain)]
_______________________________________________
Users mailing list -- users@lists.libvirt.org
To unsubscribe send an email to users-leave@lists.libvirt.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic