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

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? -- Regards, Shashwat Shagun

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. Regards, Daniel -- |: 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 :|
participants (2)
-
Daniel P. Berrange
-
Shashwat shagun