Somaning's Virtual Blog

Virtual Machine Manager and APPV - Solutions and Guidance
Somaning Virtual Blog

Somaning's Virtual Blog

  • Deploying Web server (IIS) Virtual Machine Role through Gallery from WAP Tenant Portal

    When I tried to deploy the Web server (IIS) VM role from WAP. I ran into multiple issues. I thought to share so that it can help others.
    I imported the IIS gallery item using GRIT 1.2 tool and tried to deploy from the WAP Tenant Portal and got below errors

    This I got when I used the manually syspreped VHDX:

    Error (13206)
    Virtual Machine Manager cannot locate the boot or system volume on virtual machine Computer002. The resulting virtual machine might not start or operate properly.

    This I got when I used the Convert-WindowsImage.ps1 without including the NetFx3 feature in VHD:

    Error (31304)
    VM Role resource (iis01) was not successfully deployed in the Cloud Service.

    Error (22011)
    VMM failed to enable the specified server features Web-WMI;Web-Request-Monitor;Web-Scripting-Tools;Web-Custom-Logging;Web-Digest-Auth;Web-Windows-Auth;Web-Url-Auth;Web-WHC;Web-Static-Content;Web-Ftp-Server;Web-Mgmt-Console;Web-Default-Doc;Web-ISAPI-Filter;Web-Server;Web-Filtering;Web-App-Dev;Web-Net-Ext45;Web-Log-Libraries;Web-CertProvider;Web-Dyn-Compression;Web-Includes;Web-Basic-Auth;Web-WebServer;Web-Lgcy-Scripting;Web-Http-Logging;Web-IP-Security;Web-Http-Errors;Web-Stat-Compression;Web-CGI;Web-ISAPI-Ext;Web-ASP;Web-AppInit;Web-Ftp-Service;Web-Security;Web-Lgcy-Mgmt-Console;Web-Dir-Browsing;Web-Mgmt-Tools;Web-Http-Redirect;Web-Ftp-Ext;Web-Mgmt-Service;Web-WebSockets;Web-Cert-Auth;Web-Metabase;Web-Performance;Web-Client-Auth;Web-Http-Tracing;Web-Health;Web-Asp-Net45;Web-Net-Ext;Web-Asp-Net;Web-DAV-Publishing;Web-Common-Http;Web-ODBC-Logging;Web-Mgmt-Compat; on the guest virtual machine COMPUTER001. For more information, log on to the virtual machine and view the event log: .

    Recommended Action
    Log on to the virtual machine and view the event logs.

    Error (20400)
    1 parallel subtasks failed during execution.

    Error (21952)
    Application deployment failed for one or more tiers or application hosts in the service iis01. Check job logs to get more information on the failed operation.

    Error (22042)
    The service iis01 was not successfully deployed. Review the event log to determine the cause and corrective actions.

    Event Log from the Guest VM which failed to complete IIS installation:

    Log Name:      Setup
    Source:        Microsoft-Windows-Servicing
    Date:          9/19/2014 10:35:25 AM
    Event ID:      11
    Task Category: (1)
    Level:         Information
    Keywords:     
    User:          SYSTEM
    Computer:      Computer003
    Description:
    Update NetFx3 of package Microsoft .NET Framework 3.0 failed to be turned on. Status: 0x800f0906.

    Follow the below Steps to successfully deploy the Web server (IIS) Virtual Machine Role:

    • Using windows 2012 R2 ISO create the VHDX like below

    • Download the “Convert-WindowsImage.ps1” from below link

    • http://gallery.technet.microsoft.com/scriptcenter/Convert-WindowsImageps1-0fe23a8f

    • Open elevated PowerShell, change the parameters according to your environment

    • Then run the command as below

    • Convert-WindowsImage.ps1 -SourcePath D:\Tool\Windows_Server_2012_R2-Datacenter_Edition–EN-US-X64.ISO -VHDFormat VHDX -VHDType Dynamic -VHDPath "D:\Tool\WAP gallery VHD creation tool\Windows2012R2.vhdx" -SizeBytes 40GB -Edition ServerDataCenter “-Feature NetFx3” 

    • Copy the VHDX to SCVMM library share and refresh the library

    Also Verify the Read-only library share Path is added to cloud properties if it’s not added then in tenant portal the VHDX will not list and Capability properties is are also unchecked
    Cloud Properties:


     Now Login to SPF server and Follow below Steps to Import the Gallery Item

    • Open the elevated PowerShell on SPF server

    • Ran the .\GalleryResourceImportTool.ps1 PowerShell 

    • Selected the IIS Gallery Resource and clicked continue

    • In next Wizard click on Virtual Disks Configuration

    • Select the Windows 2012 R2 Standard

    • It will list all the VHD from your Library

    • Select the Syspreped Windows 2012 R2 VHDX as OS disk, Uncheck the “Apply Resulting Tags for Family Name” then click on Apply these OS disk settings to selected disks and wait until it completes

    • We need at least one Data drive for VM Role, So  select on Bland VHDX and click on Apply these Data disk settings

    • Now the required Tags are set on OS and Data Disk

    • Click on Gallery Resource Import option

    • Select the library server share and click on Import Gallery Resource Extension

    • Once import is successful

    • Go to WAP Admin Portal ->Go to Plans-> Add the Web Server(IIS) gallery item from Gallery item section

    • Login to Tenant Portal and Deploy the Web server (IIS) Virtual Machine Role. It will deploy successfully now

       

     

     

  • Subscriptions in Windows Azure Pack (WAP) shows “Out of Sync"

     Subscriptions in Windows Azure Pack (WAP) shows “Out of Sync"

     

    Environment:

    WAP and SPF installed on same server
    SCVMM: system center virtual machine manager 2012 R2 UR1

    Issue:

    Unable to Work with WAP getting error “Out of Sync" as show below

    Troubleshooting:

    Log Name:     
    Source:        Microsoft-ServiceProviderFoundation
    Date:          2/21/2014 2:43:26 PM
    Event ID:      10
    Task Category: (65524)
    Level:         Error
    Keywords:      None
    User:          N/A
    Computer:      wap.local
    Description:
    Component: Provider 

    Failed to create subscription. Reason: Message : An error occurred while processing this request., InnerMessage: <?xml version="1.0" encoding="utf-8"?><m:error xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><m:code /><m:message xml:lang="en-US">An error occurred while processing this request.</m:message><m:innererror><m:message>Invoking method Update of type Microsoft.SystemCenter.Foundation.Psws.Spf.SpfOperationManager failed. Cause of the problem: UserRole update failed on some VMM servers: wilvmmv1;</m:message><m:type>Microsoft.Management.Odata.CustomModuleInvocationFailedException</m:type><m:stacktrace>   at Microsoft.Management.Odata.Core.OperationManagerAdapter.InvokeMethod(IInvoker invoker, String functionName, String resourceTypeName, Boolean ignoreNotImplementedException)&#xD;
       at Microsoft.Management.Odata.Core.OperationManagerAdapter.CUDRequest(CommandType commandType, ResourceType resourceType, Dictionary`2 properties, Dictionary`2 urlParams)&#xD;
       at Microsoft.Management.Odata.Core.EntityUpdate.InvokeCommand()&#xD;
       at Microsoft.Management.Odata.Core.DataServiceUpdateProvider.SaveChanges()&#xD;
       at System.Data.Services.DataService`1.HandleNonBatchRequest(RequestDescription description)&#xD;
       at System.Data.Services.DataService`1.HandleRequest()</m:stacktrace><m:internalexception><m:message>UserRole update failed on some VMM servers:  
       at System.Management.Automation.Interpreter.ThrowInstruction.Run(InterpretedFrame frame)&#xD;
       at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)</m:stacktrace></m:internalexception></m:innererror></m:error>

    • When we tried to check the tenant is created in VMM server we found that the tenant is created
    • When we checked the jobs in SCVMM we found the below job with error

    Error (20413)
    VMM encountered a critical exception and created an exception report at C:\ProgramData\VMMLogs\SCVMM.b7cc18df-1adf-435e-9e7a-0e808e02de19\report.txt.
     
    Recommended Action
    See the report for more details and search user forums for well-known failure root causes for self-help.

    • When we looked in to above report file found below information

    “EventType=VMM20
    P1(appName)=vmmservice.exe
    P2(appVersion)=3.2.7620.0
    P3(assemblyName)=Utils.dll
    P4(assemblyVer)=3.2.7620.0
    P5(methodName)=Microsoft.VirtualManager.DB.SqlRetryCommand.ExecuteNonQuery
    P6(exceptionType)=Microsoft.VirtualManager.DB.CarmineSqlException
    P7(callstackHash)=4c11

    SCVMM Version=3.2.7620.0
    SCVMM flavor=C-buddy-RTL-AMD64
    Default Assembly Version=3.2.7620.0
    Executable Name=vmmservice.exe
    Executable Version=3.2.7510.0
    Base Exception Target Site=140706051082968
    Base Exception Assembly name=System.Data.dll
    Base Exception Method Name=System.Data.SqlClient.SqlConnection.OnError
    Exception Message=Unable to connect to the VMM database because of a general database failure.
    Ensure that the SQL Server is running and configured correctly, then try the operation again.
    EIP=0x00007ff8c0beab78
    Build bit-size=64

    ----------------------------------------------------
    ------------ exceptionObject.ToString() ------------
    ----------------------------------------------------
    Microsoft.VirtualManager.DB.CarmineSqlException: Unable to connect to the VMM database because of a general database failure.
    Ensure that the SQL Server is running and configured correctly, then try the operation again. ---> System.Data.SqlClient.SqlException: Procedure or function prc_RBS_UserRoleSharedObjectRelation_Insert has too many arguments specified.”

     Solution:

     Based on the above findings it looks like we have not applied the SQL script in which comes with SCVMM 2012 UR1 http://support.microsoft.com/kb/2904712

    After applying the script we are able to add the subscriptions successfully and it synced without any errors.

     

  • How to sequence the Microsoft System Center 2012 Configuration Manager Admin Console with Microsoft App-V

    http://blogs.technet.com/b/appv/archive/2013/01/08/how-to-sequence-the-microsoft-system-center-2012-configuration-manager-admin-console-with-microsoft-app-v.aspx?CommentPosted=true#commentmessage

  • Whenever Self-Service user role is selected in SCVMM 2008 R2 SP1 Console crashes with error CLR20r3

    SYMPTOMS

    Whenever try to select or right click on the Self-Service user roles in SCVMM console. The console crashes with below error

    Description:
      Stopped working

    Problem signature:
      Problem Event Name  :        CLR20r3
      Problem Signature 01:        vmmadmin.exe
      Problem Signature 02:        1.0.523.0
      Problem Signature 03:        4d432cdf
      Problem Signature 04:        System.Windows.Forms
      Problem Signature 05:        2.0.0.0
      Problem Signature 06:        4f682206
      Problem Signature 07:        14d0
      Problem Signature 08:        23
      Problem Signature 09:        System.ObjectDisposedException
      OS Version:        6.1.7601.2.1.0.274.10
      Locale ID:        1033

    CAUSE

    The assigned resources (Templates) has been deleted or moved to different location

    When Self-Service user role is selected it will try finding the assigned resources. Since assigned resource doesn’t exist it will through the above exception

    RESOLUTION

     1.  Click on start -> All Programs-> Virtual Machine Manager-> right click on “Virtual Machine Manager Command Shell”  Run as Administrator

          The below commands will help you to delete the problematic SSP user role from SCVMM

     2.  Get-VMMUserRole –Name “Name of the SSP user role which you want to delete”

     3.  $UR= Get-VMMUserRole –Name “Name of the SSP user role which you want to delete” 

     4.  Remove-VMMUserRole –UserRole $UR

     

    MORE INFORMATION

    http://technet.microsoft.com/en-us/library/hh801697.aspx

     

  • Virtual Machine Deployment through Template fail with error 1700 in SCVMM 2008 R2 SP1

    SYMPTOMS:

    New virtual machine deployment through the template will fail with the Error 1700 at 1.6 Virtual machine customize phase. Same time SCVMM Admin Console crashes with error 1612 and Event ID 19999 and 1 are logged to the VM Manager Event log. 

    Error (1700)
    The Virtual Machine Manager Service on the SCVMM server stopped while this job was running. This may have been caused by a system restart.
    Recommended Action
    To restart this job, navigate to the Jobs view and select the job in the results pane. Then, in the Actions pane, click Restart.

    Event ID’s in VM Manager Event logs:

    Log Name:          VM Manager
    Source:               Virtual Machine Manager
    Date:                   8/17/2012 2:09:40 PM
    Event ID:            19999
    Task Category:  None
    Level:                  Error
    Keywords:         Classic
    User:                  N/A
    Computer:        SCVMM server
    Description:
    Virtual Machine Manager (vmmservice: 1680) has encountered an error and needed to exit the process. Windows generated an error report with the following parameters:
    Event:VMM20
    P1(appName):vmmservice
    P2(appVersion):2.0.4521.0
    P3(assemblyName):SysPrepInfUtil
    P4(assemblyVer):2.0.4521.0
    P5(methodName):M.V.W.UnattendXMLFile..ctor
    P6(exceptionType):S.IO.FileLoadException
    P7(callstackHash):7ac4

    Source:                 Virtual Machine Manager
    Date:                     8/17/2012 2:09:40 PM
    Event ID:              1
    Task Category:    None
    Level:                   Error
    Keywords:           Classic
    User:                    N/A
    Computer:          SCVMM server
    Description:
    System.IO.FileLoadException: Could not load file or assembly 'Microsoft.ComponentStudio.ComponentPlatformInterface, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
    File name: 'Microsoft.ComponentStudio.ComponentPlatformInterface, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
    at Microsoft.VirtualManager.WorkloadCreation.UnattendXMLFile..ctor(String path, Version osVersion,   Architecture arch, ProductType ptype)
    at Microsoft.VirtualManager.WorkloadCreation.UnattendXMLFile.CreateUnattendXMLFile(String path, Version osVersion, Architecture arch, ProductType ptype)
    at Microsoft.VirtualManager.Engine.VmOperations.CustomizeVMSubtask.createAnswerFile(OSConfig osfg, String answerfilepath)
       at Microsoft.VirtualManager.Engine.VmOperations.CustomizeVMSubtask.generateAnswerFile()
       at Microsoft.VirtualManager.Engine.VmOperations.CustomizeVMSubtask.RunSubtask()
       at Microsoft.VirtualManager.Engine.TaskRepository.SubtaskBase.Run()
       at Microsoft.VirtualManager.Engine.VmOperations.NewVmFromTemplateSubtask.PostVmCreationCustomize()
       at Microsoft.VirtualManager.Engine.VmOperations.NewVmSubtaskBase.RunNewVmSubtasks()
       at Microsoft.VirtualManager.Engine.VmOperations.NewVmSubtaskBase.RunSubtask()
       at Microsoft.VirtualManager.Engine.TaskRepository.SubtaskBase.Run()
       at Microsoft.VirtualManager.Engine.TaskRepository.Task`1.SubtaskRun(Object state)
    WRN: Assembly binding logging is turned OFF.
    To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
    Note: There is some performance penalty associated with assembly bind failure logging.
    To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
    -2146234304

    CAUSE:

    This issue occurs if the Virtual Machine Manager Server assembly doesn’t match and also If WAIK installed manually

    Current version: Microsoft.ComponentStudio.ComponentPlatformInterface, Version=6.1.0.0

    Expected Version: Microsoft.ComponentStudio.ComponentPlatformInterface, Version=6.0.0.0

    RESOLUTION:

    1. Take Full Data base back up of Virtual Machine Manager DB
    2. Uninstalled the SCVMM with retain database option
    3. Uninstall  WAIK from Add Remove Programs, If exists 
    4. Go to C:\Windows\assembly on SCVMM server
    5. Find the Microsoft.ComponentStudio.xxxx components right click and uninstall them
    6. Install the SCVMM 2008 R2 SP1 with existing database, it will install the Correct WAIK 
    7. Install the Virtual Machine manager patches
    8. Reboot the Virtual machine manager server
    9. Now try to deploy the VM through templates, it will complete successfully

     

  • Host: Needs Attention and Refresh Fails with Error 2910 access denied in SCVMM

    Symptoms

    Example 1:

    Host Shows Needs Attention status in SCVMM console and trying to refresh the host errors out with:

    Error(2910)
    VMM does not have appropriate permissions to access the resource on the Host1.local
    server.
    (Access is denied (0x80070005))

    Recommended Action
    Ensure That Virtual Machine Manager has the appropriate rights to perform this action

    Example 2:

             When we try to add new host in SCVMM will get below error

     

            A lot of evidence pointed to WMI issues on the host.

    Net Mon Trace Details:

    Net Mon trace also showed (packet going from host to VMM server): HTTP:Response, HTTP/1.1, Status: Unauthorized,URL: /wsman using Multiple Authentication Methods, see frame
    details. However, the Net Mon trace also showed an odd communication that was happening between the host and the VMMserver. The packet sequence No’s are changing sent and received. There is
    something intercepting the communication between the host and VMM server that caused this issue.

    Http: Response, HTTP/1.1, Status: Unauthorized, URL: /wsman Using Multiple Authetication Methods, see frame details
    ProtocolVersion: HTTP/1.1
    StatusCode: 401, Unauthorized
    Reason: Unauthorized

     Cause

    There were Riverbed devices at each location that were optimizing traffic between VMM server and host.

     Resolution

    Riverbed Devices needs to be modified to pass-through (exclude) all communications between the SCVMM server and hosts. 

    More Information

    SCVMM and SCVMM R2 P2V fails with Error 2910 (0x80070005) Access Denied
    http://support.microsoft.com/kb/969965

    P2V fails with Error 2910 (0x80070005) Access Denied
    http://blogs.technet.com/b/mbriggs/archive/2010/11/12/p2v-fails-with-error-2910-0x80070005-access-denied.aspx


     

  • How to Sequence the System Center Configuration Manager 2007 R3 Admin Console with Microsoft App-V

     I recently went through sequencing the ConfigMgr 2007 admin console and thought I’d share what I learned with you here. When trying to Sequence (virtualize) the System Center Configuration Manager 2007 Administrator’s Console, the resulting package will generate the following error and fail to run:

    MMC cannot initialize the snap-in

    Using the steps below, you can virtualize the admin console and have it run successfully.

    NOTE In my example below it is assumed that I am Sequencing the Microsoft System Center Configuration Manager 2007 R3 Admin Console for the 64-bit version of Windows 7 Service Pack 1.

    1. Follow Best Practices for the Microsoft Application Virtualization Sequencer : http://technet.microsoft.com/en-us/library/dd351420.aspx

    2. Build the clean system with 64-bit version of Windows 7 SP1 and join it to the domain.

    3. Install the APPV 4.6 SP1 Sequencer with Hotfix 3 (http://support.microsoft.com/kb/2571168).  Launch the Microsoft Application Virtualization Sequencer and select Create New Virtual Application Package.

    4. Select Create Package (Default) option and Click Next.  Note that Prepare the Computer for Creating a Virtual Package may give the Warning “Windows Defender is active”.  If so, launch the Services.msc snap-in and stop the Windows Defender service.  After doing so, click refresh and then click Next.

    5. Select the Standard Application (default) option and click Next.

    6. On the Select Installer Screen, browse to “SPLASH.HTA” on the Configuration Manager (ConfigMgr) installation media and click Next.

    7. Name the Package SCCMConsole.001 and leave other options as the defaults and click Next.

    8. Once the ConfigMgr installation screen appears, click  Install Configuration Manager 2007 SP2 and click Next.

    9. Select Install or Upgrade an Administrator Console and click Next.

    10. Accept license agreement and Click Next.

    11. Select No, I do not want to participate right now and click Next.

    12. Leave the Destination Folder to the default (i.e. C:\Program Files(x86)\Microsoft Configuration Manager Console\) and click Next.

    13. Provide your site Server Name and Click Next, then Next again.

    14. Ensure the Pre-check passes then click on Begin Install.

    15. Once the installation finishes click Next and then click Finish.

    16. Back on the Installation screen on the Sequencer, click on the  “Run” option to install the ConfigMgr R3 prerequisite hotfix http://support.microsoft.com/kb/977384) and R3.

    17. Provide the path to the 977384 hotfix and choose Install.

    18. When complete and back at the Installation screen on the Sequencer, click on the “Run” option to install R3.

    19. Click on Run and provide the path to R3’s “SPLASH.HTA” and click Next and install R3.

    20. When complete, click on I am Finished installing

    21. Select the ConfigMgr console and run it. After launching the console close it.  Click Next to review the installation report and click Next when you’re done.

    22. Select the Customize option and click Next

    23. Now under Edit Short Cut screen, right Click and edit the ConfigMgr Console.

    24 Click on “Change Icon…” and browse to “C:\Program Files\Microsoft Configuration Manager Console\bin\i386\” and select “SETUP.EXE”

    25. Select the proper icon and provide the version No: 4.00.6487.2157

    26. Click “Save”

    27. Right click “ConfigMgr Documentation” and click “Edit”

    28. Click on “Change Icon…” and browse to “C:\Windows” and select “hh”

    29. Select the proper icon and click “Save”

    30. Right click on ConfigMgr setup and select Remove.

    31. Right click on ConfigMgr Setup Repair Wizard and select Remove.

    32. Click next and then Run ALL.

    33. Select the Target OS, click Next and then select Create the Package. The Package will be saved as SCMMConsole.001.

    34. Copy the Package to the App-V management content share.

    35. Edit the OSD file of ConfigMgr Console.OSD in Notepad.  Change the VALUE of <SUBSYSTEM VALUE= "windows"/> to <SUBSYSTEM VALUE= "console"/> and save the OSD file.

    36. Now follow the normal procedure to import the Package in to your APPV Management server and verify that the console is published to the APPV users.

    When you double click ConfigMgr Console on an App-V client you may see the error “MMC cannot initialize the snap-in.”   If so, hold the Shift Key and right-click on ConfigMgr Console and select Run as different user.  Provide whichever user credentials that have access to the ConfigMgr site server.