1

My development computer is running Windows 7 with 16gig of RAM. I run Linux Ubuntu with Apache in the VM for web design testing purposes. To reduce clutter in my default user account in Windows 7 I installed VirtualBox under a second user. Right now it works using the Startup startmenu folder, but I have to literally log in as the second user after a reboot to make it start. I'd like my VM to start without having to install it as my default user and without having to log into the second user's account. Is this possible?

Thanks

EDIT: I've added '\vboxmanager.exe startvm "VM Name"' to Task Scheduler to run at startup. We'll see how that works when I reboot my machine.

4
  • So you log in then do a fast user switch back?
    – Taylor
    Aug 11, 2010 at 18:58
  • So on boot you want Virtual Box to start as that second user? Or do you want to open it after boot manually?
    – Campo
    Aug 11, 2010 at 19:13
  • It was more of an organizational thing then functionality thing. I have to run a bunch of VMs; Linux for the server, XP + IE6, XPx64 + IE7x64, Win7 + IE7, Vista + IE8, etc... Sometimes I have 4 or 5 VMs open at once. I don't need all those different VM windows cluttering my desktop. It's so much easier to do a quick switch user or remote desktop to work in the VM I want. I suppose I could use a virtual desktop... But right now, yes, I have to log into the account to get my server VM to start and I would like it to start at boot.
    – Albion
    Aug 12, 2010 at 15:42
  • You certainly could run VBoxHeadless under your own user account, per Matt, to prevent a window from coming up for each VM. Or, to continue running it as another user, try the psexec trick.
    – Skyhawk
    Aug 12, 2010 at 15:55

3 Answers 3

4

You can add something similar to this as a shortcut inside your start menu.

C:\Path\To\VirtualBox\VBoxHeadless.exe -startvm “VM Name”

It will run on your user, however, it will not show up at all on your desktop screen.

You can also register that command as a service on the computer.

1

Just had a thought on this.

Why don't you just modify the permissions to allow you to run it? Then just add it to the startup group for your user and you are all done.

Alternatively I was thinking maybe setting up a shortcut to execute with the other username and password but just seems way to insecure.

1

Why not start it under the second user account via psexec?

psexec is more often used to execute commands on remote machines, but it also can be used to execute commands under a different user account on the local box.

It would look something like this:

psexec -u user2 -p password2 C:\Path\VBoxHeadless.exe -startvm "VM Name"

edit: borrowed Matt Lima's apparent understanding of the VBoxHeadless.exe command line syntax (and gave him an upvote)

Not the answer you're looking for? Browse other questions tagged .