In the VM:
dnf install qemu-guest-agent
From the HV:
virsh qemu-agent-command --domain myvm \
'{"execute":"guest-network-get-interfaces"}' | \
jq -r '
[.return[] | select(.name!="lo") | ."ip-addresses"] | flatten | .[] |
select(."ip-address-type"=="ipv4")."ip-address"
'
The result should be one IPv4 address per line.