Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve VM Monitoring with qemu-guest agent information #6645

Closed
dgarcia18 opened this issue May 9, 2024 · 1 comment · Fixed by OpenNebula/docs#2983
Closed

Improve VM Monitoring with qemu-guest agent information #6645

dgarcia18 opened this issue May 9, 2024 · 1 comment · Fixed by OpenNebula/docs#2983

Comments

@dgarcia18
Copy link
Contributor

Issue to keep track of the investigation on qemu-ga usage and its integration possibilities within the linux context packages.

VM crashing detection

The current monitoring system can not detect a VM crashing. This was tested with a kernel-panicked VM. With qemu-ga installed in the VM, a crash can be detected by the hypervisor. We can check if the VM has crashed with:
virsh qemu-agent-command one- '{"execute":"guest-ping"}'

The VM is not crashed if the exit code of the command is 0, meaning that the VM is replying to the qemu "ping".

@tinova tinova added this to the Release 6.10.0 milestone May 9, 2024
@onenhansen
Copy link
Contributor

onenhansen commented May 9, 2024

We should try to also include:

Examples:

# virsh qemu-agent-command --domain one-400 --cmd '{"execute": "guest-exec", "arguments": { "path": "wmic", "arg": ["OS", "GET", "TotalVisibleMemorySize"], "capture-output": true}}'
{"return":{"pid":1340}}

# virsh qemu-agent-command --domain one-400 --cmd '{"execute": "guest-exec", "arguments": { "path": "wmic", "arg": ["OS", "GET", "FreePhysicalMemory"], "capture-output": true}}'
{"return":{"pid":8372}}

# virsh qemu-agent-command --domain one-400 --cmd '{"execute": "guest-exec-status", "arguments": { "pid": 1340 }}' | jq -r '.return["out-data"]' | base64 -d
TotalVisibleMemorySize  
16757176                

# virsh qemu-agent-command --domain one-400 --cmd '{"execute": "guest-exec-status", "arguments": { "pid": 8372 }}' | jq -r '.return["out-data"]' | base64 -d
FreePhysicalMemory  
14303288   
# virsh qemu-monitor-command --hmp one-400 --cmd balloon 4096


# virsh qemu-agent-command --domain one-400 --cmd '{"execute": "guest-exec", "arguments": { "path": "wmic", "arg": ["OS", "GET", "FreePhysicalMemory"], "capture-output": true}}'
{"return":{"pid":8964}}

# virsh qemu-agent-command --domain one-400 --cmd '{"execute": "guest-exec-status", "arguments": { "pid": 8964 }}' | jq -r '.return["out-data"]' | base64 -d
FreePhysicalMemory  
1712584    

If possible, these values should also be extended to the Prometheus probe.

@tinova tinova modified the milestones: Release 6.10.1, Release 6.10.0 Jun 11, 2024
@tinova tinova assigned dann1 and unassigned dgarcia18 Jul 1, 2024
@dann1 dann1 transferred this issue from OpenNebula/one-apps Jul 5, 2024
@dann1 dann1 changed the title Improve guest OS interaction in context packages Improve VM Monitoring with qemu-guest agent information Jul 5, 2024
dann1 added a commit to dann1/docs that referenced this issue Jul 15, 2024
@dann1 dann1 linked a pull request Jul 16, 2024 that will close this issue
2 tasks
dann1 added a commit to dann1/docs that referenced this issue Jul 16, 2024
@tinova tinova reopened this Jul 17, 2024
rsmontero pushed a commit to OpenNebula/docs that referenced this issue Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants