VirtualBox

2 年 前 建立

5 月 前 更新

#21230 assigned defect

VboxManage guestcontrol issue

回報者: cmccarron 負責人: pentagonik
元件: guest control 版本: VirtualBox-7.0.2
關鍵字: 副本:
Guest type: Windows Host type: Windows

描述 (由 cmccarron 作最後更新)

Still broken in 7.0.12 csm 10/18/2023

Prior to upgrading to VB 7.0, I could use vboxmanage guestcontrol to run a batch script on a windows 10 virtual machine and that script had access to the virtual machines shared folders/drives. I have been using this script for many years and many versions of VirtualBox. Now when the script runs it is reporting the H drive is not found. Everything in the VM_Setup.bat script works except for access to the H drive. The virtual machine has access to the H drive just not the guestcontrol feature.

Share folder section for the virtual machine is below. All of these drives work inside the virtual machine. <SharedFolders> <SharedFolder name="Projects" hostPath="F:\" writable="true" autoMount="false"/> <SharedFolder name="Downloads" hostPath="H:\Library\Downloads" writable="true" autoMount="false"/> <SharedFolder name="Shared" hostPath="H:\" writable="true" autoMount="false"/> <SharedFolder name="ElecWorkFile" hostPath="Z:\" writable="true" autoMount="false"/> </SharedFolders>

vboxmanage guestcontrol %VMN% run --quiet --unquoted-args --username "%VMU%" --password "" --exe "H:\Scripts\VM_Setup.bat" -- H:\Scripts\VM_Setup.bat %VM%

VBoxManage.exe: error: Waiting for guest process (flags 0x1) failed: No such file or directory "H:\Scripts\VM_Setup.bat" on guest 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 1373 of file VBoxManageGuestCtrl.cpp Waiting for VM Setup to Complete... Press any key to continue . . .

<------ Test Script (TestQ.bat) Start ----------> @echo off cls setlocal enabledelayedexpansion

SET VM=vm1 SET VMN="WinX Rockwell" SET VDI=WinX_Rockwell SET VMU=alliance SET VBMP=C:\Program Files\Oracle\VirtualBox SET VBM=vboxmanage.exe SET PATH=%PATH%;%VBMP% SET LINES=0

:WAITFORSETUP SET VMDONE=0

For /f "usebackq tokens=*" %%i IN (%VBM% guestcontrol %VMN% run --quiet --unquoted-args --username "%VMU%" --password "" --exe "H:\Scripts\VM_Status.bat" -- H:\Scripts\VM_Status.bat %VM% ) DO ( SET /a LINES+=1 SET RESULTS=%%i echo %%i ) echo %VMDONE% %LINES% IF "%LINES%" EQU "0" GOTO SKIP IF "%LINES%" NEQ "4" GOTO SKIP IF NOT "!RESULTS!." EQU "RESULTS:Complete=!." ( SET VMDONE=1 )

:SKIP If %VMDONE% EQU 0 ( Echo Waiting for VM Setup to Complete... ) ELSE ( Echo VM Setup to Complete ) endlocal

pause <------ Test Script (TestQ.bat) End ---------->

附加檔案 (8)

SharedDrives1.JPG (62.4 KB ) - 2 年 前, 由 cmccarron 新增
Virtual Machine showing H Drive attached
SharedDrives2.JPG (51.2 KB ) - 2 年 前, 由 cmccarron 新增
Results of the TestQ.bat script ran from the VM Host
NoPanda0.JPG (34.2 KB ) - 2 年 前, 由 cmccarron 新增
Showing Panda is removed from test computer
NoPanda1.JPG (94.4 KB ) - 2 年 前, 由 cmccarron 新增
Showing results of script running on the host
NoPanda2.JPG (131.9 KB ) - 2 年 前, 由 cmccarron 新增
Showing the virtual machine share folder is working
WinX Rockwell-2022-12-13-10-18-44.log (130.5 KB ) - 2 年 前, 由 cmccarron 新增
Log file
WinX Rockwell-Hardening-2022-12-13-10-12-25.7z (22.3 KB ) - 2 年 前, 由 cmccarron 新增
Hardening Log File
NoPandaLogFiles.7z (58.1 KB ) - 2 年 前, 由 cmccarron 新增
Complete Log Files

下載所有附檔: .zip

更動歷史 (22)

2 年 前cmccarron 編輯

附檔: 新增 SharedDrives1.JPG

Virtual Machine showing H Drive attached

2 年 前cmccarron 編輯

附檔: 新增 SharedDrives2.JPG

Results of the TestQ.bat script ran from the VM Host

comment:1 2 年 前cmccarron 編輯

