zoukankan      html  css  js  c++  java
  • 如何在宿主机上查看kvm虚拟机的IP

    1.显示当前mac跟网关、ip地址

    [root@localhost ~]# arp -a
    ? (172.17.0.2) at 02:42:ac:11:00:02 [ether] on docker0
    ? (192.168.25.1) at 00:50:56:c0:00:08 [ether] on ens33
    ? (192.168.25.131) at <incomplete> on ens33
    gateway (192.168.25.2) at 00:50:56:ea:00:62 [ether] on ens33

    2.输出需要查看IP虚拟机的mac配置:

    [root@localhost ~]# virsh dumpxml centos7.0 | grep mac                     #dumpxml(demo)直接显示demo的xml文件配置
    <partition>/machine</partition>
    <type arch='x86_64' machine='pc-i440fx-rhel7.0.0'>hvm</type>
    <mac address='52:54:00:7b:c8:0b'/>

     3.通过mac查看IP                       

    [root@localhost ~]# arp -a | grep 52:54:00:52:68:c7
    ? (192.168.10.79) at 52:54:00:52:68:c7 [ether] on em2

  • 相关阅读:
    计数排序
    CSS3变形
    前端内存泄露问题
    复杂对象的深拷贝
    JavaScript基本数据类型——Symbol
    随机打乱数组
    唯一重复的数字
    src和href的区别
    iframe的缺点
    link和@import的区别
  • 原文地址:https://www.cnblogs.com/byfboke/p/9173464.html
Copyright © 2011-2022 走看看