I won't focus this blog on how to create a service template but more on how you can track the changes that happen behind the scenes to troubleshoot any issues.

Let's first create a scenario.  For simplicity sake, we will use a single VM as this will help us understand the process and use it to track any other deployment. The service template will create a VM with Windows Server 2008 R2 SP1, install the Server App-V agent and then import a Server App-V package to the server.

Once you go through the deployment process and the job starts in the background, this is what occurs:

1) The VHD is transferred from the library to the host via BITS. This process is similar to creating a VM from a template.

2) Once the VM is created on the host, the process will add a virtual floppy to apply all the customization provided in the OS configuration of the template. This will include the addition of roles and features. You can view steps 1 and 2 by connecting to the VM using Hyper-V.

Once SysPrep is complete, the VM is domain joined and running the process that will install a guest VMM agent. You can confirm that this process occurred by connecting to the VM and navigating to %programdata%\vmmlogs. The guest agent will serve as the listener to the SCVMM service to perform actions on the guest VM.

SCVMM 2012 R2的VMM Agent目录如下:

C:\Program Files\Microsoft System Center 2012 R2\Virtual Machine Manager Guest Agent R2\bin\Diagnostics (该目录下有VMMGuestlog.svclog)

3) Once the agent is installed it will proceed to run scripts in the VM, but before it runs these scripts it needs to transfer them to the guest VM. This step allows you to restart the job if an error occurs. This is done by transferring the custom resource folder from the library to the VM and these files are stored under c:\windows\temp under a folder called scvmmxxx\xxx.cr folder.

4) Once the script files are copied, the Server App-V agent install script will launch the script using c:\windows\temp\ as its working directory. Here it will create two files named GCE_stderrorXXX and GCE_stdoutXXX. These are text files that capture the output of the running script. The GCE_stdoutxxx contains the information of the current actions being performed by the process and the GCE_stderrorxxx file will have any error encountered by the script. If the script encounters an error and stops the process, it will leave this last log in the directory for review. If the process completes successfully it deletes all the contents inside windows\temp

5) Assuming that the process succeeds, we then proceed to transfer the application files specified in the application section of the template. In this case, this is a Server App-V package so it will transfer the package files from the library and store them in the local drive. These files will be stored in c:\windows\MSSCVMMApplications.

Inside this folder you will have two additional folders. One is for Server App-V and it’s here that we store our App-V files. The other is a Webdeploy folder that will store any web apps you have specified in the template.

Since we are using Server App-V, it will launch all PowerShell command to import the application into the Server App-V cache.

NOTE If we were installing a SQL dacpack, the files will be deployed to c:\windows\ MSSCVMMSQLInstance

If the process was successful, you will see the Server App-V application running a service or an icon on the Server App-V agent application list.

The service template process will store logs in c:\programdata\Microsoft\Virtual Machine Manager to track the process of an application installation.

Sample entry of a VMMapplicationmanager.log:

If you are configuring a SQL instance in the service template as part of your deployment, you can gather SQL logs by going to c:\program files\Microsoft SQL Server\100\Setup Bootstrap\log and look in Summary.txt for errors or failures.

通过作业(详细信息)查看失败日志,重新启动作业后成功:

From:http://blogs.technet.com/b/scvmm/archive/2012/04/19/troubleshooting-service-templates-in-system-center-2012-virtual-machine-manager.aspx

