catern@catern.com
2016-Mar-03 15:20 UTC
[libvirt-users] Configuring default network/storage for qemu:///session
Hi libvirt-user, If I run (as a normal user): virsh -c qemu:///session net-list --all virsh -c qemu:///session pool-list --all I see a default network and a default pool. And indeed, these appear in the persistent configuration. It seems these are created the first time libvirtd is (auto)started in qemu:///session mode. Is it possible to configure the attributes of the default network and default pool that are created? This is to provide configuration for newly created users. Normally I would just put some default configuration in /etc/skel. But it seems that a UUID element needs to be present in the network and pool configuration. And so for my configuration to be correct I either need to wrap add some special sauce to adduser that generates several UUIDs and puts them in the configuration, or just generate the UUIDs in advance and let them be copied to all users. Currently I'm taking the second option, so all users have the same UUID for their default network and pool. I don't know if that might hurt me in the future, but it certainly seems distasteful. Thanks!
Daniel P. Berrange
2016-Mar-03 15:33 UTC
Re: [libvirt-users] Configuring default network/storage for qemu:///session
On Thu, Mar 03, 2016 at 10:20:41AM -0500, catern@catern.com wrote:> > Hi libvirt-user, > > If I run (as a normal user): > > virsh -c qemu:///session net-list --all > virsh -c qemu:///session pool-list --all > > I see a default network and a default pool. And indeed, these appear in > the persistent configuration. It seems these are created the first time > libvirtd is (auto)started in qemu:///session mode. Is it possible to > configure the attributes of the default network and default pool that > are created? > > This is to provide configuration for newly created users. Normally I > would just put some default configuration in /etc/skel.There's nothing in libvirt which auto-creates such resources by default. IIRC, it is probably virt-manager and/or GNOME Boxes applications which are creating them. Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
catern@catern.com
2016-Mar-03 16:03 UTC
Re: [libvirt-users] Configuring default network/storage for qemu:///session
"Daniel P. Berrange" <berrange@redhat.com> writes:> There's nothing in libvirt which auto-creates such resources by default. > > IIRC, it is probably virt-manager and/or GNOME Boxes applications which > are creating them.Ah, in this case it's virt-install, quite right. My mistake. Still, then, what would be best way to have some initial configuration for qemu:///session? The configuration in question is two networks, to use bridges that are set up on this system to be usable unprivileged with qemu-bridge-helper. Since I can't control, and don't want to try to control, what libvirt-consuming applications are run by the user, that method is out. So is there some way I can put the configuration in /etc/skel and have the UUID be autogenerated? Or am I going to have to write a script to be run on user-creation, to generate new UUIDs for each new user? Or does it not matter that all the network resources under the different users have the same UUIDs? Thanks.
Seemingly Similar Threads
- Re: Configuring default network/storage for qemu:///session
- Re: Configuring default network/storage for qemu:///session
- Re: Question about local migration between containers
- pigeonhole: upgrade 0.4.3 -> 0.4.6 broke script storage
- pigeonhole: upgrade 0.4.3 -> 0.4.6 broke script storage