Re: How to configure the default connection for virsh

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 18, 2024 at 5:20 PM Daniel P. Berrangé <berrange@xxxxxxxxxx> 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!
 
_______________________________________________
Users mailing list -- users@xxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxx

[Index of Archives]     [Virt Tools]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux