[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é \
&lt;<a href="mailto:berrange@redhat.com">berrange@redhat.com</a>&gt; \
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> &gt; We are using minikube vms, which require adding the user to to \
libvirt<br> &gt; group[1].<br>
&gt; We use `virsh -c qemu:///system` for debugging these vms or related libvirt<br>
&gt; networks.<br>
&gt; <br>
&gt; Using virsh without specifying the &#39;-c&#39; argument is a common mistake \
that<br> &gt; leads to<br>
&gt; trouble, for example creating the libvirt default network incorrectly.<br>
&gt; <br>
&gt; I wonder if it is possible to configure virsh so it uses -c qemu:///system<br>
&gt; by default?<br>
<br>
The $HOME/.config/libvirt/libvirt.conf client config file can contain<br>
<br>
     uri_default = &quot;qemu:///system&quot;<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