I added a virtual network card from a physical network card to the xml file of the virtual machine.
<devices>
<interface type='hostdev' managed='yes'>
<driver name='vfio'/>
<source>
<address type='pci' domain='0x0000' bus='0x86' slot='0x0a' function='0x7'/>
</source>
<mac address='52:54:00:6d:90:02'/>
</interface>
</devices>
When I execute virsh define, I get error info
error: failed to connect to the hypervisor
error: Failed to connect socket to '/var/run/libvirt/libvirt-sock': Connection refused
I tried reinstall libvirt qemu ,but no effect.
Try these steps:
Exit the session and again logged in then,