Re: vepa-mode directly attached interface

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

 



On Sun, Jun 12, 2022 at 00:16:20 +0200, Gionatan Danti wrote:
> Il 2022-06-11 19:32 Laine Stump ha scritto:

[...]

> > I guess you'll need to do a "virsh dumpxml --inactive" for each guest
> > and parse it out of there.
> 
> It matches my results. However, virsh dumpxml is an expensive operation -
> polkitd can easily burn >30% of a single core for 1s polling interval with
> virsh dumpxml. I settled (for testing) with grepping "mode..vepa" in
> /etc/libvirtd/qemu and it seems to work well (1s polling not even register
> in top).

The unfortunate thing about using `virsh dumpxml $VM` as written is that
it opens a connection (which uses polkit to auth), gets the XML and then
closes the connection.

If you want it to be more optimized you can e.g. write a script using
python bindings for libvirt and simply keep the connection open ...

> Does libvirt support calling some external script when a new virtual machine
> is defined?

... which additionally allows you to register 'domain lifecycle events'
[1] which give you a trigger when a new VM is defined.


https://www.libvirt.org/html/libvirt-libvirt-domain.html#virConnectDomainEventRegister
https://www.libvirt.org/html/libvirt-libvirt-domain.html#virDomainEventID




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

  Powered by Linux