VirtualBox and Windows Task Scheduler - No GUI

This is for discussing general topics about how to use VirtualBox.
Post Reply
htwingnut
Posts: 8
Joined: 4. Jul 2009, 15:27
Primary OS: MS Windows Vista
VBox Version: PUEL
Guest OSses: XP, Vista, Server 2003

VirtualBox and Windows Task Scheduler - No GUI

Post by htwingnut »

I want a Linux virtual machine to start up with Windows.

I set it to start up with Windows Task manager using a simple batch file:

Code: Select all

"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" startvm "C:\Users\Admin\VirtualBox VMs\LANCACHE\lancache.vbox" --type gui
If I just run that from the command line (Administrator Mode) it brings up the machine in a window just fine.

If I just right click the batch file and "run as Administrator" it brings up the machine in a window just fine.

If I start as a task in as startup in Task Scheduler and with "highest privileges" (i.e. Adminstrator mode), the machine starts fine, I can see the linux screen display in the preview from the VirtualBox App, but I can't bring up the Linux Window even if I click "Show".

I've tried without any --type switch. I've tried just booting with just selecting the .vbox file to start with windows. I can't bring up the machine display.

Any ideas?
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: VirtualBox and Windows Task Scheduler - No GUI

Post by scottgus1 »

This is expected, if you are running a guest through Task Scheduler with the intent to have the guest run without having to log in on the host PC. This runs the guest in a different account and the guest won't be visible in the account you're logged in on. You won't be able to use the main Virtualbox window or vboxmanage commands on this guest.

If you enable the guest's RDP server in the guest's Display settings, you can remote into the guest's Virtualbox display even if it is started via Task Manager.

VboxVMservice viewtopic.php?f=32&t=8595 runs a guest as a service when the host PC starts (without having to log in), and automatically turns off the guest when the host shuts down. You can issue command-line commands to the service to save-state the guest so it can be brought up again in the main Virtualbox window, then save-state the guest and put it back under the service again.

If Task Manager is just supposed to start a guest when you log in, then be sure to use the account you log in on as the originating account for the task. Then the guest should start visibly.
htwingnut
Posts: 8
Joined: 4. Jul 2009, 15:27
Primary OS: MS Windows Vista
VBox Version: PUEL
Guest OSses: XP, Vista, Server 2003

Re: VirtualBox and Windows Task Scheduler - No GUI

Post by htwingnut »

Thanks. I have the virtual machine set to load using main Windows username and password that was used to create the virtualbox machine. I don't see how starting with Task Scheduler vs running the batch file from command line or opening shortcut would be any different? It's the same credentials.

I can see the Linux OS virtual machine display in the VirtualBox preview window though. It shows it as Running. I can see everything as if it were running normally in the preview window, yet I can't bring it up into a full window. All the GUI elements are clearly there and functional. Just only in the preview screen.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: VirtualBox and Windows Task Scheduler - No GUI

Post by scottgus1 »

Ok, so it is supposed to be an auto-start guest in the account you normally log in.

Could be that the guest window is off to the side. Shut down the guest, then issue this command in your command prompt window:
CD "C:\Program Files\Oracle\VirtualBox"
vboxmanage setextradata "LANCACHE" "GUI/LastNormalWindowPosition"
vboxmanage setextradata global "GUI/LastWindowPosition"
Try the guest again.
htwingnut
Posts: 8
Joined: 4. Jul 2009, 15:27
Primary OS: MS Windows Vista
VBox Version: PUEL
Guest OSses: XP, Vista, Server 2003

Re: VirtualBox and Windows Task Scheduler - No GUI

Post by htwingnut »

Thank you, I'll give that a try. But will be a few days since I can't restart my server for a while. It's in the middle of scanning and formatting a couple new drives I recently added.
Post Reply