----------
Versioning
----------
There are concurrent versioning schemes depending on the distribution source.
This qemu-ga binary shows the version based on QEMU source code.

----------------------------------------------
Start the guest with QEMU Guest Agent support:
----------------------------------------------
Before installing qemu-ga in the Windows guest, start the QEMU process for the Windows guest with guest support.

On Linux host add the following parameters to the qemu command line for guest support
	-device virtio-serial-pci \
	-chardev socket,id=qga0,path=qga.sock,server=on,wait=off \
	-device virtserialport,chardev=qga0,name=org.qemu.guest_agent.0

On Windows host add the following parameters to the qemu command line
	-device virtio-serial-pci \
	-chardev socket,id=qga0,port=5906,host=127.0.0.1,server=on,wait=off \
	-device virtserialport,chardev=qga0,name=org.qemu.guest_agent.0

Further information:
https://wiki.qemu.org/Features/GuestAgent

------------------------------------------
Install QEMU Guest Agent in Windows guest:
------------------------------------------
Install software as usual for your architecture:
pacman -S mingw-w64-<ARCH>-qemu-guest-agent
ARCH=x86_64: pacman -S mingw-w64-x86_64-qemu-guest-agent

As administrator start an installation shell depending on your architecture.
ARCH=x86_64: Start "MSYS2 MinGW 64-bit" shell as administrator

Check and stop an already registered qemu-ga with
net stop "QEMU Guest Agent"
net stop "QEMU Guest Agent VSS Provider"

Verify that the msys2 provided qemu-ga works with
qemu-ga -v

If the process logs messages and keeps running, qemu-ga is ready to react upon requests.
Stop this foreground qemu-ga with CTRL-C to go on.

If existing, uninstall the old qemu-ga using its appropriate routine now.

Register the msys2 provided qemu-ga with
qemu-ga -s install

Start freshly registered qemu-ga service with
net start "QEMU Guest Agent"

qemu-ga service is configured to start automatically on restart.

Furher information:
man qemu-ga
https://bugzilla.redhat.com/show_bug.cgi?id=962669

----------------------
Using QEMU Guest Agent
----------------------
Reacts in guest OS to your requests sent from host OS.

Open a shell on the host to connect to the guest's socket while qemu-ga is active now.

On Linux host (after installing socat)
socat - unix-connect:qga.sock

On Windows host (after pacman -S socat)
socat - tcp-connect:127.0.0.1:5906

Now you are ready to send a json request to the agent. For example sending
{"execute": "guest-info"}

will be answered with
{"return": {"version": "6.2.93", "supported_commands": ...

Stop the connection with CTRL-C

Further information:
man qemu-ga-ref

-----------------------------
QEMU Guest Agent VSS Provider
-----------------------------
VSS defines a process to create consistent backups initiated from Windows guest.

Further information:
https://docs.microsoft.com/en-us/windows-server/storage/file-server/volume-shadow-copy-service
https://bugzilla.redhat.com/show_bug.cgi?id=1286672
