1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

VMware で Windows 10 のテンプレートから仮想マシンを新規作成すると CPU100%となる

Last updated at Posted at 2022-10-06

現象

vSphere(VMware) で Windows 10 のテンプレートから仮想マシン(VM)を新規作成を行い、テンプレートに設定されているユーザでログインすると、CPU 100% が続いてしまう状況。(エクスプローラーとサービス ホストが CPU をほぼ占有し続けている状況)
image.png

vSphere Client で以下のようにアラームが出る状態
image.png

経緯

去年の9月ごろから(おそらくWindows 21H2 にしてから)発生しており、イベントビューアーや Process Exploler を使ったが、全然理由がわからなかった。
(VM作成完了後、新規ユーザを作成し、新規ユーザでログインを行えば、現象は再現しないことは判明。)

しかし、先日 Process Monitor で Exploler.exe が繰り返し、以下レジストリにアクセスしていることから、対処方法が判明。

  • HKCR\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppModel\PackageRepository\Packages
  • HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModel\StateRepository\Cache\ApplicationUser\Index\UserAndApplicationUserModelId\2^MicrosoftWindows.Client.CBS_cw5n1h2txyewy!InputApp

対処方法

Powershell で以下を実行

Add-AppxPackage -Register 'C:\Windows\SystemApps\MicrosoftWindows.Client.CBS_cw5n1h2txyewy\AppxManifest.xml' -DisableDevelopmentMode

結果

image.png

状況再確認

テンプレートVM
PS C:\WINDOWS\system32> Get-AppxPackage *MicrosoftWindows.Client*

Name              : MicrosoftWindows.Client.CBS
Publisher         : CN=Microsoft Windows, O=Microsoft Corporation, L=Redmond, S=Washington, C=US
Architecture      : X64
ResourceId        :
Version           : 120.2212.4180.0
PackageFullName   : MicrosoftWindows.Client.CBS_120.2212.4180.0_x64__cw5n1h2txyewy
InstallLocation   : C:\Windows\SystemApps\MicrosoftWindows.Client.CBS_cw5n1h2txyewy
IsFramework       : False
PackageFamilyName : MicrosoftWindows.Client.CBS_cw5n1h2txyewy
PublisherId       : cw5n1h2txyewy
IsResourcePackage : False
IsBundle          : False
IsDevelopmentMode : False
NonRemovable      : True
IsPartiallyStaged : False
SignatureKind     : System
Status            : Ok
新規作成直後(CPU100%の状態)
PS C:\WINDOWS\system32> Get-AppxPackage *MicrosoftWindows.Client*

PS C:\WINDOWS\system32> Get-AppxPackage -alluser *MicrosoftWindows.Client*

Name                   : MicrosoftWindows.Client.CBS
Publisher              : CN=Microsoft Windows, O=Microsoft Corporation, L=Redmond, S=Washington, C=US
Architecture           : X64
ResourceId             :
Version                : 120.2212.4180.0
PackageFullName        : MicrosoftWindows.Client.CBS_120.2212.4180.0_x64__cw5n1h2txyewy
InstallLocation        : C:\Windows\SystemApps\MicrosoftWindows.Client.CBS_cw5n1h2txyewy
IsFramework            : False
PackageFamilyName      : MicrosoftWindows.Client.CBS_cw5n1h2txyewy
PublisherId            : cw5n1h2txyewy
PackageUserInformation : {S-1-5-18 [S-1-5-18]: Staged}
IsResourcePackage      : False
IsBundle               : False
IsDevelopmentMode      : False
NonRemovable           : True
IsPartiallyStaged      : False
SignatureKind          : System
Status                 : Ok
対処法実行後
PS C:\WINDOWS\system32> Get-AppxPackage *MicrosoftWindows.Client*

Name              : MicrosoftWindows.Client.CBS
Publisher         : CN=Microsoft Windows, O=Microsoft Corporation, L=Redmond, S=Washington, C=US
Architecture      : X64
ResourceId        :
Version           : 120.2212.4180.0
PackageFullName   : MicrosoftWindows.Client.CBS_120.2212.4180.0_x64__cw5n1h2txyewy
InstallLocation   : C:\Windows\SystemApps\MicrosoftWindows.Client.CBS_cw5n1h2txyewy
IsFramework       : False
PackageFamilyName : MicrosoftWindows.Client.CBS_cw5n1h2txyewy
PublisherId       : cw5n1h2txyewy
IsResourcePackage : False
IsBundle          : False
IsDevelopmentMode : False
NonRemovable      : True
IsPartiallyStaged : False
SignatureKind     : System
Status            : Ok

原因

なぜか、MicrosoftWindows.Client.CBS が、ログインユーザからは見えず、alluser で PackageUserInformation が Staged となっている。
おそらく sysprep でなにかおかしくなっていると推測している。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?