Skip to content

Instantly share code, notes, and snippets.

@gilou
Created October 19, 2017 22:07
Show Gist options
  • Save gilou/b4fd2028ea8f823a91727b1d681defd8 to your computer and use it in GitHub Desktop.
Save gilou/b4fd2028ea8f823a91727b1d681defd8 to your computer and use it in GitHub Desktop.
for vm in $(qm list | awk '/running/ { print $1 }' ) ; do qm set $vm -description "IPs détectées ($(date))$(qm agent $vm network-get-interfaces |jq '.[]|."ip-addresses"[]|."ip-address"' | grep -ve '127\.0\.0\.1\|::1\|fe80::' | sed 's/"//g')"; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment