Re: Statically Defining a Network

2024-06-12 Thread Andrea Bolognani
On Tue, Jun 11, 2024 at 04:23:33PM GMT, richard.schmitt--- via Users wrote:
> We install libvirt in a AlmaLinux 9 Kickstart file.  The version of
> libvirt we are using is 10.0.0.
>
> What we'd like to do is to statically define a network in the
> kickstart file without having to run `virsh net-define`.  In other
> words, we had hoped that by installing a .xml file in
> /usr/share/libvirt/networks, that that network would be recognized
> by libvirt the first time the system is booted.  This does not
> appear to be the case.
>
> Is there a way to statically define libvirt networks without
> needing to run 'virsh net-define'?

You need to install the file in /etc/libvirt/qemu/networks instead.
If you want the network to be autostarted, you also need to create a
symlink in /etc/libvirt/qemu/networks/autostart that points to the
network XML and has a matching name.

-- 
Andrea Bolognani / Red Hat / Virtualization


vfio usage in a vm

2024-06-12 Thread daggs via Users
Greetings,

I wanted to know if it is possible to attach a virtual nic (shows up as 02:01.0 
Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8100/8101L/8139 PCI 
Fast Ethernet Adapter (rev 20)) to the vfio module, when I modprobe it I get 
this error:
[  854.624668] vfio-pci: probe of :02:01.0 failed with error -22

Thanks,

Dagg