Skip to content

Instantly share code, notes, and snippets.

@e-minguez
Created September 8, 2023 12:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save e-minguez/8c1ce62f5984c200883c0138185f44d9 to your computer and use it in GitHub Desktop.
Save e-minguez/8c1ce62f5984c200883c0138185f44d9 to your computer and use it in GitHub Desktop.
getvmip.sh
getvmip(){
for vm in $(virsh list --name); do echo "${vm} $(virsh --connect qemu:///system domifaddr ${vm} | awk '/ipv4/ NF>1{print $NF}' | cut -d/ -f1)"; done
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment