I am trying to modify the XML file of my VM to include a vlan tag for one of the X710 Virtual functions. This will mean that i don't have to configure it on the VM. I have tried the following approaches but cannot get it to work. Have I got the syntax wrong or are there special permissions I would need for it to work?
Method A
[test @localhost ~]$ virsh edit test
<hostdev mode='subsystem' type='pci'>
<source>
<address bus='0x05' slot='0x0a' function='0x1'/>
</source>
<vlan>
<tag id='450'/>
</vlan>
</hostdev>
This gives a syntax error and does not try to save the xml file so I guess the hostdev section does not accept vlan tag?
Method B
[test @localhost ~]$ virsh edit test
<interface type='hostdev'>
<source>
<address type='pci' domain='0x0000' bus='0x05' slot='0x0a' function='0x1'/>
</source>
<vlan>
<tag id='450'/>
</vlan>
</interface>
This gives the following error
[test @localhost ~]$ virsh start test
error: Failed to start domain test
error: Unable to preserve mac/vlan tag for device = (null), vf = 1: Permission denied
Any help would be greatly appreciated.