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. jquery加入购物车飞入的效果

    主要原理是:点击当前图片的时候,复制(克隆)当前图片在当前位置,然后利用jQuery的animate()方法实现图像的飞入效果 效果预览:http://runjs.cn/detail/qmf0mtm1 ...

  2. iOS 获取已连接的wifi信息

    转:http://blog.csdn.net/marujunyy/article/details/16843173 首先需要   #import <SystemConfiguration/Cap ...

  3. [转] C# 泛型类型参数的约束

    啊.紫原文C# 泛型类型参数的约束 在定义泛型类时,可以对客户端代码能够在实例化类时用于类型参数的类型种类施加限制.如果客户端代码尝试使用某个约束所不允许的类型来实例化类,则会产生编译时错误.这些限制 ...

  4. [Everyday Mathematics]20150113

    设 $f\in C^2(0,+\infty)$ 适合 $$\bex \lim_{x\to 0^+}f'(x)=-\infty,\quad \lim_{x\to 0^+}f''(x)=+\infty. ...

  5. javascript AES加密 C#AES解密实现

    首先需要引入js类库 crypto-js(开源),地址:http://code.google.com/p/crypto-js 现在很多人无法打开这个地址不要紧,下面我们会将全部代码贴出来 需要引入 a ...

  6. JS单例设计模式

     单例,指的是只有一个实例的对象.    在应用单例模式时,生成单例的类必须保证只有一个实例的存在,很多时候整个系统只需要拥有一个全局对象,才有利于协调系统整体的行为.比如在整个系统的配置文件中,配置 ...

  7. 使用jQuery Mobile实现通讯录

    jQuery Mobile 通讯录 拨打电话作者:方倍工作室 地址: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional/ ...

  8. 【转】MySql数据库--mysql_real_escape_string()函数

    MySql数据库--mysql_real_escape_string()函数 unsigned long mysql_real_escape_string(MYSQL *mysql, char *to ...

  9. Hadoop 删除节点步骤

    1.在hadoop1.1.1/conf 下新建文件 nn-excluded-list 并写入要删除的节点名称或者IP 一个节点 一行 如: mos5200app cmpaknwom rac7 2.分发 ...

  10. Codeforces 381 简要题解

    做的太糟糕了...第一题看成两人都取最优策略,写了个n^2的dp,还好pre-test良心(感觉TC和CF的pretest还是很靠谱的),让我反复过不去,仔细看题原来是取两边最大的啊!!!前30分钟就 ...