qemu-ga: generate missing stubs for fsfreeze
When linux-specific commands (including guest-fsfreeze-*) were consolidatedunder defined(linux), we forgot to account for the case wheredefined(linux) && !defined(FIFREEZE). As a result stubs are no longer...
qemu-ga: fix bsd build, and re-org linux-specific implementations
qemu-ga: for w32, fix leaked handle ov.hEvent in ga_channel_write()
In the function ga_channel_write(), the handle ov.hEvent is createdby the call to CreateEvent(). However, the handle is not closedprior to the function return.
This patch closes the handle before the return of the function....
qemu-ga: add guest-sync-delimited
guest-sync leaves it as an exercise to the user as to how to reliablyobtain the response to guest-sync if the client had previously read in apartial response (due qemu-ga previously being restarted mid-"sentence" due to reboot, forced restart, etc)....
qemu-ga: add guest-suspend-disk
As the command name implies, this command suspends the guest to disk.
The suspend operation is implemented by two functions: bios_supports_mode()and guest_suspend(). Both functions are generic enough to be used byother suspend modes (introduced by next commits)....
qemu-ga: add guest-suspend-ram
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
qemu-ga: add guest-suspend-hybrid
qemu-ga: add win32 guest-suspend-disk command.
Implement guest-suspend-disk RPC for Windows. Functionally this should beequivalent to the posix implementation.
Signed-off-by: Gal Hammer <ghammer@redhat.com>
qemu-ga: add win32 guest-suspend-ram command
S3 sleep implementation for windows.
qemu-ga: add guest-network-get-interfaces command
This command returns an array of:
[ifname, hwaddr, [ipaddr, ipaddr_family, prefix] ]
for each interface in the system.Currently, only IPv4 and IPv6 are supported.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
qemu-ga: add Windows service integration
This allows qemu-ga to function as a Windows service:
- to install the service (will auto-start on boot): qemu-ga --service install - to start the service: net start qemu-ga - to stop the service: net stop qemu-ga...
qemu-ga: add win32 guest-shutdown command
Implement guest-shutdown RPC for Windows. Functionally this should beequivalent to the posix implementation.
Original patch by Gal Hammer <ghammer@redhat.com>
qemu-ga: add initial win32 support
This adds a win32 channel implementation that makes qemu-ga functionalon Windows using virtio-serial (unix-listen/isa-serial not currentlyimplemented). Unlike with the posix implementation, we do not useGIOChannel for the following reasons:...
qemu-ga: move channel/transport functionality into wrapper class
This is mostly in preparation for the win32 port, which won't useGIO channels for reasons that will be made clearer later. Here theGAChannel class is just a loose wrapper around GIOChannel...
qemu-ga: separate out common commands from posix-specific ones
Many of the current RPC implementations are very much POSIX-specificand require complete re-writes for Windows. There are however a smallset of core guest agent commands that are common to both, and other...
qemu-ga: rename guest-agent-commands.c -> commands-posix.c
qemu-ga: fixes for win32 build of qemu-ga
Various stubs and #ifdefs to compile for Windows using mingwcross-build. Still has 1 linker error due to a dependency on theforthcoming win32 versions of the GAChannel/transport class.
guest agent: add supported command list to guest-info RPC
Not that there is blacklisting functionality we can no longer inferthe agent's capabilities via version. This patch extends the currentguest-info RPC to also return a list of dictionaries containing the name...
Use glib memory allocation and free functions
qemu_malloc/qemu_free no longer exist after this commit.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
guest-agent: only enable FSFREEZE when it's supported by the kernel
guest agent: use QERR_UNSUPPORTED for disabled RPCs
guest-agent: fix build with OpenBSD
FS-Freeze only works with Linux.
guest agent: command state class
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>Signed-off-by: Luiz Capitulino <lcapitulino@gmail.com>
guest agent: qemu-ga daemon
This is the actual guest daemon, it listens for requests over avirtio-serial/isa-serial/unix socket channel and routes them throughto dispatch routines, and writes the results back to the channel ina manner similar to QMP....
guest agent: add guest agent RPCs/commands
This adds the initial set of QMP/QAPI commands provided by the guestagent:
guest-syncguest-pingguest-infoguest-shutdownguest-file-openguest-file-readguest-file-writeguest-file-seekguest-file-flushguest-file-close...