You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/virtual-machines/troubleshooting/unresponsive-vm-apply-group-policy.md
+29-28Lines changed: 29 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,26 +16,26 @@ ms.date: 05/07/2020
16
16
ms.author: v-mibufo
17
17
---
18
18
19
-
# VM is unresponsive while applying ‘Group Policy Local Users & Groups’ policy
19
+
# VM becomes unresponsive while applying ‘Group Policy Local Users & Groups’ policy
20
20
21
-
This article provides steps to resolve issues where the load screen is stuck applying a policy during boot in an Azure VM.
21
+
This article provides steps to resolve issues where the load screen is stuck when applying a policy during boot in an Azure VM.
22
22
23
23
## Symptoms
24
24
25
-
When you use [Boot diagnostics](https://docs.microsoft.com/azure/virtual-machines/troubleshooting/boot-diagnostics) to view the screenshot of the VM, you will see that the screen is stuck loading with the message: ‘*Applying Group Policy Local Users and Groups policy*’.
25
+
When using [Boot diagnostics](https://docs.microsoft.com/azure/virtual-machines/troubleshooting/boot-diagnostics) to view a screenshot of the VM, the screen is stuck loading with the message: ‘*Applying Group Policy Local Users and Groups policy*’.
26
26
27
-

27
+
:::image type="content" source="media//unresponsive-vm-apply-group-policy/applying-group-policy-1.png" alt-text="Screenshot of Applying Group Policy Local Users and Groups policy loading (Windows Server 2012 R2).":::
28
28
29
-

29
+
:::image type="content" source="media/unresponsive-vm-apply-group-policy/applying-group-policy-2.png" alt-text="Screenshot of Applying Group Policy Local Users and Groups policy loading (Windows Server 2012).":::
30
30
31
31
## Cause
32
32
33
-
This issue is caused by conflicting locks when the policy is attempting to cleanup old user profiles.
33
+
There are conflicting locks when the policy attempts to cleanup old user profiles.
34
34
35
35
> [!NOTE]
36
-
> This applies only on Windows Server 2012 and Windows Server 2012 R2.
36
+
> This applies only to Windows Server 2012 and Windows Server 2012 R2.
37
37
38
-
The policy being applied that won’t finish its processes is:
38
+
Here’s the problematic policy:
39
39
40
40
`Computer Configuration\Policies\Administrative Templates\System/User Profiles\Delete user profiles older than a specified number of days on system restart`
41
41
@@ -49,7 +49,7 @@ The policy being applied that won’t finish its processes is:
49
49
4.[Rebuild the VM](#step-4-rebuild-the-vm)
50
50
51
51
> [!NOTE]
52
-
> When encountering this boot error, the Guest OS is not operational. You will be troubleshooting in offline mode to resolve this issue.
52
+
> If your encounter this boot error, the Guest OS isn’t operational. You must troubleshoot in Offline mode.
53
53
54
54
### Step 1: Create and access a repair VM
55
55
@@ -59,37 +59,38 @@ The policy being applied that won’t finish its processes is:
59
59
### Step 2: Disable the policy
60
60
61
61
1. On the repair VM, open the Registry Editor.
62
-
2. Locate the key **HKEY_LOCAL_MACHINE** and then select **File** > **Load Hive...** from the menu.
62
+
2. Locate the key **HKEY_LOCAL_MACHINE** and select **File** > **Load Hive...** from the menu.
63
63
64
-

64
+
:::image type="content" source="media/unresponsive-vm-apply-group-policy/registry.png" alt-text="Screenshot shows highlighted HKEY_LOCAL_MACHINE and the menu containing “Load Hive…".":::
65
65
66
-
- Load Hive allows you to load a registry key from an offline system, which in this case is your broken disk attached to your repair VM.
67
-
-**HKEY_LOCAL_MACHINE** is where all the system-wide settings are stored and may be abbreviated as “HKLM”.
68
-
3. In the attached disk, navigate to the `\windows\system32\config\SOFTWARE` file and open it.
66
+
- Load Hive allows you to load registry keys from an offline system, in this case the broken disk attached to the repair VM.
67
+
-System-wide settings are stored on `HKEY_LOCAL_MACHINE`and can be abbreviated as “HKLM”.
68
+
3. In the attached disk, go to the `\windows\system32\config\SOFTWARE` file and open it.
69
69
70
-
a) When you open it, you will be prompted for a name. Enter BROKENSOFTWARE as the name.<br/>
71
-
b) To verify that BROKENSOFTWARE was loaded, you can expand **HKEY_LOCAL_MACHINE** and look for the added BROKENSOFTWARE key.
72
-
4. Navigate to the BROKENSOFTWARE and validate if the CleanupProfile key exists in the hive that was loaded.
70
+
a) You will be prompted for a name. Enter BROKENSOFTWARE.<br/>
71
+
b) To verify that BROKENSOFTWARE was loaded, expand **HKEY_LOCAL_MACHINE** and look for the added BROKENSOFTWARE key.
72
+
4. Navigate to BROKENSOFTWARE and check if the CleanupProfile key exists in the loaded hive.
73
73
74
-
a) If the key does not exist, then the CleanupProfile policy is not set up. In this case, you should [submit a support ticket](https://portal.azure.com/?#blade/Microsoft_Azure_Support/HelpAndSupportBlade), including the memory.dmp file located in the Windows directory of the attached OS disk.<br/>
75
-
b) If the key does exist, then it means that the CleanupProfile policy is set up. Its value represents the retention policy in days. Continue to delete the key.
76
-
5. Delete the CleanupProfiles key using the command below:
74
+
a) If the key exists, then the CleanupProfile policy is set, its value represents the retention policy in days. Continue deleting the key.<br/>
75
+
b) If the key doesn't exist, the CleanupProfile policy isn't set. [Submit a support ticket](https://portal.azure.com/?#blade/Microsoft_Azure_Support/HelpAndSupportBlade), including the memory.dmp file located in the Windows directory of the attached OS disk.
76
+
77
+
5. Delete the CleanupProfiles key using this command:
6. Unload the BROKENSOFTWARE hive using the command below:
82
+
6. Unload the BROKENSOFTWARE hive using this command:
82
83
83
84
```
84
85
reg unload HKLM\BROKENSOFTWARE
85
86
```
86
87
87
88
### Step 3: Enable Serial Console and memory dump collection
88
89
89
-
To enable memory dump collection and Serial Console, run the script below:
90
+
To enable memory dump collection and Serial Console, run this script:
90
91
91
92
1. Open an elevated command prompt session (Run as administrator).
92
-
2. Run the following commands:
93
+
2. Run these commands:
93
94
94
95
**Enable Serial Console**:
95
96
@@ -100,9 +101,9 @@ To enable memory dump collection and Serial Console, run the script below:
100
101
```
101
102
bcdedit /store <VOLUME LETTER WHERE THE BCD FOLDER IS>:\boot\bcd /emssettings EMSPORT:1 EMSBAUDRATE:115200
102
103
```
103
-
3. Verify if the free space on the OS disk is as much as the memory size (RAM) on the VM.
104
+
3. Verify if the free space on the OS disk is at least equal to the VM’s memory size (RAM).
104
105
105
-
If there's not enough space on the OS disk, you should change the location where the memory dump file will be created and refer that to any data disk attached to the VM that has enough free space. To change the location, replace “%SystemRoot%” with the drive letter (for example “F:”) of the data disk in the below commands.
106
+
If there isn’t enough space on the OS disk, change the memory dump location and refer it to an attached data disk with enough free space. To change the location, replace “%SystemRoot%” with the drive letter (e.g. “F:”) of the data disk in the commands below.
106
107
107
108
**Suggested configuration to enable OS dump**:
108
109
@@ -138,8 +139,8 @@ To enable memory dump collection and Serial Console, run the script below:
138
139
139
140
Use [step 5 of the VM Repair Commands](https://docs.microsoft.com/azure/virtual-machines/troubleshooting/repair-windows-vm-using-azure-virtual-machine-repair-commands#repair-process-example) to reassemble the VM.
140
141
141
-
If this fixed the issue, then you have disabled this policy locally. For a permanent solution, do not to use the CleanupProfiles policy on VMs, and use another method to perform the profile cleanup.
142
+
If the issue is fixed, the policy has been disabled locally. For a permanent solution, don’t use CleanupProfiles policy on VMs. Use a different method to perform profile cleanups.
142
143
143
-
Policy to stop using:
144
+
Don’t use this policy:
144
145
145
-
Machine\Admin Templates\System\User Profiles\Delete user profiles older than a specified number of days on system restart
146
+
`Machine\Admin Templates\System\User Profiles\Delete user profiles older than a specified number of days on system restart`
0 commit comments