VMM服务模板(虚机、APP)部署排错的更多相关文章

  1. Hyper-V 手动导入虚机配置实例(转载)

    原文转载:http://blog.51cto.com/bobzy/980241 Hyper-V提供了很方便的虚机导入和导出功能.平时假如我们想导出虚机,先选中虚机,然后鼠标右键在出现菜单列表中选中“导 ...

  2. 虚机下Ubuntu与Win7文件共享

    使用Samba服务实现虚机与本机的文件共享,简单的分为以下几个步骤,按部就班,so easy 1.安装smb sudo apt-get install samba sudo apt-get insta ...

  3. 比较Windows Azure 网站(Web Sites), 云服务(Cloud Services)and 虚机(Virtual Machines)

    Windows Azure提供了几个部署web应用程序的方法,比如Windows Azure网站.云服务和虚拟机.你可能无法确定哪一个最适合您的需要,或者你可能清楚的概念,比如IaaS vs PaaS ...

  4. 不用虚机不用Docker使用Azure应用服务部署ASP.NET Core程序

    一般我们写好了应用程序想要部署发布它,要么发布到物理机,要么发布到虚拟机,要么发布到容器来运行它.现在有了Azure应用服务,我们可以完全不用管这些东西,只管写好自己的代码,然后使用VisualStu ...

  5. xamarin.forms uwp app部署到手机移动设备进行测试,真机调试(device portal方式部署)

    最近学习xamarin.刚好 手上有一个lumia 930.所以试一试把uwp app部署到手机上,并真机调试一把. 目前环境: 1.开发pc电脑是win10,版本1607.加入了insider,所以 ...

  6. 外网不能访问部署在虚机的NodeJs网站(80端口)

    外网能访问部署在虚机的NodeJs网站需注意如下: 在管理门户上配置端点(Http 80->80) 在虚机中的防火墙入站规则中增加应用程序Node.exe的允许规则 启动NodeJs的侦听进程时 ...

  7. APP加固技术历程及未来级别方案:虚机源码保护

    传统App加固技术,前后经历了四代技术变更,保护级别每一代都有所提升,但其固有的安全缺陷和兼容性问题始终未能得到解决.而下一代加固技术-虚机源码保护,适用代码类型更广泛,App保护级别更高,兼容性更强 ...

  8. 使用powercli创建模板与克隆虚机

    用powercli练练手,需从实际案例出发,本节将使用powercli写两个demo,一个是创建模板,并根据模板创建新的虚机:另一个demo是克隆虚机. [注意] 1.创建模板与克隆操作只能在vcen ...

  9. Centos7系统kvm虚机忘记密码进不去, 通过宿主机修改/etc/shadow文件改密码,重启后系统起不来故障排错

    问题描述 某天, 因为其他项目组交接问题, kvm里面的堡垒机系统用户root密码登录不上,然后他通过宿主机修改/etc/shadow文件修改密码,但是修改完后重启系统后发现kvm宿主机连接不上虚机了 ...

随机推荐

  1. Darwin Streaming Server用vs2005编译运行过程

    原创. 一:编译 Darwin6.0.3版本是最新版本,也提供了.dsw文件.但是使用vs2005和vc6是编译不过的.所以,采用Darwin5.5.5版本.使用vc6打开WinNTSupport文件 ...

  2. 通过对源代码的反向工程学习CoreData架构

    在本文开始,先给出反向工程后的结果: 不过需要注意,三个实例的指针都被同一个实例拥有,比如三个指针都位于appDelegate. 在AppDelegate类中定义了下面三个属性: @property ...

  3. 【转】win7(windows7)下java环境变量配置方法

    原文网址:http://jingyan.baidu.com/article/925f8cb836b26ac0dde0569e.html win7(windows7)下java环境变量配置方法,java ...

  4. TCP/IP详解学习笔记(12)-TCP的超时与重传

    超时重传是TCP协议保证数据可靠性的另一个重要机制,其原理是在发送某一个数据以后就开启一个计时器,在一定时间内如果没有得到发送的数据报的ACK报文,那么就重新发送数据,直到发送成功为止. 1.超时 超 ...

  5. [Papers]NSE, $u_3$, Lebesgue space [Kukavica-Ziane, Nonlinearity, 2006]

    $$\bex u_3\in L^p(0,T;L^q(\bbR^3)),\quad \frac{2}{p}+\frac{3}{q}=\frac{5}{8},\quad \frac{24}{5}<q ...

  6. Android WebView常见问题的解决方案总结----例如Web page not available

    之前android虚拟机一直都可以直接联网,今天写了一个WebView之后,突然报出了Web page not available的错误,但是查看虚拟机自带的浏览器,是可以上网的,所以检查还是代码的问 ...

  7. Redrain仿酷狗音乐播放器开发完毕,发布测试程序

    转载请说明原出处,谢谢~~ 从暑假到现在中秋刚过,我用duilib开发仿酷狗播放器大概经历了50天.做仿酷狗的意图只是看原酷狗的界面比较漂亮,想做个完整一些的工程来练习一下duilib.今天把写好的程 ...

  8. Myeclipse8.5 svn插件安装两种方式

    第一种方式:(亲测成功)第一步:准备插件包:site-1.6.18.zip解压该包里面有features和plugins文件夹,删除该包里面的xml结尾的文件. 第二:我的Myeclipse8.5安装 ...

  9. 一个谷粉和3年的Google Reader重度使用者的碎碎念

    2013-03-14 上午看到Andy Rubin辞去Android业务主管职务.由Chrome及应用高级副总裁继任的新闻,还在想这会给Android带来什么,中午刷微博的时候就挨了当头一棒:Goog ...

  10. Namespaces(命名空间)

    datastore,Blobstore,memcache一起为应用存储数据.这对于在全球范围内分割数据是有用的.比如,一个应用可以为多个公司服务,每个公司可以看到它自己的隔离的应用实例,没有公司可以看 ...