[libvirt-users] domain xml does not have <target dev='vnetX'/>

Daniel P. Berrange berrange at redhat.com
Mon Jan 15 16:02:04 UTC 2018

On Mon, Jan 15, 2018 at 09:28:28PM +0530, Shashwat shagun wrote:
> Hi I'm trying to monitor bandwidth usage of a KVM VM but couldn't find <target
> dev='vnet0'/>
> on virsh edit domain_name
> all i get is this
>     <interface type='network'>
>       <mac address='52:54:00:a1:05:b6'/>
>       <source network='vmango'/>
>       <model type='virtio'/>
>       <address type='pci' domain='0x0000' bus='0x00' slot='0x03'
> function='0x0'/>
>     </interface>
> how do i determine which vnet is connected to which domain?

The vnet name is dynamically allocated when the VM is started. virsh edit
modifies the *inactive* configuration, so that doesn't include the vnet
device name. You need 'virsh dumpxml' while the guest is running, to be
able to see the vnet name.

|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

More information about the libvirt-users mailing list