在pve中通过QEMU Guest Agent获取虚拟机ipv6的命令 #1264
wanghe1358
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
查了很久也没有找到在宿主机中用dnns-go实现给虚拟机解析的办法,无意间发现有QEMU Guest Agent服务可以让宿主机和虚拟机通信,折腾了半天勉强能用了。
首先需要在虚拟机-选项中开启QEMU Guest Agent,并保证虚拟机中QEMU Guest Agent服务已安装并顺利运行
作为一个编程文盲,研究了半天awk的用法,勉强写出来了一个能凑合用的命令:
qm agent “你的虚拟机编号” network-get-interfaces| awk '{print $3}' | awk '/240:?/'|awk '{gsub(",", "")} {print}'
Beta Was this translation helpful? Give feedback.
All reactions