Read the section Setting VLAN tag from libvirt.org.
According to OpenVSwitch network type, you can directly specify VLAN tags via element <vlan>
to a port from an OpenVSwitch bridge, and libvirt will manage the VLAN tags for your VM network.
Steps:
- configure OpenVSwitch bridge for your virtual machine by following the guide How to Use Open vSwitch with Libvirt
- add a new element
<vlan>
to your virtual machine network by specifying vlan id.