KVM宿主上查看虚拟机的IP及桥接网卡

1、查看虚拟的IP地址

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

1.1 查看运行的虚拟机

root@localhost img\]# virsh list ![](https://img-blog.csdnimg.cn/direct/5d6143b6fcbc43279c25d44df07b3d06.png) ****1.2确认**** ****虚拟机**** ****mac地址**** virsh dumpxml 虚拟机名称,查看服务器对应的mac地址。 \[root@localhost img\]# virsh dumpxml pub\|grep mac ![](https://img-blog.csdnimg.cn/direct/89a1aa2ff6f94f928943269dc88fa8c6.png) ****1.3查看mac地址对应的ip**** \[root@localhost img\]# arp -a ![](https://img-blog.csdnimg.cn/direct/b210ce882e0f48c6b9a8b868f9871d37.png) 如果arp -a看不到想要的结果,就写个脚本ping一下同网段的所有IP,然后在执行arp -a ****2、查看虚拟机桥接网卡**** 2.1 使用virt-manager确认 注:适用于virt-manager版本4.0以下,查看版本信息virt-manager --version ![](https://img-blog.csdnimg.cn/direct/7244e73abfa048ce8796a017d758bda6.png) \[root@shr03 \~\]# ip addr ![](https://img-blog.csdnimg.cn/direct/8ffcbb4f69604ccf9af73be5ceaeb1fe.png) 2.2使用virsh命令确认 \[root@shr03 \~\]# virsh domiflist centos-stream9 ![](https://img-blog.csdnimg.cn/direct/598bd39af62d4a008c59d717a0d87a4d.png)

相关推荐
wj3055853784 小时前
课程 9:模型测试记录与 Prompt 策略
linux·人工智能·python·comfyui
星寂樱易李5 小时前
iperf3 + Python-- 网络带宽、网速、网络稳定性
开发语言·网络·python
abigriver5 小时前
打造 Linux 离线大模型级语音输入法:Whisper.cpp + 3090 显卡加速与 Rime 中英混输终极调优指南
linux·运维·whisper
wangqiaowq5 小时前
windows下nginx的安装
linux·服务器·前端
pengyi8710155 小时前
独享IP池自动化维护方案,智能检测自动延长使用寿命
网络协议·tcp/ip·自动化
YYRAN_ZZU6 小时前
Petalinux新建自动脚本启动
linux
charlie1145141916 小时前
嵌入式Linux驱动开发pinctrl篇(1)——从寄存器到子系统:驱动演进之路
linux·运维·驱动开发
Agent手记6 小时前
异常考勤智能预警与处理与流程优化方案 | 基于企业级Agent的超自动化实战教程
运维·人工智能·ai·自动化
于小猿Sup6 小时前
VMware在Ubuntu22.04驱动Livox Mid360s
linux·c++·嵌入式硬件·自动驾驶
cen__y7 小时前
Linux12(Git01)
linux·运维·服务器·c语言·开发语言·git