When I create the vm instance using libvirt, it will create a TUN device named vnetX.I wonder would libvirt don't create the vnet device, instead, I use other method to create it.
will libvirt don't create vnetX tun device?
kvm;virtualization;libvirtd
The answer is YES.According to Overriding the target element, one can override the device's name unless beginning with the 'vnet' or 'vif' which is reserved by libvirt. For example, I use TUNCTL to create the device with the name vxnet6, and I claim this in the XML file with the 'target' parameter.<devices>...    <interface type='ethernet'>        <target dev='vxnet6'/>        <mac address='aa:bb:cc:cc:bb:aa'/>        <script path='/etc/qemu-ifup'/>    </interface>...</devices>Then libvirt won't create the 'vnetX' device itself any more.