Greetings,

I'm working on allowing a session vm to create a tap iface.
the vm has this defintion:
    <interface type='ethernet'>
      <mac address='52:54:00:a7:79:6b'/>
      <target dev='veth0'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x04' slot='0x00' 
function='0x0'/>
    </interface>

when I try to start the vm, I get this error: Unable to create tap device 
veth0: Operation not permitted
searching the code led me to this line: 
https://github.com/libvirt/libvirt/blob/0caacf47d7b423db9126660fb0382ed56cd077c1/src/util/virnetdevtap.c#L232
I've looked on line and found out I need the net_admin_cap set. so I took the 
relevant code in to a dedicated test file and using pam_cap I've defined such 
cap
for the test file, all went well.
so I took it back to virsh and defined that cap to virsh but I'm still getting 
the same issue, see: https://ibb.co/zHggRQZ
the os is debian 12

any ideas why I'm still getting this error?

Thanks,

Dagg

Reply via email to