More actions
Combined display of all available logs of John's Wiki. You can narrow down the view by selecting a log type, the username (case-sensitive), or the affected page (also case-sensitive).
- 03:14, 31 December 2023 Admin talk contribs created page Virsh list all in json (Created page with "The following <code>bash</code> command will list all virsh guests in json. echo "[ $(virsh list --all|grep -Ev 'Id|----'|awk '{print "{ \"id\": \""$1"\", \"name\": \""$2"\", \"state\": \""$3 $4"\"}," }'|head -n -1) {} ]"|jq -r Output example: <pre> [ { "id": "38", "name": "Mac", "state": "running" }, { "id": "39", "name": "Dennis", "state": "running" }, { "id": "40", "name": "Charlie", "state": "running" }, ... </pre>")