Re: [libvirt] Using libvirt to obtain mac address of virtual domain

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Le lundi 19 octobre 2009 à 17:27 -0500, Carlen, Devin C. (ARC-A)[PEROT
SYSTEMS] a écrit :
> Greetings, I am new to libvirt and am looking for the most efficient  
> way to programmatically obtain the mac address from a virtual domain.   
> Libvirt is providing access to xen and kvm in my case.  A nudge in the  
> right direction would be appreciated!

Hi.

If you need to get the mac address from bash, you can use this:

virsh dumpxml myguest | grep 'mac address' | cut -d\' -f2

You'll get one mac address per line (one line per NIC on the guest)

Regards, Daniel

> 
> Best Regards,
> 
> Devin Carlen
> 
> --
> Libvir-list mailing list
> Libvir-list@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/libvir-list
-- 
Daniel Berteaud
FIREWALL-SERVICES SARL.
Société de Services en Logiciels Libres
Technopôle Montesquieu
33650 MARTILLAC
Tel : 05 56 64 15 32
Fax : 05 56 64 15 32
Mail: daniel@xxxxxxxxxxxxxxxxxxxxx
Web : http://www.firewall-services.com

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]