Skip to content

Enhancement: enable qemu-guest-agent log on windows qcow #41

Description

@weshayutin

Please consider creating a windows qcow that has qemu-guest-agent daemon logging running. I would assume that could be enabled by hand and resaved as a qcow or scripted.

To enable logging:

oc exec virt-launcher-windows-ux8087-c88p2 -n windows-oadp-test -c compute -- virsh qemu-agent-command windows-oadp-test_windows-ux8087 '{"execute":"guest-exec","arguments":{"path":"C:\\Windows\\System32\\sc.exe","arg":["config","qemu-ga","binPath=","C:\\Program Files\\Qemu-ga\\qemu-ga.exe -d --retry-path -l C:\\qemu-ga.log -v"],"capture-output":true}}' 

To get the logs - is multistep:

Get the pid

oc exec virt-launcher-windows-ux8087-xdwqs -n windows-oadp-test -c compute -- virsh qemu-agent-command windows-oadp-test_windows-ux8087 '{"execute":"guest-exec","arguments":{"path":"C:\\Windows\\System32\\cmd.exe","arg":["/c","type C:\\qemu-ga.log"],"capture-output":true}}'

Use the pid to get the logs, replace s/PID/real pid number/

oc exec virt-launcher-windows-ux8087-xdwqs -n windows-oadp-test -c compute -- virsh qemu-agent-command windows-oadp-test_windows-ux8087 '{"execute":"guest-exec-status","arguments":{"pid":PID}}'

base64 decode

echo "<base64-string>" | base64 -d

What a pita..

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions