Page 1 of 1
Task scheduler starts Windows 2000 vm headless
Posted: 30. Mar 2022, 22:33
by User_3NMOQ
In win10, I have 2 vm's : win2000 and xp. Task scheduler runs xp normally, but runs win2000 invisibly (I gathered that it's called a headless start). I want it to run normally. I even made the scheduler run a batch file containing the command vboxmanage startvm ... but I got the same result.
Any help, please.
Re: Task scheduler starts Windows 2000 vm headless
Posted: 30. Mar 2022, 23:10
by scottgus1
Please show the task command lines for both tasks.
Re: Task scheduler starts Windows 2000 vm headless
Posted: 30. Mar 2022, 23:38
by User_3NMOQ
For w2k:
"C:\Program Files\Oracle\VirtualBox\VirtualBoxVM.exe"
Arguments:
--comment "w2k_pro_Z" --startvm "{1446df8f-34ca-4359-89f7-1c8d3204b10c}"
From the batch file for w2k:
@"c:\program files\oracle\virtualbox\VBoxManage.exe" startvm "w2k_pro_Z"
For xp:
"C:\Program Files\Oracle\VirtualBox\VirtualBoxVM.exe"
Arguments:
--comment "XP2" --startvm "{4820af74-eb3d-4bec-887b-b5b8961fa1a0}"
PS: Clicking Show in the virtualbox manager is useless.
Re: Task scheduler starts Windows 2000 vm headless
Posted: 31. Mar 2022, 15:22
by scottgus1
Those command lines do look identical in spirit. What happens when you disable the tasks, reboot the host, then run the command lines manually?
Also, please post the VM's .vbox files:
Right-click the VM in the main Virtualbox window's VM list, choose Show in Explorer/Finder/File Manager. Zip the VM's .vbox file (not the .vbox-prev file), and post the zip file, using the forum's Upload Attachment tab. (Configure your host OS to show all extensions if the folder that opens does not show a .vbox file.)
Re: Task scheduler starts Windows 2000 vm headless
Posted: 2. Apr 2022, 14:20
by User_3NMOQ
When I run the commands manually, the vm starts normally.
I am uploading w2k_Z.zip
Thank you
Re: Task scheduler starts Windows 2000 vm headless
Posted: 2. Apr 2022, 19:50
by scottgus1
Thanks for the .vbox file. I don't see any settings that would influenced a forced start via Headless instead of Normal GUI.
User_3NMOQ wrote:When I run the commands manually, the vm starts normally.
This also shows that there is nothing in Virtualbox causing this headless start.
I'd next try comparing the task settings. Perhaps the headless-start VM is running in another account that is not logged in and has no access to a GUI environment, so the VM starts headless? VMs can be started without any account logged in and do start headless in such a start.
Re: Task scheduler starts Windows 2000 vm headless
Posted: 3. Apr 2022, 06:54
by User_3NMOQ
You are right, the problem was with the settings (but there is no other account). The vm starts normally now. The changes I made:
General: changed to Run only when user is logged in
Triggers: removed Stop the task if it runs longer than
Actions: removed the argument --comment
Conditions: no change
Settings: changed the values for: If the task fails, Attempt to restart, Stop the task if.
I never thought any of these could be responsible: thank you very much. Which change did the trick, please?
Re: Task scheduler starts Windows 2000 vm headless
Posted: 3. Apr 2022, 14:59
by scottgus1
User_3NMOQ wrote:Which change did the trick, please?
I'll guess this one:
User_3NMOQ wrote:Run only when user is logged in
User_3NMOQ wrote:there is no other account
Actually, there are other accounts, see
https://docs.microsoft.com/en-us/window ... l-accounts . 'SYSTEM' is one of them. You can see these by right-clicking an executable on your PC, select Properties then Security.
If an app runs when a user is not logged in, it must use a different account, as best I understand it. Or it may use the user's account but cannot run a GUI app. Forcing to wait until the user is logged in means the GUI is now available. It appears that Virtualbox is programmed to run a VM headless (really 'monitor-less'; I'll bet if you remoted into the VM OS or the Virtualbox VRDE server for the VM, you'd have seen the VM OS's GUI running.)
Since the VM was running in a non-GUI context, the user account might not have been able to fully recognize the VM's operation. Virtualbox is heavily tied into the individual user account for running the VMs. Each user running a VM has its own VboxSVC service running, if I understand correctly, and each user's VboxSVC cannot see other users' VboxSVCs to control the others' VMs. If a different account or account context from the logged-in user account was running the VM, then the logged-in user may not be able to show the other account/context's headless VM.
Re: Task scheduler starts Windows 2000 vm headless
Posted: 3. Apr 2022, 15:05
by scottgus1
One thing to mention: Starting a VM with a task will start the VM but not shut down the VM. Your VMs will turn off unexpectedly as if the power were cut, with all attendant problems therefrom, when the host reboots or shuts down.
There are ways to run a VM as a service, see the 3rd-party Apps subforum.
viewforum.php?f=32 I have used VboxVMService before (
viewtopic.php?f=32&t=8595) and found it decent. It handles shutting down or save-stating the VMs under its control when the host shuts down/reboots.
Re: Task scheduler starts Windows 2000 vm headless [SOLVED]
Posted: 6. Apr 2022, 01:51
by User_3NMOQ
The vm starts normally but then more problems arise. There doesn't seem to be an easy end to this so I'll use win xp instead. Thank you for all the info you've supplied. I downloaded VboxVMService as it will probably be of help. I am going to mark this thread Solved.