none
Service 'Windows Installer (msiserver)' cannot be started inside of a container RRS feed

  • Question

  • For a cross reference this issue was originally posted to the Technet WS2016 forum (https://social.technet.microsoft.com/Forums/en-US/bfaf5b21-a736-4eb7-aa97-ab5bc72d2226/service-windows-installer-msiserver-cannot-be-started-inside-of-a-container?forum=ws2016).

    I'm looking for some tips or ideas how to troubleshoot failing installation of MSI packages inside of a container. I made a Dockerfile to troubleshoot the issue:

    # escape=`
    # vc_redist_2013_x86 dependency: http://download.microsoft.com/download/2/E/6/2E61CFA4-993B-4DD4-91DA-3737CD5CD6E3/vcredist_x86.exe
    FROM microsoft/dotnet-framework:4.7.2-runtime-windowsservercore-ltsc2016
    SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
    
    LABEL com.contoso.name="vcredist:tshoot" `
        com.contoso.description=".NET Framework base image with x86 VC++ 2013 Redistributable package" `
        com.contoso.docker.cmd.build="docker build -t vcredist:tshoot -f tshoot.Dockerfile ."
    
    COPY vcredist_x86.exe \install\
    # download and install vc_redist package
    RUN Start-Process \install\vcredist_x86.exe -ArgumentList '/install /quiet' -Wait -NoNewWindow; `
        Remove-Item -Recurse -Force \install
    # [DEBUG] query to check for vcredist files
    RUN echo 'check for vcredist bits:'; `
        gci -Path C:\Windows\system32\* -Include msvcp120*; `
        gci -Path C:\Windows\syswow64\* -Include msvcp120*; `
        reg query hklm /s /f msvcp120; `
        echo 'list installed programs from registry records:'; `
        Get-ItemProperty HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\* | select DisplayName, DisplayVersion, Publisher, InstallDate | Format-Table
    

    While working with Docker containers on Windows Server 2016 (WS2016) that is a part of corporate domain I ran into an issue that does not allow me to install any MSI packages inside of the container. In particular I'm trying to install vcredist_x86.exe package. I narrowed it down to MSIServer service that cannot run inside of the container for some reason. I use process mode to run containers on WS2016.

    If I run the same container on Win10 in hyperv mode, I have no problem starting MSIServer service and installing MSI packages.

    If I run the same container on WS2016 in Azure (not a part of corporate domain), I have no problem running MSIServer service inside of the container and can install vcredist package.

    Here's the error I get on when I try to start MSIServer service inside of the container on corporate WS2016 machine:

    PS C:\app> Start-Service msiserver
    Start-Service : Service 'Windows Installer (msiserver)' cannot be started due to the following error: Cannot start
    service msiserver on computer '.'.
    At line:1 char:1
    + Start-Service msiserver
    + ~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : OpenError: (System.ServiceProcess.ServiceController:ServiceController) [Start-Service],
       ServiceCommandException
        + FullyQualifiedErrorId : CouldNotStartService,Microsoft.PowerShell.Commands.StartServiceCommand

    On the host were package installation into the container fails I get the following log entries from vcredist installation logs:

    [3688:343C][2018-12-12T20:19:04]i300: Apply begin
    [2508:0078][2018-12-12T20:19:04]w308: Automatic updates could not be paused due to error: 0x80040154. Continuing...
    [2508:0078][2018-12-12T20:19:04]i360: Creating a system restore point.
    [2508:0078][2018-12-12T20:19:04]i362: System restore disabled, system restore point not created.
    [2508:0078][2018-12-12T20:19:04]i370: Session begin, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{f65db027-aff3-4070-886a-0d87064aabb1}, options: 0x7, disable resume: No
    [2508:0078][2018-12-12T20:19:04]i000: Caching bundle from: 'C:\Users\ContainerAdministrator\AppData\Local\Temp\{f65db027-aff3-4070-886a-0d87064aabb1}\.be\vcredist_x86.exe' to: 'C:\ProgramData\Package Cache\{f65db027-aff3-4070-886a-0d87064aabb1}\vcredist_x86.exe'
    [2508:0078][2018-12-12T20:19:04]i320: Registering bundle dependency provider: {f65db027-aff3-4070-886a-0d87064aabb1}, version: 12.0.30501.0
    [2508:0078][2018-12-12T20:19:04]i371: Updating session, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{f65db027-aff3-4070-886a-0d87064aabb1}, resume: Active, restart initiated: No, disable resume: No
    [2508:1D74][2018-12-12T20:19:19]i304: Verified existing payload: vcRuntimeMinimum_x86 at path: C:\ProgramData\Package Cache\{13A4EE12-23EA-3371-91EE-EFB36DDFFF3E}v12.0.21005\packages\vcRuntimeMinimum_x86\vc_runtimeMinimum_x86.msi.
    [2508:1D74][2018-12-12T20:19:19]i304: Verified existing payload: cab54A5CABBE7274D8A22EB58060AAB7623 at path: C:\ProgramData\Package Cache\{13A4EE12-23EA-3371-91EE-EFB36DDFFF3E}v12.0.21005\packages\vcRuntimeMinimum_x86\cab1.cab.
    [2508:1D74][2018-12-12T20:19:19]i304: Verified existing payload: vcRuntimeAdditional_x86 at path: C:\ProgramData\Package Cache\{F8CFEB22-A2E7-3971-9EDA-4B11EDEFC185}v12.0.21005\packages\vcRuntimeAdditional_x86\vc_runtimeAdditional_x86.msi.
    [2508:1D74][2018-12-12T20:19:19]i304: Verified existing payload: cabB3E1576D1FEFBB979E13B1A5379E0B16 at path: C:\ProgramData\Package Cache\{F8CFEB22-A2E7-3971-9EDA-4B11EDEFC185}v12.0.21005\packages\vcRuntimeAdditional_x86\cab1.cab.
    [2508:0078][2018-12-12T20:19:19]i301: Applying execute package: vcRuntimeMinimum_x86, action: Install, path: C:\ProgramData\Package Cache\{13A4EE12-23EA-3371-91EE-EFB36DDFFF3E}v12.0.21005\packages\vcRuntimeMinimum_x86\vc_runtimeMinimum_x86.msi, arguments: ' MSIFASTINSTALL="7" NOVSUI="1"'
    [2508:0078][2018-12-12T20:19:19]e000: Error 0x80070641: Failed to install MSI package.
    [2508:0078][2018-12-12T20:19:19]e000: Error 0x80070641: Failed to execute MSI package.
    [3688:343C][2018-12-12T20:19:19]e000: Error 0x80070641: Failed to configure per-machine MSI package.
    [3688:343C][2018-12-12T20:19:19]w348: Application requested retry of package: vcRuntimeMinimum_x86, encountered error: 0x80070641. Retrying...
    [2508:0078][2018-12-12T20:19:22]i301: Applying execute package: vcRuntimeMinimum_x86, action: Install, path: C:\ProgramData\Package Cache\{13A4EE12-23EA-3371-91EE-EFB36DDFFF3E}v12.0.21005\packages\vcRuntimeMinimum_x86\vc_runtimeMinimum_x86.msi, arguments: ' MSIFASTINSTALL="7" NOVSUI="1"'
    [2508:0078][2018-12-12T20:19:22]e000: Error 0x80070641: Failed to install MSI package.
    [2508:0078][2018-12-12T20:19:22]e000: Error 0x80070641: Failed to execute MSI package.
    [3688:343C][2018-12-12T20:19:22]e000: Error 0x80070641: Failed to configure per-machine MSI package.
    [3688:343C][2018-12-12T20:19:22]w348: Application requested retry of package: vcRuntimeMinimum_x86, encountered error: 0x80070641. Retrying...
    [2508:0078][2018-12-12T20:19:25]i301: Applying execute package: vcRuntimeMinimum_x86, action: Install, path: C:\ProgramData\Package Cache\{13A4EE12-23EA-3371-91EE-EFB36DDFFF3E}v12.0.21005\packages\vcRuntimeMinimum_x86\vc_runtimeMinimum_x86.msi, arguments: ' MSIFASTINSTALL="7" NOVSUI="1"'
    [2508:0078][2018-12-12T20:19:25]e000: Error 0x80070641: Failed to install MSI package.
    [2508:0078][2018-12-12T20:19:25]e000: Error 0x80070641: Failed to execute MSI package.
    [3688:343C][2018-12-12T20:19:25]e000: Error 0x80070641: Failed to configure per-machine MSI package.
    [3688:343C][2018-12-12T20:19:25]w348: Application requested retry of package: vcRuntimeMinimum_x86, encountered error: 0x80070641. Retrying...
    [2508:0078][2018-12-12T20:19:28]i301: Applying execute package: vcRuntimeMinimum_x86, action: Install, path: C:\ProgramData\Package Cache\{13A4EE12-23EA-3371-91EE-EFB36DDFFF3E}v12.0.21005\packages\vcRuntimeMinimum_x86\vc_runtimeMinimum_x86.msi, arguments: ' MSIFASTINSTALL="7" NOVSUI="1"'
    [2508:0078][2018-12-12T20:19:28]e000: Error 0x80070641: Failed to install MSI package.
    [2508:0078][2018-12-12T20:19:28]e000: Error 0x80070641: Failed to execute MSI package.
    [3688:343C][2018-12-12T20:19:28]e000: Error 0x80070641: Failed to configure per-machine MSI package.
    [3688:343C][2018-12-12T20:19:28]i319: Applied execute package: vcRuntimeMinimum_x86, result: 0x80070641, restart: None
    [3688:343C][2018-12-12T20:19:28]e000: Error 0x80070641: Failed to execute MSI package.
    [2508:0078][2018-12-12T20:19:28]i372: Session end, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{f65db027-aff3-4070-886a-0d87064aabb1}, resume: None, restart: None, disable resume: No
    [2508:0078][2018-12-12T20:19:28]i330: Removed bundle dependency provider: {f65db027-aff3-4070-886a-0d87064aabb1}
    [2508:0078][2018-12-12T20:19:28]i352: Removing cached bundle: {f65db027-aff3-4070-886a-0d87064aabb1}, from path: C:\ProgramData\Package Cache\{f65db027-aff3-4070-886a-0d87064aabb1}\
    [2508:0078][2018-12-12T20:19:28]i371: Updating session, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{f65db027-aff3-4070-886a-0d87064aabb1}, resume: None, restart initiated: No, disable resume: No
    [3688:343C][2018-12-12T20:19:28]i399: Apply complete, result: 0x80070641, restart: None, ba requested restart:  No
    [3688:343C][2018-12-12T20:19:28]i500: Shutting down, exit code: 0x641

    On the host where installation completes successfully I see the following entries in vcredist installation logs:

    [0B90:0B94][2018-12-13T20:21:26]i300: Apply begin
    [0B7C:0B80][2018-12-13T20:21:26]w308: Automatic updates could not be paused due to error: 0x80040154. Continuing...
    [0B7C:0B80][2018-12-13T20:21:26]i360: Creating a system restore point.
    [0B7C:0B80][2018-12-13T20:21:26]i362: System restore disabled, system restore point not created.
    [0B7C:0B80][2018-12-13T20:21:26]i370: Session begin, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{f65db027-aff3-4070-886a-0d87064aabb1}, options: 0x7, disable resume: No
    [0B7C:0B80][2018-12-13T20:21:26]i000: Caching bundle from: 'C:\Users\ContainerAdministrator\AppData\Local\Temp\{f65db027-aff3-4070-886a-0d87064aabb1}\.be\vcredist_x86.exe' to: 'C:\ProgramData\Package Cache\{f65db027-aff3-4070-886a-0d87064aabb1}\vcredist_x86.exe'
    [0B7C:0B80][2018-12-13T20:21:26]i320: Registering bundle dependency provider: {f65db027-aff3-4070-886a-0d87064aabb1}, version: 12.0.30501.0
    [0B7C:0B80][2018-12-13T20:21:26]i371: Updating session, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{f65db027-aff3-4070-886a-0d87064aabb1}, resume: Active, restart initiated: No, disable resume: No
    [0B7C:0BAC][2018-12-13T20:21:26]i305: Verified acquired payload: vcRuntimeMinimum_x86 at path: C:\ProgramData\Package Cache\.unverified\vcRuntimeMinimum_x86, moving to: C:\ProgramData\Package Cache\{13A4EE12-23EA-3371-91EE-EFB36DDFFF3E}v12.0.21005\packages\vcRuntimeMinimum_x86\vc_runtimeMinimum_x86.msi.
    [0B7C:0BAC][2018-12-13T20:21:26]i305: Verified acquired payload: cab54A5CABBE7274D8A22EB58060AAB7623 at path: C:\ProgramData\Package Cache\.unverified\cab54A5CABBE7274D8A22EB58060AAB7623, moving to: C:\ProgramData\Package Cache\{13A4EE12-23EA-3371-91EE-EFB36DDFFF3E}v12.0.21005\packages\vcRuntimeMinimum_x86\cab1.cab.
    [0B7C:0BAC][2018-12-13T20:21:26]i305: Verified acquired payload: vcRuntimeAdditional_x86 at path: C:\ProgramData\Package Cache\.unverified\vcRuntimeAdditional_x86, moving to: C:\ProgramData\Package Cache\{F8CFEB22-A2E7-3971-9EDA-4B11EDEFC185}v12.0.21005\packages\vcRuntimeAdditional_x86\vc_runtimeAdditional_x86.msi.
    [0B7C:0BAC][2018-12-13T20:21:26]i305: Verified acquired payload: cabB3E1576D1FEFBB979E13B1A5379E0B16 at path: C:\ProgramData\Package Cache\.unverified\cabB3E1576D1FEFBB979E13B1A5379E0B16, moving to: C:\ProgramData\Package Cache\{F8CFEB22-A2E7-3971-9EDA-4B11EDEFC185}v12.0.21005\packages\vcRuntimeAdditional_x86\cab1.cab.
    [0B7C:0B80][2018-12-13T20:21:26]i301: Applying execute package: vcRuntimeMinimum_x86, action: Install, path: C:\ProgramData\Package Cache\{13A4EE12-23EA-3371-91EE-EFB36DDFFF3E}v12.0.21005\packages\vcRuntimeMinimum_x86\vc_runtimeMinimum_x86.msi, arguments: ' MSIFASTINSTALL="7" NOVSUI="1"'
    [0B90:0B94][2018-12-13T20:21:28]i319: Applied execute package: vcRuntimeMinimum_x86, result: 0x0, restart: None
    [0B7C:0B80][2018-12-13T20:21:28]i325: Registering dependency: {f65db027-aff3-4070-886a-0d87064aabb1} on package provider: Microsoft.VS.VC_RuntimeMinimumVSU_x86,v12, package: vcRuntimeMinimum_x86
    [0B7C:0B80][2018-12-13T20:21:28]i301: Applying execute package: vcRuntimeAdditional_x86, action: Install, path: C:\ProgramData\Package Cache\{F8CFEB22-A2E7-3971-9EDA-4B11EDEFC185}v12.0.21005\packages\vcRuntimeAdditional_x86\vc_runtimeAdditional_x86.msi, arguments: ' MSIFASTINSTALL="7" NOVSUI="1"'
    [0B90:0B94][2018-12-13T20:21:28]i319: Applied execute package: vcRuntimeAdditional_x86, result: 0x0, restart: None
    [0B7C:0B80][2018-12-13T20:21:28]i325: Registering dependency: {f65db027-aff3-4070-886a-0d87064aabb1} on package provider: Microsoft.VS.VC_RuntimeAdditionalVSU_x86,v12, package: vcRuntimeAdditional_x86
    [0B7C:0B80][2018-12-13T20:21:28]i372: Session end, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{f65db027-aff3-4070-886a-0d87064aabb1}, resume: ARP, restart: None, disable resume: No
    [0B7C:0B80][2018-12-13T20:21:28]i371: Updating session, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{f65db027-aff3-4070-886a-0d87064aabb1}, resume: ARP, restart initiated: No, disable resume: No
    [0B90:0B94][2018-12-13T20:21:28]i399: Apply complete, result: 0x0, restart: None, ba requested restart:  No
    [0B90:0B94][2018-12-13T20:21:28]i500: Shutting down, exit code: 0x0

    What's the best way to troubleshoot why MSI packages fail to get installed on one host but not the other?


    • Edited by ivansha Monday, January 7, 2019 6:59 PM code improvement
    Monday, January 7, 2019 6:08 AM

Answers

  • To resolve this issue add `msiexec.exe` into SEP exception list. In addition one can add it as application process in SEP.
    • Marked as answer by ivansha Thursday, January 17, 2019 7:34 PM
    Friday, January 11, 2019 11:57 PM

All replies

  • Greetings,

    Would you mind to run winver to check the OS version among different environments?

    We should follow official documentation to make sure our Windows Server systems are patched with latest updates.

    https://docs.microsoft.com/en-us/virtualization/windowscontainers/quick-start/quick-start-windows-server


    Sic Parvis Magna


    Monday, January 7, 2019 11:41 AM
  • Since it's environment isolated and happens only in process isolation I imagine it's result of AV (anti virus) interfering with your setup. What AV do you use? Try to disable it and see if it works.
    Monday, January 7, 2019 12:55 PM
  • Corporate WS2016: Version 1607 (OS Build 14393.2670).
    Azure WS2016: Version 1607 (OS Build 14393.2273).
    Win10: Version 1803 (OS Build 17134.472)

    • Edited by ivansha Wednesday, January 9, 2019 4:31 AM comment correction
    Wednesday, January 9, 2019 4:31 AM
  • Tried disabling Symantec Endpoint Protection without success on issue resolution. Will try to uninstall SEP completely and give it another try as AV's are tricky to disable.

    Wednesday, January 9, 2019 4:32 AM
  • Looks like SEP is the root cause of this issue. Uninstalling SEP from the VM allowed me to install vcredist package successfully.
    Thanks for the help @artisticcheese and Huang!

    Thursday, January 10, 2019 2:58 PM
  • To resolve this issue add `msiexec.exe` into SEP exception list. In addition one can add it as application process in SEP.
    • Marked as answer by ivansha Thursday, January 17, 2019 7:34 PM
    Friday, January 11, 2019 11:57 PM