86dcb6ab | 06-Apr-2023 |
Mark Somerville <mark@qpok.net> |
qga: Fix suspend on Linux guests without systemd
Allow the Linux guest agent to attempt each of the suspend methods (systemctl, pm-* and writing to /sys) in turn.
Prior to this guests without syste
qga: Fix suspend on Linux guests without systemd
Allow the Linux guest agent to attempt each of the suspend methods (systemctl, pm-* and writing to /sys) in turn.
Prior to this guests without systemd failed to suspend due to `guest_suspend` returning early regardless of the return value of `systemd_supports_mode`.
Signed-off-by: Mark Somerville <mark@qpok.net> Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com> Signed-off-by: Konstantin Kostiuk <kkostiuk@redhat.com>
show more ...
|
8cc28cb1 | 04-May-2023 |
Thomas Huth <thuth@redhat.com> |
qga/commands-win32.c: Drop the check for _WIN32_WINNT >= 0x0601
All current versions of glib require _WIN32_WINNT set to 0x0601 or higher already, and we also use this value as a minimum in our osde
qga/commands-win32.c: Drop the check for _WIN32_WINNT >= 0x0601
All current versions of glib require _WIN32_WINNT set to 0x0601 or higher already, and we also use this value as a minimum in our osdep.h header file, so there is no way to still compile this code with an older version of the Windows ABI. Thus we can drop this check now.
Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com> Signed-off-by: Konstantin Kostiuk <kkostiuk@redhat.com>
show more ...
|
810f677a | 23-Mar-2023 |
Daniel Xu <dxu@dxuuu.xyz> |
qga: Add `merged` variant to GuestExecCaptureOutputMode
Currently, any captured output (via `capture-output`) is segregated into separate GuestExecStatus fields (`out-data` and `err-data`). This mea
qga: Add `merged` variant to GuestExecCaptureOutputMode
Currently, any captured output (via `capture-output`) is segregated into separate GuestExecStatus fields (`out-data` and `err-data`). This means that downstream consumers have no way to reassemble the captured data back into the original stream.
This is relevant for chatty and semi-interactive (ie. read only) CLI tools. Such tools may deliberately interleave stdout and stderr for visual effect. If segregated, the output becomes harder to visually understand.
This commit adds a new enum variant to the GuestExecCaptureOutputMode qapi to merge the output streams such that consumers can have a pristine view of the original command output.
Signed-off-by: Daniel Xu <dxu@dxuuu.xyz> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Konstantin Kostiuk <kkostiuk@redhat.com>
show more ...
|
9c5ccc52 | 23-Mar-2023 |
Daniel Xu <dxu@dxuuu.xyz> |
qga: Refactor guest-exec capture-output to take enum
Previously capture-output was an optional boolean flag that either captured all output or captured none. While this is OK in most cases, it lacks
qga: Refactor guest-exec capture-output to take enum
Previously capture-output was an optional boolean flag that either captured all output or captured none. While this is OK in most cases, it lacks flexibility for more advanced capture cases, such as wanting to only capture stdout.
This commits refactors guest-exec qapi to take an enum for capture mode instead while preserving backwards compatibility.
Suggested-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Daniel Xu <dxu@dxuuu.xyz> Signed-off-by: Konstantin Kostiuk <kkostiuk@redhat.com>
show more ...
|
573a5fab | 25-Apr-2023 |
Markus Armbruster <armbru@redhat.com> |
qga/qapi-schema: Fix a misspelled reference
Code returns a list of GuestNetworkInterface, documentation claims GuestNetworkInfo, which doesn't exist. Fix the documentation.
Fixes: 3424fc9f16a1 (qe
qga/qapi-schema: Fix a misspelled reference
Code returns a list of GuestNetworkInterface, documentation claims GuestNetworkInfo, which doesn't exist. Fix the documentation.
Fixes: 3424fc9f16a1 (qemu-ga: add guest-network-get-interfaces command) Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20230425064223.820979-3-armbru@redhat.com>
show more ...
|
0961f929 | 09-Feb-2023 |
Kfir Manor <kfir@daynix.com> |
qga/win/vss: requester_freeze changes
Change requester_freeze so that the VSS backup type queried from the registry
Signed-off-by: Kfir Manor <kfir@daynix.com> Reviewed-by: Konstantin Kostiuk <kkos
qga/win/vss: requester_freeze changes
Change requester_freeze so that the VSS backup type queried from the registry
Signed-off-by: Kfir Manor <kfir@daynix.com> Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com> Signed-off-by: Konstantin Kostiuk <kkostiuk@redhat.com>
show more ...
|
410542d4 | 09-Feb-2023 |
Kfir Manor <kfir@daynix.com> |
qga/win/vss: query VSS backup type
Query VSS backup type number (DWORD) from QEMU Guest Agent VSS Provider registry key registry value VssOption
Translate the VSS backup type number (DWORD) into it
qga/win/vss: query VSS backup type
Query VSS backup type number (DWORD) from QEMU Guest Agent VSS Provider registry key registry value VssOption
Translate the VSS backup type number (DWORD) into its VSS backup type (VSS_BACKUP_TYPE)
Returns the queried VSS backup type if the program encounters unexpected behaviors or values return default VSS backup type VSS_BT_FULL instead
Signed-off-by: Kfir Manor <kfir@daynix.com> Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com> Signed-off-by: Konstantin Kostiuk <kkostiuk@redhat.com>
show more ...
|
fe67fc0e | 09-Feb-2023 |
Kfir Manor <kfir@daynix.com> |
qga/win/installer: add VssOption to installer
Adds registry value VssOption with value 1 to QEMU Guest Agent VSS Provider service registry key
Signed-off-by: Kfir Manor <kfir@daynix.com> Reviewed-b
qga/win/installer: add VssOption to installer
Adds registry value VssOption with value 1 to QEMU Guest Agent VSS Provider service registry key
Signed-off-by: Kfir Manor <kfir@daynix.com> Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com> Signed-off-by: Konstantin Kostiuk <kkostiuk@redhat.com>
show more ...
|
07ce178a | 03-Mar-2023 |
Konstantin Kostiuk <kkostiuk@redhat.com> |
qga/win32: Use rundll for VSS installation
The custom action uses cmd.exe to run VSS Service installation and removal which causes an interactive command shell to spawn. This shell can be used to ex
qga/win32: Use rundll for VSS installation
The custom action uses cmd.exe to run VSS Service installation and removal which causes an interactive command shell to spawn. This shell can be used to execute any commands as a SYSTEM user. Even if call qemu-ga.exe directly the interactive command shell will be spawned as qemu-ga.exe is a console application and used by users from the console as well as a service.
As VSS Service runs from DLL which contains the installer and uninstaller code, it can be run directly by rundll32.exe without any interactive command shell.
Add specific entry points for rundll which is just a wrapper for COMRegister/COMUnregister functions with proper arguments.
resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2167423 fixes: CVE-2023-0664 (part 2 of 2)
Signed-off-by: Konstantin Kostiuk <kkostiuk@redhat.com> Reviewed-by: Yan Vugenfirer <yvugenfi@redhat.com> Reported-by: Brian Wiltse <brian.wiltse@live.com>
show more ...
|
c4023359 | 07-Feb-2023 |
Markus Armbruster <armbru@redhat.com> |
qga: Drop dangling reference to QERR_QGA_LOGGING_DISABLED
slog()'s function comment advises to use QERR_QGA_LOGGING_DISABLED. This macro never existed. The reference got added in commit e3d4d25206a
qga: Drop dangling reference to QERR_QGA_LOGGING_DISABLED
slog()'s function comment advises to use QERR_QGA_LOGGING_DISABLED. This macro never existed. The reference got added in commit e3d4d25206a "guest agent: add guest agent RPCs/commands" along with QERR_QGA_LOGGING_FAILED, so maybe that one was meant. However, QERR_QGA_LOGGING_FAILED was never actually used, and was removed in commit d73f0beadb5 "qerror.h: Remove unused error classes".
Drop the dangling reference.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20230207075115.1525-9-armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com>
show more ...
|
9ca180bc | 13-Dec-2022 |
Andrey Drobyshev <andrey.drobyshev@virtuozzo.com> |
qga-win: choose the right libpcre version to include in MSI package
According to GLib changelog [1], since version 2.73.2 GLib is using libpcre2 instead of libpcre. As a result, qemu-ga MSI install
qga-win: choose the right libpcre version to include in MSI package
According to GLib changelog [1], since version 2.73.2 GLib is using libpcre2 instead of libpcre. As a result, qemu-ga MSI installation fails due to missing DLL when linked with the newer GLib.
This commit makes wixl to put the right libpcre version into the MSI bundle: either libpcre-1.dll or libpcre2-8-0.dll, depending on the present version of GLib.
[1] https://gitlab.gnome.org/GNOME/glib/-/releases#2.73.2
Previous version: https://lists.nongnu.org/archive/html/qemu-trivial/2022-11/msg00237.html
Signed-off-by: Andrey Drobyshev <andrey.drobyshev@virtuozzo.com> Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com> Tested-by: Konstantin Kostiuk <kkostiuk@redhat.com> Signed-off-by: Konstantin Kostiuk <kkostiuk@redhat.com>
show more ...
|
8e86851b | 29-Nov-2022 |
Andrey Drobyshev <andrey.drobyshev@virtuozzo.com> |
qga: map GLib log levels to system levels
This patch translates GLib-specific log levels to system ones, so that they may be used by both *nix syslog() (as a "priority" argument) and Windows ReportE
qga: map GLib log levels to system levels
This patch translates GLib-specific log levels to system ones, so that they may be used by both *nix syslog() (as a "priority" argument) and Windows ReportEvent() (as a "wType" argument).
Currently the only codepath to write to "syslog" domain is slog() function. However, this patch allows the interface to be extended.
Note that since slog() is using G_LOG_LEVEL_INFO level, its behaviour doesn't change.
Originally-by: Yuri Pudgorodskiy <yur@virtuozzo.com> Signed-off-by: Andrey Drobyshev <andrey.drobyshev@virtuozzo.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com> Tested-by: Konstantin Kostiuk <kkostiuk@redhat.com> Signed-off-by: Konstantin Kostiuk <kkostiuk@redhat.com>
show more ...
|
f9f0e617 | 29-Nov-2022 |
Andrey Drobyshev <andrey.drobyshev@virtuozzo.com> |
qga-win: add logging to Windows event log
This commit allows QGA to write to Windows event log using Win32 API's ReportEvent() [1], much like syslog() under *nix guests.
In order to generate log me
qga-win: add logging to Windows event log
This commit allows QGA to write to Windows event log using Win32 API's ReportEvent() [1], much like syslog() under *nix guests.
In order to generate log message definitions we use a very basic message text file [2], so that every QGA's message gets ID 1. The tools "windmc" and "windres" respectively are used to generate ".rc" file and COFF object file, and then the COFF file is linked into qemu-ga.exe.
[1] https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-reporteventa [2] https://learn.microsoft.com/en-us/windows/win32/eventlog/message-text-files
Originally-by: Yuri Pudgorodskiy <yur@virtuozzo.com> Signed-off-by: Andrey Drobyshev <andrey.drobyshev@virtuozzo.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com> Tested-by: Konstantin Kostiuk <kkostiuk@redhat.com> Signed-off-by: Konstantin Kostiuk <kkostiuk@redhat.com>
show more ...
|
28236ad8 | 12-Nov-2022 |
Brad Smith <brad@comstyle.com> |
qga: Add initial OpenBSD and NetBSD support
qga: Add initial OpenBSD and NetBSD support
Signed-off-by: Brad Smith <brad@comstyle.com> Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com> Reviewed-
qga: Add initial OpenBSD and NetBSD support
qga: Add initial OpenBSD and NetBSD support
Signed-off-by: Brad Smith <brad@comstyle.com> Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Konstantin Kostiuk <kkostiuk@redhat.com>
show more ...
|
cce910f2 | 20-Nov-2022 |
Kfir Manor <kfir@daynix.com> |
qga:/qga-win: skip getting pci info for USB disks
Skip getting PCI info from disks type USB and give them an empty PCI address instead.
Signed-off-by: Kfir Manor <kfir@daynix.com> Reviewed-by: Kons
qga:/qga-win: skip getting pci info for USB disks
Skip getting PCI info from disks type USB and give them an empty PCI address instead.
Signed-off-by: Kfir Manor <kfir@daynix.com> Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Konstantin Kostiuk <kkostiuk@redhat.com>
show more ...
|