FAQ
Hi all,

How can I see what vnet is attached to a certain kvm guest?? For
example: I have a kvmguest1. When I launch this guest with virsh
command, virsh creates a new vnetX interface for this guest. How can I
extract this virtual net interface (vnet0, vnet1, vnet2 or so on) using
a script??

Thanks.
--
CL Martinez
carlopmart {at} gmail {d0t} com

Search Discussions

  • Emmanuel Noobadmin at May 13, 2011 at 7:32 am

    On 5/13/11, carlopmart wrote:
    Hi all,

    How can I see what vnet is attached to a certain kvm guest?? For
    example: I have a kvmguest1. When I launch this guest with virsh
    command, virsh creates a new vnetX interface for this guest. How can I
    extract this virtual net interface (vnet0, vnet1, vnet2 or so on) using
    a script??
    If I'm not mistaken, this is automatically assigned. However, you
    could define this in the domain XML using the target tag within the
    interface container, e.g. using the libvirt example

    <interface type='network'>
    <source network='default'/>
    <target dev='vnet7'/>
    <mac address="00:11:22:33:44:55"/>
    </interface>
    From there, I suppose you could extract the information from the
    relevant xml with your script.
  • Carlopmart at May 13, 2011 at 9:47 am

    On 05/13/2011 01:32 PM, Emmanuel Noobadmin wrote:
    On 5/13/11, carlopmartwrote:
    Hi all,

    How can I see what vnet is attached to a certain kvm guest?? For
    example: I have a kvmguest1. When I launch this guest with virsh
    command, virsh creates a new vnetX interface for this guest. How can I
    extract this virtual net interface (vnet0, vnet1, vnet2 or so on) using
    a script??
    If I'm not mistaken, this is automatically assigned. However, you
    could define this in the domain XML using the target tag within the
    interface container, e.g. using the libvirt example

    <interface type='network'>
    <source network='default'/>
    <target dev='vnet7'/>
    <mac address="00:11:22:33:44:55"/>
    </interface>
    From there, I suppose you could extract the information from the
    relevant xml with your script.
    Thanks Emmanuel.

    --
    CL Martinez
    carlopmart {at} gmail {d0t} com
  • Benjamin Franz at May 13, 2011 at 7:50 am

    On 05/13/2011 04:13 AM, carlopmart wrote:
    Hi all,

    How can I see what vnet is attached to a certain kvm guest?? For
    example: I have a kvmguest1. When I launch this guest with virsh
    command, virsh creates a new vnetX interface for this guest. How can I
    extract this virtual net interface (vnet0, vnet1, vnet2 or so on) using
    a script??
    The information is available in the output of 'virsh dumpxml <domain>'.

    --
    Benjamin Franz

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcentos-virt @
categoriescentos
postedMay 13, '11 at 7:13a
activeMay 13, '11 at 9:47a
posts4
users3
websitecentos.org
irc#centos

People

Translate

site design / logo © 2023 Grokbase