Skip to content

Instantly share code, notes, and snippets.

@e-minguez
Created September 8, 2023 12:12
Show Gist options
  • Select an option

  • Save e-minguez/8c1ce62f5984c200883c0138185f44d9 to your computer and use it in GitHub Desktop.

Select an option

Save e-minguez/8c1ce62f5984c200883c0138185f44d9 to your computer and use it in GitHub Desktop.

Revisions

  1. e-minguez created this gist Sep 8, 2023.
    3 changes: 3 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    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
    }