设为首页 收藏本站
查看: 1029|回复: 0

[经验分享] Install VMware Workstation as a Service

[复制链接]

尚未签到

发表于 2015-4-6 13:48:56 | 显示全部楼层 |阅读模式
Under default conditions, VMware Workstation does not support the ability to run virtual machines as a service. Stephen Warren shows you can change the default behavior using the Windows 2003 Resource Kit.

  Currently, VMware Workstation does not support the ability to run virtual machines as a service. As soon as you log off your computer, the running virtual machines are shut down or powered off. If you can install virtual machines as a service, you can perform the following:


  • Enable your host system to logon to a virtual domain controller.
  • Save time booting your virtual machines.
  Here is how you can install VMware Workstation as a service.
  

Requirements
  In order to run virtual machines as a service, you must have the following Windows Resource Kit Tools:


  • Instsrv.exe
  • Srvany.exe
  Download the Windows 2003 Resource Kit tools (rktools.exe) and install them. After you install the tools, copy the instsrv.exe and srvany.exe to the windows\system32 directory. It is then recommended that you reboot your computer.

Configuring VMware Workstation as a service
  The first step to configuring VMware Workstation as a service is to locate the VMware Workstation executable. The default location of the VMware Workstation executable is c:\program files\vmware\vmware workstation\vmware.exe.
  Once you have located VMware.exe, the crucial step in the process is to locate the path of the configuration file of the virtual machine that you want to turn into a service. In a virtual machine the .vmx file is the file that stores the configuration for a virtual machine. In order for VMware Workstation to run as a service, you have to be able to locate the path to the .vmx file.
  For example, if your virtual machines are all saved to D: the path would be as follows: D:\My Virtual Machines\Workstation\winXPPRO.vmx. Once you have the path to the executable and the path to the configuration file, you are ready to create the service.

Creating the service

First it is recommended that you create a name standard for all of your virtual machines. For example, if you are creating a domain controller to run as a service, you might call it vmware_dc. Once you have the standard, click Start | Programs| Accessories | Command Promptand type the command shown in Figure A.
Figure A

DSC0000.jpg

This will create a service that will automatically run the SuSE 9.1 operating system.

Next, open the registry by clicking Start | Run |.Then typeregedit and expand  HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\"name of your VMware Service subkey".

In this example, the name of the service is VMWARE_SUSE. Right-click on the VMWARE_SUSE name key and choose New | Keyand call the subkey parameters as shown inFigure B.
Figure B

DSC0001.jpg

Subkey parameters

Next, right-click on the Parameterssubkey and choose New | String Valueand call the key Application, as shown in Figure C. Double-click the Application key valueand enter the path to the vmware.exe and the virtual machine's .vmx file as shown in Figure D.
Figure C

DSC0002.jpg

Create the Application key

Figure D

DSC0003.jpg

Enter the path to the vmware.exe virtual machine's .vmx file
  The default path is C:\program files\vmware\VMware Workstation\VMware.exe followed by the path to the virtual machine's .vmx file. Remember to put this path in double quotation marks.

"c:program filesvmwarevmware workstationvmware.exe" -x "d:my virtual machinesvmsuse linux 9.1suse.vmx"
Now that you have added the path, you need to set the start-up options for the newly created service. Click Start | Run |and type services.msc and browse to the service you just created for your VMware Workstation virtual machine (see Figure E).
Figure E

DSC0004.jpg

Set the start-up options for the newly created service

Double-click on the service and select the Log On tab. On the General tab choose Automaticas the startup type and then select the Log Ontab and select the Local System accountto run the service (see Figure F). Additionally, you also need to select Allow serviceto interact with the desktop. Next, test the service by starting it and watching your virtual machine start. You might be prompted to create a new unique identifier as shown in Figure G. The final test is to reboot your machine to make sure the virtual machine starts as well. You can repeat these steps for as many virtual machines as your system can handle.
Figure F

DSC0005.jpg

Select the Local System account

Figure G

DSC0006.jpg

Create a unique identifier

When running virtual machines as a service, make sure all floppy drives, CD-ROM, and other devices are disconnected. It is also recommended that you disable VMware Hints by adding the following line (Figure H) to your *.vmx file:
Hints.hideall="TRUE."
Figure H

DSC0007.jpg

Add this line to your .vmx file to disable VMware Hints
  
  
  
  -------------------------------
  The instructions in here look a little complicated compared to the way I did this.
  VMware Workstation 8 and 9 have the ability to do this through the GUI. The easiest way is to simply shut down the VM and from the main application window, press F9 to display your library if not already visible. Drag the VM down to Shared VMs, then right click 'Shared VMs' and choose 'Manage AutoStart VMs' -- then set it up however you prefer. I think the standard action for an auto-started VM is to simply suspend during reboots of the host.
  If you've got Workstation 9 and Windows 8, there is a bug that may require you to uninstall/reinstall Workstation in order to get the VMware service to activate the first time.
  There is a drawback to this method: It's considered remote and won't get 3D acceleration or access to the host's clipboard.
  The upside: You don't have to log into Windows, your Shared VMs will fire up just like any other service.
  To deal with the downsides, I just right click the VM while it's off and 'Stop Sharing'. At that point, it's a 'local' VM again which will allow for 3d and clipboard support. Then when I'm done working on it, just put it back to Shared and it'll go back to it's previous settings.
DSC0008.jpg
  
  转:http://www.techrepublic.com/blog/the-enterprise-cloud/how-do-i-install-vmware-workstation-as-a-service/429/

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.iyunv.com/thread-54310-1-1.html 上篇帖子: [转载]VMware使用vmware-vdiskmanager.exe增加虚拟硬盘容量(是扩容方式,不是挂载虚拟硬盘方式) 下篇帖子: vmware 桥接 net 区别
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表