Skip to content

Commit 284a11e

Browse files
committed
[Docs] Add docs for testing the tool on ref computers
1 parent 2c4fb2d commit 284a11e

5 files changed

Lines changed: 87 additions & 0 deletions

File tree

SysprepPreparator.vbproj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@
173173
<None Include="docs\CCP_PT\Helpers.CompatChecks.CompatibilityCheckerProvider.md" />
174174
<None Include="docs\CCP_PT\Helpers.PreparationTasks.PreparationTask.md" />
175175
<None Include="docs\CCP_PT\index.md" />
176+
<None Include="docs\TestingOnSysprepSystems\index.md" />
176177
<None Include="Languages\lang_en.ini">
177178
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
178179
</None>
@@ -209,6 +210,10 @@
209210
</ItemGroup>
210211
<ItemGroup>
211212
<Content Include="docs\res\ccpdoc_newclass.png" />
213+
<Content Include="docs\res\ptdoc_newclass.png" />
214+
<Content Include="docs\res\sptest_oobe.png" />
215+
<Content Include="docs\res\sptest_snapshot.png" />
216+
<Content Include="docs\res\sptest_sysprep.png" />
212217
<Content Include="logo.ico" />
213218
</ItemGroup>
214219
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# Testing Sysprep Preparation Tool changes on reference computers
2+
3+
Apart from testing Sysprep Preparation Tool changes on your host system, you should also test your changes in a reference computer. A **reference computer** is what system administrators use in order to create a base image from which to make independent changes for the rest of the fleet.
4+
5+
A quick and easy way of preparing a reference computer is with a virtual machine. The virtual machine's *hypervisor* should support the following:
6+
7+
- Shared Folders (via standard SMB/NFS, or HGFS)
8+
9+
Because of this requirement, all popular hypervisors (VMware, Hyper-V, VirtualBox, QEMU...) are supported.
10+
11+
The virtual machine should also be configured to connect to the network, mainly in order to enable remote debugging.
12+
13+
## Preparing the virtual machine and the operating system
14+
15+
The operating system must be either Windows 10 or Windows 11 **WITHOUT ANY KIND OF UNATTENDED ANSWER FILE**. This is because we want OOBE to be interactive in order to restart into Audit mode, so, if it's unattended, we can't really test...
16+
17+
**Minimum specifications for virtual machines:**
18+
19+
- 2 virtualized cores (any topology)
20+
- 2 GB (2048 MB) of RAM
21+
- 60 GB HDD
22+
23+
**Recommended specifications for virtual machines:**
24+
25+
- 4 virtualized cores (any topology)
26+
- 8 GB (8192 MB) of RAM
27+
- 2 virtual disks:
28+
- 128 GB HDD (OS)
29+
- 80 GB HDD (WIM files)*
30+
31+
\* The drive must not be affected by VM snapshots. Include this disk if you want to test image capture after Sysprep preparation finishes
32+
33+
We will skip operating system installation and get straight to the OOBE.
34+
35+
At the out-of-box experience on any page that requires your interaction, press <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>F3</kbd>, like here:
36+
37+
![](../res/sptest_oobe.png)
38+
39+
You should see this screen:
40+
41+
![](../res/sptest_sysprep.png)
42+
43+
This environment is called **Audit Mode**. You can boot to this environment as many times as you want by configuring the following options in Sysprep:
44+
45+
1. Set **System Cleanup Action** to "Enter System Audit Mode". *DO NOT CLICK GENERALIZE*
46+
2. Set **Shutdown Options** to "Quit"
47+
3. Click OK
48+
49+
You will remain in the audit environment. The next time you turn on the reference computer, you will see the audit environment, alongside the Sysprep window.
50+
51+
## Enabling shared folders
52+
53+
The shared folder(s) that you'll need to add to the VM are:
54+
55+
- One for the locally-built copy of the Sysprep Preparation Tool
56+
- One for test data and support tools
57+
58+
The test data folder should primarily contain various applications, but should also contain other files that you'll use to test your change.
59+
60+
Depending on what you chose as the VM's hypervisor, you may or may not need to install additional software in the VM to enable HGFS support and other features:
61+
62+
- For VirtualBox, use Guest Additions
63+
- For VMware, use VMware Tools
64+
- For QEMU, use VirtIO drivers
65+
66+
Use the hypervisor's settings to add those shared folders. They should be picked up by the VM instantly. If you don't need additional software to use shared folders, you can simply connect to mount points.
67+
68+
At this point, **we recommend that you create a snapshot of your virtual machine** if the changes that you made to the Sysprep Preparation Tool don't work.
69+
70+
![](../res/sptest_snapshot.png)
71+
72+
*Example of snapshot creation in VMware*
73+
74+
## Debugging changes
75+
76+
**DO NOT USE THE SYSPREP PREPARATION TOOL IN TEST MODE!!!**
77+
78+
Depending on how much time you have invested in adding *DynaLog* logging to your Compatibility Checker Provider (CCP) or your Preparation Task (PT), you may simply rely on DynaLog logging to detect and fix issues.
79+
80+
However, for more advanced issues, it's always best to rely on remote debugging. In your support tools folder, add a copy of the Visual Studio remote debugger, available for free from Microsoft. Then, follow the instructions on how to remotely debug a program.
81+
82+
Finally, perform your debugging process as usual. To test a new version of the Sysprep Preparation Tool, simply restore the snapshot that you had created.

docs/res/sptest_oobe.png

120 KB
Loading

docs/res/sptest_snapshot.png

18.5 KB
Loading

docs/res/sptest_sysprep.png

488 KB
Loading

0 commit comments

Comments
 (0)