Archived
1
0
This repository has been archived on 2023-11-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
zdotdir/functions/vmip
Dustin C. Hatch 8844aead74 functions: vmip: Print all addresses
Since I no longer test FMOS in IPv6-only environments, I need `vmip` to
show IPv4 addresses, too.
2020-05-03 13:20:40 -05:00

3 lines
166 B
Plaintext

virsh qemu-agent-command $1 '{"execute":"guest-network-get-interfaces"}' \
| jq -r '.return | .[] | select(.name!="lo") | .["ip-addresses"] | .[] | .["ip-address"]'