Generate a Factory OS Image
Once you've configured a workspace for the device type you plan on producing images for, use BuildWSKImage to build the image (~15-35 minutes).
Build the image
Start the Windows System Kit Build Environment (example,
E:\SetImagGenEnv.cmd) as an administrator.
Update the WSKWorkspaceRoot environment variable to point to the workspace for the image you want to build.
The %WSKWorkspaceRoot% variable that you'll see throughout this lab is automatically set when you run
prepwskworkspace. If you close and reopen the Windows System Kit environment, you can set the workspace root by navigating to your workspace folder and running
Build the image (15-35 minutes). You'll get an .ffu or virtual hard disk file, depending on the workspace you prepared.
The name of the .xml file you specify in this step may be different, depending on the options you chose when you created your workspace. You can view the full path and filename of your OEMInput.xml file by running
echo %WSKOEMInputFileNamefrom the WSK environment.
By default, the output is be placed in same location as your workspace appended with '.output', for example, if your workspace is in
C:\Workspace, the output will be in
If you try to generate an image in the destination folder that already includes an .FFU images or virtual hard disks with the same name, image creation will fail with the following error:
imageapp : ERROR : ThreadId18164 OutputFile C:\FactoryOS.Output\FactoryOS_Development_AMD64_UEFI_SpacesGPT_Hardware.ffu already exists.
Prior to generating an image, either:
- Specify the
Overwriteparameter in your
BuildWSKImagecommand to automatically overwrite an image in the output folder
- Make sure that your output folder doesn't already contain a generated image of the same name.
BuildWSKImage [OEMInput] [Destination] [Overwrite]
|OEMInput||Optional. Path to your image configuration file.|
|Destination||Optional. Target directory for the output. By default, the script creates a folder besides your WSKWorkspace folder, with ".output" appended to the name.|
|Overwrite||Optional. Overwrites the output file. If you don't specify this parameter and a image file already exists in your output folder, image creation will fail.|
Deploy your image
- To learn how to deploy a virtual machine hard disk, see Deploy a virtual hard disk image
- To learn about the different ways to flash your device, see Image deployment overview