Opened 5 years ago
Closed 5 years ago
#19518 closed defect (fixed)
Guest command execution fails if more than 2 environment vars are provided => fixed in svn/6.1.x x>6
Reported by: | mskov | Owned by: | paulson |
---|---|---|---|
Component: | guest additions | Version: | VirtualBox 6.1.6 |
Keywords: | Cc: | ||
Guest type: | Linux | Host type: | Windows |
Description
If more than 2 environment vars are provided during the guest command execution, we get an error VERR_ENV_INVALID_VAR_NAME:
C:\WINDOWS\system32>"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" guestcontrol TestVM run --username root --password keins --exe /bin/ls --putenv "test1=test" --putenv "test2=test" --putenv "test3=test" --wait-stdout VBoxManage.exe: error: VERR_ENV_INVALID_VAR_NAME VBoxManage.exe: error: Details: code VBOX_E_IPRT_ERROR (0x80bb0005), component GuestProcessWrap, interface IGuestProcess, callee IUnknown VBoxManage.exe: error: Context: "WaitForArray(ComSafeArrayAsInParam(aWaitStartFlags), gctlRunGetRemainingTime(msStart, cMsTimeout), &waitResult)" at line 1470 of file VBoxManageGuestCtrl.cpp
With 2 vars it works fine:
C:\WINDOWS\system32>"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" guestcontrol TestVM run --username root --password keins --exe /bin/ls --putenv "test1=test" --putenv "test2=test" --wait-stdout bin boot data dev ....
The problem happens with a Debian 10 guest with GAs 6.1.6. It does not happen with GAs 6.1.4 (or earlier).
Change History (2)
comment:1 by , 5 years ago
Owner: | set to |
---|---|
Status: | new → assigned |
comment:2 by , 5 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Summary: | Guest command execution fails if more than 2 environment vars are provided → Guest command execution fails if more than 2 environment vars are provided => fixed in svn/6.1.x x>6 |
This has been addressed in revision r137736 of the development branch of VirtualBox and will be available in any development snapshot Testbuilds of the Guest Additions which includes that revision. The fix has also been backported to the 6.1 branch of VirtualBox as of revision r137747 and will be available in any 6.1.x Testbuilds of the Guest Additions which include that revision. The fix will also be part of the next maintenance release of VirtualBox 6.1.x.
Thanks for the report. The environment variable handling in VBoxService was simplified in VirtualBox revision r83269 in the development branch and these changes were backported to 6.0.20 and 6.1.6. However a regression was introduced in that changeset which broke the handling of environment variables when there are more than two of them. A fix is in progress.