Skip to content

Instantly share code, notes, and snippets.

@adriasir123
Created November 7, 2022 21:23
Show Gist options
  • Save adriasir123/87e695b74b16955a22816e881a78f101 to your computer and use it in GitHub Desktop.
Save adriasir123/87e695b74b16955a22816e881a78f101 to your computer and use it in GitHub Desktop.
List all KVM VMs along with their respective disk files
for i in $(virsh -c qemu:///system list --all | awk "{print \$2}" | tail -n +3); do echo "Discos de $i:\n\n$(virsh -c qemu:///system domblklist $i)\n"; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment