1.创建vm_centos.bat文件
"D:\Program Files (x86)\VMware\VMware Workstation\vmware.exe" -x "E:\VMware\CentOS7\CentOS7.vmx"
"D:\Program Files (x86)\VMware\VMware Workstation\vmware.exe" 为VMWare虚拟机的安装路径。
"E:\VMware\CentOS7\CentOS7.vmx" 为虚拟机已安装系统的路径,注意是.vmx扩展名的文件。
2.设置开机启动项
找到启动文件夹,一般是C:\Users\用户名\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
或者打开运行(win+R),输入shell:startup,回车,也可以快速打开启动文件夹。
把vm_centos.bat文件移动到启动文件夹即可。
vmware.exe 可用命令
Usage: vmware (OPTION ...] [—] [configuration file(s)] where OPTIONS are: -v Show program version -x Power on when a virtual machine is opened -X Same as -x but also go into full screen mode -P Start the virtual machine paused -q Close virtual machine at power off -sNAME=VALUE Set variable NAME to VALUE -n Open a new window -f Start in full screen mode Console connection: -H hostname Host -U username User name -P password Password for remote connection