0be40839 | 12-Nov-2015 |
Yuri Pudgorodskiy <yur@virtuozzo.com> |
qga: allow to lookup in PATH from the passed envp for guest-exec
This was original behaviour before GLIB gspawn() rework and we rely on this behaviour.
Signed-off-by: Yuri Pudgorodskiy <yur@virtuoz
qga: allow to lookup in PATH from the passed envp for guest-exec
This was original behaviour before GLIB gspawn() rework and we rely on this behaviour.
Signed-off-by: Yuri Pudgorodskiy <yur@virtuozzo.com> Signed-off-by: Denis V. Lunev <den@openvz.org> CC: Michael Roth <mdroth@linux.vnet.ibm.com> * add version check (2.33.2) for G_SPAWN_SEARCH_PATH_FROM_ENVP Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
show more ...
|
fb687773 | 28-Oct-2015 |
Olga Krishtal <okrishtal@parallels.com> |
qga: set file descriptor in qmp_guest_file_open non-blocking on Win32
Set fd non-blocking to avoid common use cases (like reading from a named pipe) from hanging the agent. This was missed in the or
qga: set file descriptor in qmp_guest_file_open non-blocking on Win32
Set fd non-blocking to avoid common use cases (like reading from a named pipe) from hanging the agent. This was missed in the original code.
The patch introduces qemu_set_handle_nonoblocking, the local analog of qemu_set_nonblock for HANDLES. The usage of handles in qemu_set_non/block is impossible, because for win32 there is a difference between file discriptors and file handles, and all file ops are made via Win32 api.
Signed-off-by: Olga Krishtal <okrishtal@parallels.com> Signed-off-by: Denis V. Lunev <den@openvz.org> CC: Michael Roth <mdroth@linux.vnet.ibm.com> CC: Stefan Weil <sw@weilnetz.de> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
show more ...
|
c87d0964 | 28-Oct-2015 |
Olga Krishtal <okrishtal@parallels.com> |
qga: fixed CloseHandle in qmp_guest_file_open
CloseHandle use HANDLE as an argument, but not *HANDLE
Signed-off-by: Olga Krishtal <okrishtal@parallels.com> Signed-off-by: Denis V. Lunev <den@openvz
qga: fixed CloseHandle in qmp_guest_file_open
CloseHandle use HANDLE as an argument, but not *HANDLE
Signed-off-by: Olga Krishtal <okrishtal@parallels.com> Signed-off-by: Denis V. Lunev <den@openvz.org> Reviewed-by: Stefan Weil <sw@weilnetz.de> CC: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
show more ...
|
a1853dca | 13-Oct-2015 |
Yuri Pudgorodskiy <yur@virtuozzo.com> |
qga: guest-exec simple stdin/stdout/stderr redirection
Implemented with base64-encoded strings in qga json protocol. Glib portable GIOChannel is used for data I/O.
Optinal stdin parameter of guest-
qga: guest-exec simple stdin/stdout/stderr redirection
Implemented with base64-encoded strings in qga json protocol. Glib portable GIOChannel is used for data I/O.
Optinal stdin parameter of guest-exec command is now used as stdin content for spawned subprocess.
If capture-output bool flag is specified, guest-exec redirects out/err file descriptiors internally to pipes and collects subprocess output.
Guest-exe-status is modified to return this collected data to requestor in base64 encoding.
Signed-off-by: Yuri Pudgorodskiy <yur@virtuozzo.com> Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> * switch from 'struct GuestIOExecData' to 'GuestIOExecData' * s/TRUE/true/g, s/FALSE/false/g for gboolean return values * s/inp_data/input_data/ Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
show more ...
|
f74df9bf | 13-Oct-2015 |
Yuri Pudgorodskiy <yur@virtuozzo.com> |
qga: handle G_IO_STATUS_AGAIN in ga_channel_write_all()
glib may return G_IO_STATUS_AGAIN which is actually not an error. Also fixed a bug when on incomplete write buf pointer was not adjusted.
Sig
qga: handle G_IO_STATUS_AGAIN in ga_channel_write_all()
glib may return G_IO_STATUS_AGAIN which is actually not an error. Also fixed a bug when on incomplete write buf pointer was not adjusted.
Signed-off-by: Yuri Pudgorodskiy <yur@virtuozzo.com> Signed-off-by: Denis V. Lunev <den@openvz.org> Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
show more ...
|
4005b473 | 13-Oct-2015 |
Denis V. Lunev <den@openvz.org> |
qga: handle possible SIGPIPE in guest-file-write
qemu-ga should not exit on guest-file-write to pipe without read end but proper error code should be returned. The behavior of the spawned process sh
qga: handle possible SIGPIPE in guest-file-write
qemu-ga should not exit on guest-file-write to pipe without read end but proper error code should be returned. The behavior of the spawned process should be default thus SIGPIPE processing should be reset to default after fork() but before exec().
Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: Yuri Pudgorodskiy <yur@virtuozzo.com> Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
show more ...
|
d697e30c | 13-Oct-2015 |
Yuri Pudgorodskiy <yur@virtuozzo.com> |
qga: guest exec functionality
Guest-exec rewritten in platform-independent style with glib spawn.
Child process is spawn asynchronously and exit status can later be picked up by guest-exec-status c
qga: guest exec functionality
Guest-exec rewritten in platform-independent style with glib spawn.
Child process is spawn asynchronously and exit status can later be picked up by guest-exec-status command.
stdin/stdout/stderr of the child now is redirected to /dev/null Later we will add ability to specify stdin in guest-exec command and to get collected stdout/stderr with guest-exec-status.
Signed-off-by: Yuri Pudgorodskiy <yur@virtuozzo.com> Signed-off-by: Denis V. Lunev <den@openvz.org> CC: Michael Roth <mdroth@linux.vnet.ibm.com> * use g_new0 in place of g_malloc for GuestExec struct * commit msg spelling fixes * s/inp-data/input-data * document capture-input mode as false by default * use GetProcessId() for pids on w32 instead of casting HANDLE Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
show more ...
|
b4fe97c8 | 13-Oct-2015 |
Denis V. Lunev <den@openvz.org> |
qga: drop guest_file_init helper and replace it with static initializers
This just makes code shorter and better.
Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: Yuri Pudgorodskiy <yu
qga: drop guest_file_init helper and replace it with static initializers
This just makes code shorter and better.
Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: Yuri Pudgorodskiy <yur@virtuozzo.com> Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
show more ...
|
f693fe6e | 19-Oct-2015 |
Michael Roth <mdroth@linux.vnet.ibm.com> |
qga: guest-get-memory-blocks shouldn't fail for unexposed memory blocks
Some guests don't expose memory blocks via sysfs at all. This shouldn't be a failure, instead just return an empty list. For o
qga: guest-get-memory-blocks shouldn't fail for unexposed memory blocks
Some guests don't expose memory blocks via sysfs at all. This shouldn't be a failure, instead just return an empty list. For other access failures we still report an error.
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
show more ...
|
6eaeae37 | 02-Oct-2015 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
qga: do not override configuration verbosity
Move the default verbosity settings before loading the configuration file, or it will overwrite it. Found thanks to writing qga tests :)
Signed-off-by:
qga: do not override configuration verbosity
Move the default verbosity settings before loading the configuration file, or it will overwrite it. Found thanks to writing qga tests :)
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
show more ...
|
8e34bf36 | 02-Oct-2015 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
qga: add QGA_CONF environment variable
Having a environment variable allows to override default configuration path, useful for testing. Note that this can't easily be an argument, since loading conf
qga: add QGA_CONF environment variable
Having a environment variable allows to override default configuration path, useful for testing. Note that this can't easily be an argument, since loading config is done before parsing the arguments.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
show more ...
|
1e9b65bb | 19-Jun-2015 |
Markus Armbruster <armbru@redhat.com> |
error: On abort, report where the error was created
This is particularly useful when we abort in error_propagate(), because there the stack backtrace doesn't lead to where the error was created. Lo
error: On abort, report where the error was created
This is particularly useful when we abort in error_propagate(), because there the stack backtrace doesn't lead to where the error was created. Looks like this:
Unexpected error in parse_block_error_action() at .../qemu/blockdev.c:322: qemu-system-x86_64: -drive if=none,werror=foo: 'foo' invalid write error action Aborted (core dumped)
Note: to get this example output, I monkey-patched drive_new() to pass &error_abort to blockdev_init().
To keep the error handling boiler plate from growing even more, all error_setFOO() become macros expanding into error_setFOO_internal() with additional __FILE__, __LINE__, __func__ arguments. Not exactly pretty, but it works.
The macro trickery breaks down when you take the address of an error_setFOO(). Fortunately, we do that in just one place: qemu-ga's Windows VSS provider and requester DLL wants to call error_setg_win32() through a function pointer "to avoid linking glib to the DLL". Use error_setg_win32_internal() there. The use of the function pointer is already wrapped in a macro, so the churn isn't bad.
Code size increases by some 35KiB for me (0.7%). Tolerable. Could be less if we passed relative rather than absolute source file names to the compiler, or forwent reporting __func__.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Acked-by: Laszlo Ersek <lersek@redhat.com>
show more ...
|
08e64640 | 20-Jun-2015 |
Markus Armbruster <armbru@redhat.com> |
qga/vss-win32: Document the DLL requires non-null errp
requester.cpp uses this pattern to receive an error and pass it on to the caller (err_is_set() macro peeled off for clarity):
... code tha
qga/vss-win32: Document the DLL requires non-null errp
requester.cpp uses this pattern to receive an error and pass it on to the caller (err_is_set() macro peeled off for clarity):
... code that may set errset->errp ... if (errset->errp && *errset->errp) { ... handle error ... }
This breaks when errset->errp is null. As far as I can tell, it currently isn't, so this is merely fragile, not actually broken.
The robust way to do this is to receive the error in a local variable, then propagate it up, like this:
Error *err = NULL;
... code that may set err ... if (err) ... handle error ... error_propagate(errset->errp, err); }
See also commit 5e54769, 0f230bf, a903f40.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
show more ...
|
259434b8 | 30-Jun-2015 |
Marc-André Lureau <marcandre.lureau@gmail.com> |
qemu-ga: implement win32 guest-set-user-password
Use NetUserSetInfo() to set the user password.
This function is notoriously known to be problematic for users with EFS encrypted files. But the alte
qemu-ga: implement win32 guest-set-user-password
Use NetUserSetInfo() to set the user password.
This function is notoriously known to be problematic for users with EFS encrypted files. But the alternative, NetUserChangePassword() requires the old password. Nevertheless, The EFS file should be recovered by changing back to the old password.
Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com> Reviewed-by: Daniel P. Berrange <berrange@redhat.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
show more ...
|