More information on this issue can be found on the post below.

https://forums.virtualbox.org/viewtopic.php?f=2&t=107472

2 年 前cmccarron 編輯

附檔: 新增 NoPanda0.JPG

Showing Panda is removed from test computer

2 年 前cmccarron 編輯

附檔: 新增 NoPanda1.JPG

Showing results of script running on the host

2 年 前cmccarron 編輯

附檔: 新增 NoPanda2.JPG

Showing the virtual machine share folder is working

2 年 前cmccarron 編輯

Log file

2 年 前cmccarron 編輯

Hardening Log File

comment:2 2 年 前cmccarron 編輯

I tested this again on a computer that had Panda removed from it. The only virus software installed is Windows Defender. I get the same result. The GuestControl interface no longer has access to the shared folders in the virtual machine.

2 年 前cmccarron 編輯

附檔: 新增 NoPandaLogFiles.7z

Complete Log Files

comment:3 2 年 前cmccarron 編輯

This is still broken in version 7.0.6

VBoxManage.exe: error: Waiting for guest process (flags 0x1) failed: No such file or directory "H:\Scripts\VM_Status.bat" on guest 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 1373 of file VBoxManageGuestCtrl.cpp 0 0 Waiting for VM Setup to Complete...

comment:4 22 月 前pentagonik 編輯

Thanks for the report; this mostly likely has to do with the changed argument 0 handling we introduced in 7.0. This will be fixed in the next upcoming maintenance version, so that you can run your script in an unmodified way again.

comment:5 22 月 前pentagonik 編輯

狀態: newassigned
負責人: 指定為 pentagonik

comment:6 22 月 前AaronC81 編輯

I believe we may have just encountered this issue in a slightly different context - the symptoms sound rather similar.

We use VirtualBox for our UI testing pipeline, using VBoxManage to spawn GUI applications on a Windows guest, and then subsequently run scripts to interact with that GUI.

With Guest Additions 6.1.16, everything works as expected, and we can use a command line like the following to spawn a GUI process on the user vagrant:

VBoxManage guestcontrol <vm> run --username vagrant --password ... -- "C:/Program Files/.../Software.exe"

It is observable using Sysinternals Process Explorer that this actually spawns as a process owned by vagrant.

However, using Guest Additions 7.0.6, running the same command spawns the process under a service owned by SYSTEM, not vagrant. This means that the GUI window never actually appears on the desktop, and our tests can't interact with it.

Given that aiui drive mappings are specific to a user, I think this sounds like the same problem, where the command run by Guest Additions is being executed under the wrong account.

comment:7 21 月 前_nd_ 編輯

I am on a fedora 37 host, with a W10 guest (edited 2023-08-10: "host" and "guest" were mistakenly swapped) and I am experiencing a very a similar (or the same) issue. Some notes that may help.

  • The problem of not finding the drive went away as soon as I checked the automount property in the VM settings. I see that the original bug report contains autoMount="false", so it may be worth trying to set that to true.
  • After checking the automount checkbox, my host script that is supposed to start a program in the guest and open a file on the shared folder, still doesn't work. At least not fully. Though, in the Windows task manager I can see that the corresponding application is started up, but its window is not visible.
  • Opening the same file from the guest works fine.
最後由 _nd_ 編輯於 19 月 前 (上一筆) (差異)

comment:8 20 月 前_nd_ 編輯

My fedora system recently updated to Virtualbox 7.0.10 via rpmfusion, but the problem still persists.

comment:9 18 月 前_nd_ 編輯

Is this bug report still active?

If the problem persists for the OP in the most recent version of VB, he/she may update the version in the bug report to 7.0.10.

comment:10 18 月 前cmccarron 編輯

Still broken in 7.0.10.

comment:11 18 月 前_nd_ 編輯

Is it possible to update the version in the bug report (yellow area on top) to the current version? Hopefully that generates some attention.

And, a similar (duplicate?) bug has been reported recently: https://www.alldomusa.eu.org/ticket/21822

最後由 _nd_ 編輯於 18 月 前 (上一筆) (差異)

comment:12 17 月 前cmccarron 編輯

I cannot update the version in the header. It still appears broken in 7.0.12 also.

comment:13 17 月 前cmccarron 編輯

描述: 修改 (差異)

comment:14 5 月 前_nd_ 編輯

For a long time I used Guest Additions v6.1.48 as a workaround, but now I found out that the current version (v7.1.2) works for me (Fedora 39 host, W11 guest). Maybe this helps someone who also froze his/her updates of GA, and the issue might be closed.

注意: 瀏覽 TracTickets 來幫助您使用待辦事項功能

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette