kvm虚拟机利用virsh查看ip
1、virsh dumpxml win7 | grep mac #查看win7虚拟机mac2、arp -a #显示mac与ip对应关系示例:[root@localhost ~]# virsh dumpxml ubuntu-yusen | grep mac<partition>/machine</partition><type ...
·
1、virsh dumpxml win7 | grep mac #查看win7虚拟机mac
2、arp -a #显示mac与ip对应关系
示例:
[root@localhost ~]# virsh dumpxml ubuntu-yusen | grep mac
<partition>/machine</partition>
<type arch='x86_64' machine='pc-i440fx-rhel7.0.0'>hvm</type>
<mac address='52:54:00:11:c5:4e'/>
[root@localhost ~]# ping 192.168.0.19
PING 192.168.0.19 (192.168.0.19) 56(84) bytes of data.
64 bytes from 192.168.0.19: icmp_seq=1 ttl=64 time=0.216 ms
64 bytes from 192.168.0.19: icmp_seq=2 ttl=64 time=0.150 ms
^C
--- 192.168.0.19 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.150/0.183/0.216/0.033 ms
[root@localhost ~]# arp -a | grep 52:54:00:11:c5:4e
? (192.168.0.19) at 52:54:00:11:c5:4e [ether] on br0
[root@localhost ~]#
说明:
1、ubuntu-yusen是虚拟机名称;
2、arp -a | grep 52:54:00:11:c5:4e 是找mac对应的ip。
更多推荐
已为社区贡献16条内容
所有评论(0)