简体   繁体   English

使用VMware powercli进行自动部署

[英]Automated deployment using VMware powercli

We are having build environment where we did not use any tools like Cruise control , TFS or buildforge. 我们正在构建环境,我们没有使用任何工具,如Cruise控件,TFS或buildforge。

We are purely depend upon Msbuild and powershell. 我们纯粹依赖于Msbuild和powershell。 We decided to automate the deployment process. 我们决定自动化部署过程。

As we are using VMWare ESXi to meet our Virtual machine needs. 我们正在使用VMWare ESXi来满足我们的虚拟机需求。 We decided to use VMWare powercli to automate deployment process. 我们决定使用VMWare powercli来自动化部署过程。

After build is over , VMware powercli will revert the snapshot of VM to fresh state and we tried using Invoke-VMScript to do automated deployment. 构建完成后,VMware powercli会将VM的快照恢复到新状态,我们尝试使用Invoke-VMScript进行自动部署。

But as our deployment has UI , this is nearly impossible as Powercli try to invoke UI in session 0 and it doesn't support UI application. 但是由于我们的部署具有UI,因此当Powercli尝试在会话0中调用UI并且它不支持UI应用程序时,这几乎是不可能的。

Does any body overcome this problem and installed your application successfully in Virtual machine? 有没有机构克服这个问题并在虚拟机中成功安装了您的应用程序?

I have some experience in the area. 我在该地区有一些经验。 I use PowerCLI and Windows Remote to get the job done. 我使用PowerCLI和Windows Remote来完成工作。 I have a machine with VMWare snapshot where windows remoting is activated and configured and then I use PowerCLI to revert to snapshot and power the machine on and then I call Invoke-Command. 我有一台带VMWare快照的机器,其中Windows远程处理已激活并配置,然后我使用PowerCLI恢复快照并打开机器电源,然后调用Invoke-Command。 Not sure if it will survive the UI thing, but worth a try. 不确定它是否会在UI中存活,但值得一试。 First make sure that you can execute your task from PowerShell and if yes - then windows remouting will most probably be able to do it as well. 首先确保你可以从PowerShell执行你的任务,如果是的话 - 那么windows remouting很可能也能做到。 You can read how to configure Windows Remouting here: http://amarchuk.blogspot.com/2011/10/windows-remoting-and-powershell.html 您可以在此处阅读如何配置Windows Remouting: http ://amarchuk.blogspot.com/2011/10/windows-remoting-and-powershell.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM