[libvirt-users] How to change the default connection of 'virsh' tool from 'qemu' to 'xen' ?

Erik Skultety eskultet at redhat.com
Fri Nov 2 07:22:05 UTC 2018


On Thu, Nov 01, 2018 at 05:20:46PM +0100, Andrea Bolognani wrote:
> On Thu, 2018-11-01 at 16:40 +0100, Erik Skultety wrote:
> > On Wed, Oct 31, 2018 at 05:33:09PM +0100, Martin Kletzander wrote:
> > > On Wed, Oct 31, 2018 at 09:32:30AM +0100, Andrea Bolognani wrote:
> > > > On Wed, 2018-10-31 at 10:56 +0900, Minjun Hong wrote:
> > > > > I searched how to change it but, I only found a bypass adding " LIBVIRT_DEFAULT_URI='xen:///' " in my .bashrc file.
> > > > > Currently, value of the variable (LIBVIRT_DEFAULT_URI) is set to 'qemu:///'.
> > > > > Since the bypass makes the virtualization type of the server visible 'qemu' to the open stack, I have to change libvirt configuration.
> > > > >
> > > > > I also checked some configure files under '/etc/libvirt', such as libvirt.conf, libvirtd.conf and libxl.conf.
> > > > > But I have no idea, how and what to change.
> > > > > Please give me some advise. It will be a big help for me.
> > > >
> > > > ... you can simply set
> > > >
> > > >  uri_default = "xen:///"
> > > >
> > > > in /etc/libvirt/libvirt.conf to change the system-wide default URI
> > > > without having to mess with environment variables.
> > >
> > > Or in .config/libvirt/libvirt.conf for a non-root user.
> >
> > Alternatively, you can set the following env variable in your .bashrc to the
> > desired URI:
> >
> > LIBVIRT_DEFAULT_URI
>
> ... Which, as you can see above, is exactly what OP is already doing
> and what they're looking for an alternative to ;)

Aaand I obviously should learn again how to read, sorry...

>
> Also note that, at least as far as I understand, they want to make
> sure the xen:/// default URI is picked up by an high-level management
> application (in this case OpenStack), which suggests the new default
> should be set globally rather than per-user, which is the reason why

Yeah, agreed.

Erik




More information about the libvirt-users mailing list