Description of problem: Setting network backend-specific options in hostdev/user/direct type interfaces, and hotplug the interface to a guest, it will succeed, but the backend-specific option is not supported in such types Version-Release number of selected component (if applicable): libvirt-3.2.0-14.el7_4.2.x86_64 qemu-kvm-rhev-2.9.0-16.el7_4.3.x86_64 How reproducible: 100% Steps to Reproduce: 1. # cat direct.xml <interface type='direct'> <source dev='ens1f1' mode='bridge'/> <backend tap='/dev/net/tun' vhost='/dev/vhost-net'/> <model type='rtl8139'/> </interface> # virsh start rhel7.4 Domain rhel7.4 started 2. # virsh attach-device rhel7.4 direct.xml Device attached successfully # virsh dumpxml rhel7.4 | grep /interface -B8 <interface type='direct'> <mac address='52:54:00:63:d7:98'/> <source dev='ens1f1' mode='bridge'/> <target dev='macvtap0'/> <model type='rtl8139'/> <backend tap='/dev/net/tun'/> <alias name='net0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> 3. but start a guest with "<backend tap='/dev/net/tun'/>" in direct type interface will fail # virsh dumpxml rhel7.4 | grep /interface -B6 <interface type='direct'> <mac address='52:54:00:63:d7:98'/> <source dev='ens1f1' mode='bridge'/> <model type='rtl8139'/> <backend tap='/dev/net/tun'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> # virsh start rhel7.4 error: Failed to start domain rhel7.4 error: unsupported configuration: Custom tap device path is not supported for: direct Actual results: The backend element are not supported on these type of interfaces, but hotplug succeed, make an invalid xml. May be a doc fix is ok? Expected results: hotplug failed or ignore the setting, or do not use backend settings in these type of interface documented somewhere. Additional info: The same with user type interface, hostdev interface for user type interface, $ virsh start rhel7.2 Domain rhel7.2 started $ cat user.xml <interface type='user'> <backend tap='/dev/net/tun' vhost='/dev/vhost-net'/> </interface> $ virsh attach-device rhel7.2 user.xml Device attached successfully $ virsh dumpxml rhel7.2 | grep /interface -B6 <interface type='user'> <mac address='52:54:00:13:11:f7'/> <model type='rtl8139'/> <backend tap='/dev/net/tun'/> <alias name='net0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> but a guest with above xml can not start $ virsh start rhel7.2 error: Failed to start domain rhel7.2 error: unsupported configuration: Custom tap device path is not supported for: user for hostdev interface: # cat vf.xml <interface type='hostdev' managed='yes'> <source> <address type='pci' domain='0x0000' bus='0x03' slot='0x10' function='0x0'/> </source> <backend tap='/dev/net/tun' vhost='/dev/vhost-net'/> </interface> # virsh attach-device rhel vf.xml Device attached successfully # virsh dumpxml rhel | grep /interface -B9 <interface type='hostdev' managed='yes'> <mac address='52:54:00:90:dd:07'/> <driver name='vfio'/> <source> <address type='pci' domain='0x0000' bus='0x03' slot='0x10' function='0x0'/> </source> <backend tap='/dev/net/tun'/> <alias name='hostdev0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> start a guest with above xml # virsh start rhel error: Failed to start domain rhel error: unsupported configuration: Custom tap device path is not supported for: hostdev
Another validation bug.
This bug was closed deferred as a result of bug triage. Please reopen if you disagree and provide justification why this bug should get enough priority. Most important would be information about impact on customer or layered product. Please indicate requested target release.