Last active
February 5, 2024 16:04
-
-
Save orimanabu/815fc2453966f50f5d5281ea58b0058e to your computer and use it in GitHub Desktop.
how to run qmp command on a VM invoked via libvirt
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
# virsh qemu-monitor-command DOMAIN '{"execute": "query-commands"}' --pretty | |
# virsh qemu-monitor-command DOMAIN --hmp 'help' | |
# virsh qemu-monitor-command instance-00000002 '{"execute": "query-status"}' | |
{"return":{"status":"running","singlestep":false,"running":true},"id":"libvirt-5137"} | |
# virsh qemu-monitor-command instance-00000002 '{"execute": "query-status"}' --pretty | |
{ | |
"return": { | |
"status": "running", | |
"singlestep": false, | |
"running": true | |
}, | |
"id": "libvirt-5138" | |
} | |
# virsh qemu-monitor-command instance-00000002 --hmp 'info kvm' | |
kvm support: enabled | |
# virsh qemu-monitor-command instance-00000002 --hmp 'info network' | |
net0: index=0,type=nic,model=virtio-net-pci,macaddr=fa:16:3e:d5:d7:a6 | |
\ hostnet0: index=0,type=tap,fd=29 | |
# |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment