FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu Server Development

 
 
LinkBack Thread Tools
 
Old 05-13-2011, 08:48 AM
carlopmart
 
Default Discover what vnet is attached to a kvm guest

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

--
ubuntu-server mailing list
ubuntu-server@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server
More info: https://wiki.ubuntu.com/ServerTeam
 
Old 05-13-2011, 12:57 PM
Serge Hallyn
 
Default Discover what vnet is attached to a kvm guest

Quoting carlopmart (carlopmart@gmail.com):
> 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??

# virsh list
Id Name State
----------------------------------
1 debian running

# virsh dumpxml 1

...
<interface type='network'>
<mac address='52:54:00:0f:9e:17'/>
<source network='default'/>
<target dev='vnet0'/>
<alias name='net0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
...

-serge

--
ubuntu-server mailing list
ubuntu-server@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server
More info: https://wiki.ubuntu.com/ServerTeam
 
Old 05-13-2011, 01:47 PM
carlopmart
 
Default Discover what vnet is attached to a kvm guest

On 05/13/2011 02:57 PM, Serge Hallyn wrote:

Quoting carlopmart (carlopmart@gmail.com):

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??


# virsh list
Id Name State
----------------------------------
1 debian running

# virsh dumpxml 1

...
<interface type='network'>
<mac address='52:54:00:0f:9e:17'/>
<source network='default'/>
<target dev='vnet0'/>
<alias name='net0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
...

-serge


Thanks Serge.


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

--
ubuntu-server mailing list
ubuntu-server@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server
More info: https://wiki.ubuntu.com/ServerTeam
 

Thread Tools




All times are GMT. The time now is 04:30 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org