functions: vmip: Print all addresses
Since I no longer test FMOS in IPv6-only environments, I need `vmip` to show IPv4 addresses, too.
This commit is contained in:
@@ -1,2 +1,2 @@
|
||||
virsh qemu-agent-command $1 '{"execute":"guest-network-get-interfaces"}' \
|
||||
| jq -r '.return | .[] | select(.name=="eth0") | .["ip-addresses"] | map(select(.["ip-address-type"] == "ipv6" and (.["ip-address"]|startswith("fe80")|not)))[0]["ip-address"]'
|
||||
| jq -r '.return | .[] | select(.name!="lo") | .["ip-addresses"] | .[] | .["ip-address"]'
|
||||
|
||||
Reference in New Issue
Block a user