Created
July 11, 2019 12:02
-
-
Save wido/5b74b25f27b9b2e6d91e708b824944d7 to your computer and use it in GitHub Desktop.
Qemu Guest Agent cheatsheet
This file contains hidden or 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
#!/bin/bash | |
# | |
# Talk to a Virtual Machine through the Qemu Guest Agent | |
# | |
# See: | |
# - https://wiki.qemu.org/Features/GuestAgent | |
# - https://wiki.libvirt.org/page/Qemu_guest_agent | |
# | |
# Author: Wido den Hollander <[email protected]> | |
# | |
DOMAIN="myvirtualmachine" | |
virsh qemu-agent-command $DOMAIN '{"execute": "guest-info"}'|jq | |
virsh qemu-agent-command $DOMAIN '{"execute": "guest-network-get-interfaces"}'|jq | |
virsh qemu-agent-command $DOMAIN '{"execute": "guest-get-fsinfo"}'|jq |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment