Under win7 VirtualBox virtual machine boot background self-starting

  

win7 install a linux virtual machine, learning very well.

But every time you use linux, open virtualBox--> start the installation of linux system--> then use remote desktop (SSH, etc.) to connect

each time manually More trouble, and the Linux virtual machine also has a window, which is more complicated. If you can boot from the boot and run the Linux virtual machine in the background (no visible window), then you are happy.

Find the installation directory of VirtualBox

My virtualbox is installed in D:\\virualBox, enter this directory, you will see a VBoxManage.exe file, there is nothing wrong, we just use it to Start the virtual machine.

How to start? The command line is as follows


Copy the code
The code is as follows: VBoxManage startvm <uuid>| <name> [--type gui| Sdl| Headless]

For example, if my new virtual machine is called study, then


copy the code
code as follows: D:\\virualBox\\VBoxManage startvm study --type headless --type headless: indicates background execution, no window oh

Come, we open cmd, try this command


The prompt has started the study virtual machine.

Power On Self Startup

You can't see the window now, but you still need to manually enter the command line to start it. If you can boot from the boot just fine

1, we prefer to do a bat script: virtualboxtStart.bat

2, inside the above command: D:\\virualBox\\VBoxManage startvm study --type headless

3. Put virtualboxtStart.bat in C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\Startup. The script in this directory is automatically run when booting.

Okay, the little work is done. Restart the computer, you will find that win7 secretly helped us start the virtual machine of study.

You can use SSH to connect and operate.

Note: You can also use the command line to manage the state of the virtual machine in cmd:

VBoxManage controlvm <uuid>| <name> pause| Resume| Reset| Poweroff| Savestate|

For example, I want to close:

D:\\virualBox\\VBoxManage controlvm study poweroff

The above is a small series for everyone to introduce the virtualBox virtual machine under the win7 Start, I hope to help everyone, if you have any questions, please leave a message, Xiaobian will reply to you in time. Thank you very much for your support of this website!

Copyright © Windows knowledge All Rights Reserved