美文网首页
Find your vm's IP with virsh and

Find your vm's IP with virsh and

作者: SikAck | 来源:发表于2015-08-09 13:14 被阅读0次

Basically use virsh commands to get the VMs' MAC address first and then use arp to get the IPs.

$ virsh domiflist $DOM
$ arp -i $BRIDGE

For example:

$ virsh list --all
 Id    Name                           State
----------------------------------------------------
 2     suse_13_2                      running

$ virsh domiflist suse_13_2
Interface  Type       Source     Model       MAC
-------------------------------------------------------
vnet0      network    default    rtl8139     52:54:00:d2:cd:5d

$ arp -i virbr0
Address                  HWtype  HWaddress           Flags Mask            Iface
192.168.122.22                   (incomplete)                              virbr0
192.168.122.222          ether   52:54:00:d2:cd:5d   C                     virbr0

相关文章

网友评论

      本文标题:Find your vm's IP with virsh and

      本文链接:https://www.haomeiwen.com/subject/lbqiqttx.html