Created
April 22, 2021 09:52
-
-
Save edwinclement08/39cabc2478a0cd092b4eb91a16fd282d to your computer and use it in GitHub Desktop.
Get list of usb ids that are connected to a domain using virsh and xq(installed with yq)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
virsh dumpxml Manjaro | xq '.domain.devices.hostdev | .[] | select( ."@type" == "usb") | .source | (.vendor."@id" + ":" + .product."@id") ' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For getting the list via ssh