本文介绍了在使用MSBuild和MS Virtual Server和/或Hyper-V Server虚拟化的构建过程中,如何创建虚拟机?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想做的是创建一个干净的虚拟机映像作为应用程序构建的输出.

What I would like to do is create a clean virtual machine image as the output of a build of an application.

因此将创建一个新的虚拟机(使用模板很好,安装了操作系统,并安装了一些基本软件)-将在IIS中创建一个新的网站,并将该Web应用程序的构建输出复制到虚拟机硬盘上的某个位置,并且IIS配置正确,虚拟机将启动并运行.

So a new virtual machine would be created (from a template is fine, with the OS installed, and some base software installed) --- a new web site would be created in IIS, and the web app build output copied to a location on the virtual machine hard disk, and IIS configured correctly, the VM would start up and run.

我知道有MSBuild任务可以编写IIS中所有管理操作的脚本,但是如何使用虚拟机编写所有操作的脚本?具体来说,是从模板创建新的虚拟机,对其进行唯一命名,启动,配置等...

I know there are MSBuild tasks to script all the administrative actions in IIS, but how do you script all the actions with Virtual machines? Specifically, creating a new virtual machine from a template, naming it uniquely, starting it, configuring it, etc...

我特别想知道是否有人在构建过程中成功实现了任何VM脚本.

Specifically I was wondering if anyone has successfully implemented any VM scripting as part of a build process.

更新:我假设使用Hyper-V,有一组不同的库/API可以编写虚拟机脚本,有人玩过吗?还有具有做类似事情的实际经验的人吗?

Update: I assume with Hyper-V, there is a different set of libraries/APIs to script virtual machines, anyone played around with this? And anyone with real practical experience of doing something like this?

推荐答案

结帐适用于Hyper-V的Powershell管理库CodePlex .一些功能:

这篇关于在使用MSBuild和MS Virtual Server和/或Hyper-V Server虚拟化的构建过程中,如何创建虚拟机?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-03 11:07