Closed leomoty closed 9 months ago
Thanks for bringing this up @leomoty.
cc @wtgodbe @joeloff
Looks like the linked issue (https://github.com/dotnet/aspnetcore/issues/3851) from 2018 has some investigation/theory but it got auto-closed.
We could look at comparing the install/repair logs. Anything sysprep logs might be useful too. From scanning over the docs, it sounds like sysprep removes/reset SIDs to create clean images. It certainly sounds like it is changing the state of the image and ultimately requires the hosting bundle to be repaired.
There should be logs under %WINDIR%\System32\Sysprep\Panther
. There's mention in the docs about sysprep logging warnings for issues it encounters so maybe there is something useful inside it. I'm hoping if it removed/deleted something that a log entry was created for it.
So I was going to step through the sysprep by hand and check logs as described by @joeloff, to see if I could notice something wrong. I decided to take a look if that module dll exists, and I don't seem to find it on a first install, so maybe sysprep is not the culprit.
This is a brand new VM that just runs through the Hosting bundle install:
Decided to attempt to repair, it wasn't able to find the msi, had to point to it. After repairing it looks indeed correct:
So, I grabbed the logs from %TEMP%
, and the baseline run shows:
[1064:09B4][2023-03-13T09:34:10]i200: Plan begin, 7 packages, action: Modify
[1064:09B4][2023-03-13T09:34:10]i052: Condition 'NOT VersionNT64 AND (VersionNT >= v6.1) AND (IISCoreWebEngineInstalled_x86=1) AND (IISW3SVCInstalled_x86=1) AND (NOT OPT_NO_ANCM OR OPT_NO_ANCM="0")' evaluates to false.
[1064:09B4][2023-03-13T09:34:10]i052: Condition 'VersionNT64 AND (VersionNT64 >= v6.1) AND (IISCoreWebEngineInstalled_x64=1) AND (IISW3SVCInstalled_x64=1) AND (NOT OPT_NO_ANCM OR OPT_NO_ANCM="0")' evaluates to true.
[1064:09B4][2023-03-13T09:34:10]i052: Condition 'VersionNT64 AND (NOT OPT_NO_RUNTIME OR OPT_NO_RUNTIME="0")' evaluates to true.
[1064:09B4][2023-03-13T09:34:10]w321: Skipping dependency registration on package with no dependency providers: DotNetRedistLts_x64
[1064:09B4][2023-03-13T09:34:10]i052: Condition '(NOT OPT_NO_RUNTIME OR OPT_NO_RUNTIME="0") AND (NOT OPT_NO_X86 OR OPT_NO_X86="0")' evaluates to true.
[1064:09B4][2023-03-13T09:34:10]w321: Skipping dependency registration on package with no dependency providers: DotNetRedistLts_x86
[1064:09B4][2023-03-13T09:34:10]i052: Condition 'VersionNT64 AND (NOT OPT_NO_SHAREDFX OR OPT_NO_SHAREDFX="0")' evaluates to true.
[1064:09B4][2023-03-13T09:34:10]w321: Skipping dependency registration on package with no dependency providers: SharedFxRedist_x64
[1064:09B4][2023-03-13T09:34:10]i052: Condition '(NOT OPT_NO_SHAREDFX OR OPT_NO_SHAREDFX="0") AND (NOT OPT_NO_X86 OR OPT_NO_X86="0")' evaluates to true.
[1064:09B4][2023-03-13T09:34:10]w321: Skipping dependency registration on package with no dependency providers: SharedFxRedist_x86
[1064:09B4][2023-03-13T09:34:10]i201: Planned package: WindowsServerHostingBundleOptions.msi, state: Present, default requested: Present, ba requested: Present, execute: None, rollback: None, cache: No, uncache: No, dependency: Register
[1064:09B4][2023-03-13T09:34:10]i201: Planned package: AspNetCoreModuleV2_x86, state: Absent, default requested: Absent, ba requested: Absent, execute: None, rollback: None, cache: No, uncache: No, dependency: None
[1064:09B4][2023-03-13T09:34:10]i201: Planned package: AspNetCoreModuleV2_x64, state: Absent, default requested: Absent, ba requested: Absent, execute: None, rollback: None, cache: No, uncache: No, dependency: None
[1064:09B4][2023-03-13T09:34:10]i201: Planned package: DotNetRedistLts_x64, state: Absent, default requested: Absent, ba requested: Absent, execute: None, rollback: None, cache: No, uncache: Yes, dependency: None
[1064:09B4][2023-03-13T09:34:10]i201: Planned package: DotNetRedistLts_x86, state: Absent, default requested: Absent, ba requested: Absent, execute: None, rollback: None, cache: No, uncache: Yes, dependency: None
[1064:09B4][2023-03-13T09:34:10]i201: Planned package: SharedFxRedist_x64, state: Present, default requested: Present, ba requested: Present, execute: None, rollback: None, cache: No, uncache: No, dependency: None
[1064:09B4][2023-03-13T09:34:10]i201: Planned package: SharedFxRedist_x86, state: Absent, default requested: Absent, ba requested: Absent, execute: None, rollback: None, cache: No, uncache: Yes, dependency: None
After repairing, we get:
[13CC:1338][2023-03-13T10:03:35]i200: Plan begin, 7 packages, action: Repair
[13CC:1338][2023-03-13T10:03:35]i000: Setting string variable 'WixBundleLog_WindowsServerHostingBundleOptions.msi' to value 'C:\Users\VISICU~1\AppData\Local\Temp\dd_dd_DotNetCoreWinSvrHosting__20230313100333_000_WindowsServerHostingBundleOptions.msi.log'
[13CC:1338][2023-03-13T10:03:35]i052: Condition 'NOT VersionNT64 AND (VersionNT >= v6.1) AND (IISCoreWebEngineInstalled_x86=1) AND (IISW3SVCInstalled_x86=1) AND (NOT OPT_NO_ANCM OR OPT_NO_ANCM="0")' evaluates to false.
[13CC:1338][2023-03-13T10:03:35]i052: Condition 'VersionNT64 AND (VersionNT64 >= v6.1) AND (IISCoreWebEngineInstalled_x64=1) AND (IISW3SVCInstalled_x64=1) AND (NOT OPT_NO_ANCM OR OPT_NO_ANCM="0")' evaluates to true.
[13CC:1338][2023-03-13T10:03:35]i000: Setting string variable 'WixBundleRollbackLog_AspNetCoreModuleV2_x64' to value 'C:\Users\VISICU~1\AppData\Local\Temp\dd_dd_DotNetCoreWinSvrHosting__20230313100333_001_AspNetCoreModuleV2_x64_rollback.log'
[13CC:1338][2023-03-13T10:03:35]i000: Setting string variable 'WixBundleLog_AspNetCoreModuleV2_x64' to value 'C:\Users\VISICU~1\AppData\Local\Temp\dd_dd_DotNetCoreWinSvrHosting__20230313100333_001_AspNetCoreModuleV2_x64.log'
[13CC:1338][2023-03-13T10:03:35]i052: Condition 'VersionNT64 AND (NOT OPT_NO_RUNTIME OR OPT_NO_RUNTIME="0")' evaluates to true.
[13CC:1338][2023-03-13T10:03:35]w321: Skipping dependency registration on package with no dependency providers: DotNetRedistLts_x64
[13CC:1338][2023-03-13T10:03:35]i000: Setting string variable 'WixBundleLog_DotNetRedistLts_x64' to value 'C:\Users\VISICU~1\AppData\Local\Temp\dd_dd_DotNetCoreWinSvrHosting__20230313100333_002_DotNetRedistLts_x64.log'
[13CC:1338][2023-03-13T10:03:35]i000: Setting string variable 'WixBundleRollbackLog_DotNetRedistLts_x64' to value 'C:\Users\VISICU~1\AppData\Local\Temp\dd_dd_DotNetCoreWinSvrHosting__20230313100333_002_DotNetRedistLts_x64_rollback.log'
[13CC:1338][2023-03-13T10:03:35]i052: Condition '(NOT OPT_NO_RUNTIME OR OPT_NO_RUNTIME="0") AND (NOT OPT_NO_X86 OR OPT_NO_X86="0")' evaluates to true.
[13CC:1338][2023-03-13T10:03:35]w321: Skipping dependency registration on package with no dependency providers: DotNetRedistLts_x86
[13CC:1338][2023-03-13T10:03:35]i000: Setting string variable 'WixBundleLog_DotNetRedistLts_x86' to value 'C:\Users\VISICU~1\AppData\Local\Temp\dd_dd_DotNetCoreWinSvrHosting__20230313100333_003_DotNetRedistLts_x86.log'
[13CC:1338][2023-03-13T10:03:35]i000: Setting string variable 'WixBundleRollbackLog_DotNetRedistLts_x86' to value 'C:\Users\VISICU~1\AppData\Local\Temp\dd_dd_DotNetCoreWinSvrHosting__20230313100333_003_DotNetRedistLts_x86_rollback.log'
[13CC:1338][2023-03-13T10:03:35]i052: Condition 'VersionNT64 AND (NOT OPT_NO_SHAREDFX OR OPT_NO_SHAREDFX="0")' evaluates to true.
[13CC:1338][2023-03-13T10:03:35]w321: Skipping dependency registration on package with no dependency providers: SharedFxRedist_x64
[13CC:1338][2023-03-13T10:03:35]i000: Setting string variable 'WixBundleLog_SharedFxRedist_x64' to value 'C:\Users\VISICU~1\AppData\Local\Temp\dd_dd_DotNetCoreWinSvrHosting__20230313100333_004_SharedFxRedist_x64.log'
[13CC:1338][2023-03-13T10:03:35]i052: Condition '(NOT OPT_NO_SHAREDFX OR OPT_NO_SHAREDFX="0") AND (NOT OPT_NO_X86 OR OPT_NO_X86="0")' evaluates to true.
[13CC:1338][2023-03-13T10:03:35]w321: Skipping dependency registration on package with no dependency providers: SharedFxRedist_x86
[13CC:1338][2023-03-13T10:03:35]i000: Setting string variable 'WixBundleLog_SharedFxRedist_x86' to value 'C:\Users\VISICU~1\AppData\Local\Temp\dd_dd_DotNetCoreWinSvrHosting__20230313100333_005_SharedFxRedist_x86.log'
[13CC:1338][2023-03-13T10:03:35]i000: Setting string variable 'WixBundleRollbackLog_SharedFxRedist_x86' to value 'C:\Users\VISICU~1\AppData\Local\Temp\dd_dd_DotNetCoreWinSvrHosting__20230313100333_005_SharedFxRedist_x86_rollback.log'
[13CC:1338][2023-03-13T10:03:35]i201: Planned package: WindowsServerHostingBundleOptions.msi, state: Present, default requested: Repair, ba requested: Repair, execute: Repair, rollback: None, cache: No, uncache: No, dependency: Register
[13CC:1338][2023-03-13T10:03:35]i201: Planned package: AspNetCoreModuleV2_x86, state: Absent, default requested: Absent, ba requested: Absent, execute: None, rollback: None, cache: No, uncache: No, dependency: None
[13CC:1338][2023-03-13T10:03:35]i201: Planned package: AspNetCoreModuleV2_x64, state: Absent, default requested: Repair, ba requested: Repair, execute: Install, rollback: Uninstall, cache: Yes, uncache: No, dependency: Register
[13CC:1338][2023-03-13T10:03:35]i201: Planned package: DotNetRedistLts_x64, state: Absent, default requested: Repair, ba requested: Repair, execute: Install, rollback: Uninstall, cache: Yes, uncache: No, dependency: None
[13CC:1338][2023-03-13T10:03:35]i201: Planned package: DotNetRedistLts_x86, state: Absent, default requested: Repair, ba requested: Repair, execute: Install, rollback: Uninstall, cache: Yes, uncache: No, dependency: None
[13CC:1338][2023-03-13T10:03:35]i201: Planned package: SharedFxRedist_x64, state: Present, default requested: Repair, ba requested: Repair, execute: Repair, rollback: None, cache: No, uncache: No, dependency: None
[13CC:1338][2023-03-13T10:03:35]i201: Planned package: SharedFxRedist_x86, state: Absent, default requested: Repair, ba requested: Repair, execute: Install, rollback: Uninstall, cache: Yes, uncache: No, dependency: None
Based on the first set of logs, the default operation is Modify
. I'd expect that to be install. Are you using a commandline install script or something else like maybe Chocolatey? My one concern was that the IIS features weren't enabled, in which case the installer would bypass ANCM, but it seems to detect everything.
[1064:09B4][2023-03-13T09:34:10]i200: Plan begin, 7 packages, action: Modify
[1064:09B4][2023-03-13T09:34:10]i052: Condition 'VersionNT64 AND (VersionNT64 >= v6.1) AND (IISCoreWebEngineInstalled_x64=1) AND (IISW3SVCInstalled_x64=1) AND (NOT OPT_NO_ANCM OR OPT_NO_ANCM="0")' evaluates to true.
[1064:09B4][2023-03-13T09:34:10]i201: Planned package: AspNetCoreModuleV2_x64, state: Absent, default requested: Absent, ba requested: Absent, execute: None, rollback: None, cache: No, uncache: No, dependency: None
This is likely being caused by the initial action being set to Modify
and not Install
Thanks for the answer, I dug on our own logs and this is how our tooling runs it as:
Executing the package 'DotNetCore Hosting'...
Executing "path\to\exe\dotnet-hosting-6.0.14-win.exe" /passive
But according to the help, /install
should be implied
Correct, the default is installed, unless the bundle is already present, in which case it will default to repair/modify. With the full UI you can choose, but with /passive
, only progress bars are shown and it will select Modify IIRC. Are you able to share the start of the first log? Before the engine gets to planning, it should be going through a detection phase. That might tell us why it's switching to modify. Normally, modify/repair options only become available if the bundle (EXE) is detected as installed.
Here you go @joeloff, the following is the baseline log from /passive
only
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.
I am just not convinced this is a sysprep issue anymore, it is just not surviving the sysprep process because the first install is running a modify, as explained by @joeloff.
Looks like this PR hasn't been active for some time and the codebase could have been changed in the meantime.
To make sure no conflicting changes have occurred, please rerun validation before merging. You can do this by leaving an /azp run
comment here (requires commit rights), or by simply closing and reopening.
Looks like this PR hasn't been active for some time and the codebase could have been changed in the meantime.
To make sure no conflicting changes have occurred, please rerun validation before merging. You can do this by leaving an /azp run
comment here (requires commit rights), or by simply closing and reopening.
As outlined in past, this is just a dupe of #47791
Is there an existing issue for this?
Describe the bug
Same as described by #3851 and sadly closed without any solution, however the modules name changed:
After repairing .NET Hosting Bundle, these contents gets added to
C:\Windows\System32\inetsrv\config\applicationhost.config
:And some other references.
Folder
%ProgramFiles%\IIS
is not present at all either. Soaspnetcorev2.dll
is missing.After repair it works as intended, but it is suboptimal
Expected Behavior
.NET Hosting Bundle survives sysprep and user doesn't need to repair the installation when a new VM is created.
Steps To Reproduce
Exceptions (if any)
No response
.NET Version
6.0.14
Anything else?