当前位置:首页 > 虚拟机 > 正文

怎么设置开机自动启动vm虚拟机(vm虚拟机可以设置启动盘吗)

Windows10 sets VMware to automatically start at boot, specifying virtual machines to start at the same time
1. Create a self-start script
New vm_
" C:\ProgramFiles(x86)\VMware\VMwareWorkstation\”-x “E:\VM-MP\vm01\”
Note:
1. "C:\ProgramFiles(x86)\VMware\VMwareWorkstation\" is my vmware startup path;
2. "E:\VM-MP\vm01\" It is the virtual machine server that I specify to start when my PC is turned on;
There are spaces around the -x parameter between parts 3, 1, and 2;
4. Click vm_ to test the script.
2. Set up auto-start at boot
1. Press windows+R, enter shell:startup, and press Enter
The directory that will be opened after pressing Enter As follows:
C:\Users\Administrator\AppData\Roaming\Microsoft\Windows\StartMenu\Programs\Startup
2. Copy the vm_ created above to C :\Users\Administrator\AppData\Roaming\Microsoft\Windows\StartMenu\Programs\Startup
3. Restart the PC for testing

The virtual machine automatically starts when the computer is turned on
The following will share a solution on how to make the virtual machine automatically start when the computer is turned on.
In case you can’t find it, you can save it first!
The principle of self-starting of VMwareworkstation virtual machine
We usually cannot find the setting method in the commonly used VMwareworkstation graphical interface, but it does not mean that there is no setting method. You need to set the startup method. To start, first we need to understand the command line tool vmrun provided by VMwareworkstation
(1) We enter the installation directory of VMwareworkstation and find the application, as shown in the figure below.
(2) Add the installation directory of VMwareworkstation to the environment variables as shown in the picture: follow the order in the picture 1-2-3-4-5-6-7-8
Note: The fifth step is to add the installation directory of VMwareworkstation
(3) Press and hold the key combination (windows key + R key) to pop up cmd in the air and press Enter to view the syntax of vmrun in the dos interface and parameters.
This step can be omitted mainly to check the command parameters
(4) Command format "vmrun-Twsstart" "Virtual machine's working directory path" nogui"
Nogui in this command means no graphical interface Start
Create a new notepad or TXT on the desktop, open it and edit an opening script in it,
Save it as a .bat file, as shown below:
Also You can add a shutdown script, as shown in the figure below:
Set the virtual machine to start automatically on startup in Windows
(Use scheduled tasks or add group policy to achieve this)

(1) Create a new scheduled task: as shown below:
If you can’t find it, you can find the task scheduler in the control panel and follow the following sequence of operations
After the scheduled task is created, You can restart the computer to test whether the virtual machine has the self-start function
(2) Use group policy to achieve it
Key combination (Windows key + R key) Enter in "Run" to open the group policy editor Device.:
In Group Policy, select
User Configuration -> Windows Settings -> Script (Login | Logout) to the right, and select "Login" under the name:
After the setting is completed, that is You can restart the computer to test whether the virtual machine has the self-start function.
Shut down the computer and restart it, and you can see that other virtual machines also start automatically.