1、查看虚拟的IP地址
注:在virt-manager版本4.0以上,在网卡的图形界面也可以看虚拟机的IP地址。

1.1 查看运行的虚拟机
[root@localhost img]# virsh list

1.2确认 虚拟机 mac地址
virsh dumpxml 虚拟机名称,查看服务器对应的mac地址。
[root@localhost img]# virsh dumpxml pub|grep mac

1.3查看mac地址对应的ip
[root@localhost img]# arp -a

如果arp -a看不到想要的结果,就写个脚本ping一下同网段的所有IP,然后在执行arp -a
2、查看虚拟机桥接网卡
2.1 使用virt-manager确认
注:适用于virt-manager版本4.0以下,查看版本信息virt-manager --version

[root@shr03 ~]# ip addr

2.2使用virsh命令确认
[root@shr03 ~]# virsh domiflist centos-stream9
