大网数据广告活动
启动与系统组件

Error 22042 deploying a service template

· 52CE 我爱测

Fixes an issue in which you receive error 22042 when you deploy a service template in System Center 2012 Virtual Machine Manager.

This article fixes an issue in which you receive error 22042 when you deploy a service template in System Center 2012 Virtual Machine Manager.

Original product version:   System Center 2012 Virtual Machine Manager
Original KB number:   2680242

Symptoms

When attempting to deploy a service template in System Center 2012 Virtual Machine Manager using a Windows core virtual hard disk (VHD), the process fails with the following errors:

Error (22042)
The service was not successfully deployed. Review the event log to determine the cause before you take corrective action.

Recommended Action
The deployment can be restarted by retrying the job.

Information (21947)
The script command (dism.exe dism.exe /online /NoRestart /enable-feature /featurename:NetFx2-ServerCore /featurename:MicrosoftWindowsPowerShell /featurename:ServerManager-PSH-Cmdlets) was executed on the computer and returned a result exit code (87).

Error (22010)
VMM failed to enable Server Manager PowerShell on the guest virtual machine. Please log into the virtual machine and look in the event logs (%WINDIR%\Logs\Dism\dism.log).

Cause

This is by design. Service templates using Windows core operating systems are not currently supported.

Resolution

The following workarounds are available:

  • Enable all the roles or features in the virtual machine prior to creating the Sysprep VHD.

  • Run DISM.exe as part of the application deployment using a pre-install script.

    • Executable program: C:\Windows\system32\dism.exe
    • Parameters: /online /norestart /enable-feature /featurename:NetFx2-ServerCore /featurename:NetFx3-ServerCore /featurename:DNS-Server-Core /featurename:DirectoryServices-DomainController-ServerFoundation
    • Timeout: 240 seconds

Source: Microsoft Learn / IT Pro troubleshooting by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / IT Pro troubleshooting
适用范围
See source applicability · Source date 04/09/2024
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。