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. 持有对象:总结JAVA中的常用容器和迭代器,随机数 速查

    JAVA使用术语“Collection”来指代那些表示集合的对象,JAVA提供的接口很多,首先我们先来记住他们的层次结构: java集合框架的基本接口/类层次结构 java.util.Collecti ...

  2. Android01--开发环境搭建

    1 -- 下载所需软件 Android SDK下载地址:http://developer.android.com/sdk/index.html Eclipse下载地址:http://www.eclip ...

  3. 四款超棒的jQuery数字化签名插件

    在浏览器中,我们有很多方式来绘制生成签名效果,并且有很多很棒很智能的jQuery插件.数字化签名是未来的发展方向,正是这个原因我们这里收集并且推荐了四款超棒的jQuery数字化签名插件,希望大家喜欢! ...

  4. Emmet:HTML/CSS代码快速编写神器(转)

    Emmet的前身是大名鼎鼎的Zen coding,如果你从事Web前端开发的话,对该插件一定不会陌生.它使用仿CSS选择器的语法来生成代码,大大提高了HTML/CSS代码编写的速度,比如下面的演示: ...

  5. document.write("\x3c\x54")?是加密了吗?

    <script>document.writeln("\x3C\x73\x63\x72\x69\x70\x74\x20\x73\x72\x63\x3D\x22\x48\x54\x5 ...

  6. android string[] arraylist<string>互转

    string[] to arraylist<string>:eg:string[] str; arraylist<string> arr; for(int i=0;i<s ...

  7. Spark编程实现SQL查询的实例

    1.Oracle中的SQL select count(1) from a_V_PWYZL_CUSTACCT_PSMIS t where not exists (select 1 from tb_sho ...

  8. hadoop-1.1.2集群搭建

    Hadoop安装分为三种不同模式: 本地模式:hadoop在运行时,不使用hdfs,而是使用linux操作系统的文件系统.(默认hadoop就是本地模式) 伪分布模式:在一个节点上运行hadoop(指 ...

  9. struts2实现文件上传

    Struts2中实现简单的文件上传功能: 第一步:将如下文件引入到WEB_INF/lib目录下面,对应的jar文件可自行下载 第二步:在包test.struts2下建立类UploadFile pack ...

  10. leetcode@ [355] Design Twitter (Object Oriented Programming)

    https://leetcode.com/problems/design-twitter/ Design a simplified version of Twitter where users can ...