Project

General

Profile

Actions

action #121033

closed

[WSL] Unattended Windows install

Added by pherranz about 2 years ago. Updated 2 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
-
Start date:
2022-11-28
Due date:
% Done:

0%

Estimated time:
Tags:

Description

Motivation

The current installation of windows for testing WSL is unstable. But there is a new approach with automation.

Acceptance Criteria

  • AC 1: Study the resources available to understand the procedure.
  • AC 2: Create a test to probe that this could be possible

Suggestions

The installation of Windows OS can be unattended by adding an XML file called Autounattend.xml in the root folder of the ISO image. That XML is different from UEFI to BIOS boot (attached example files), and can be generated in this website. More info provided by Microsoft can be found here.

By now, I've managed to create the ISO and run the install, these are the steps I have taken so far to get to that point:

  1. Download latest Windows ISO (Win10 or Win11)
  2. Extract the ISO to a local folder
  3. Copy the Autounattend.xml file into the root folder
  4. Wrap the ISO again running this command inside the extracted folder mkisofs -iso-level 4 -udf -R -D -U -b boot/etfsboot.com -no-emul-boot -boot-load-size 8 -boot-load-seg 1984 -eltorito-alt-boot -b efi/microsoft/boot/efisys.bin -no-emul-boot -o <OUTPUT_ISO> .

Problems found so far

  • An error in the XML file related to disks (see image attached) is raised when installing
  • There's need to choose the version to install (Windows XX Pro, Home, ...)
  • In Win11, to install into a VM, there's need to modify some registry key values, as it's done in this part of the current installation. For this version, the Autounnatend.xml should be called from this console with the command setup /unattend:<PATH_TO_FILE>

Files

2022-11-28_09-19.png (27.7 KB) 2022-11-28_09-19.png Disk failure screenshot pherranz, 2022-11-28 08:20
autounattend_BIOS.xml (11.2 KB) autounattend_BIOS.xml pherranz, 2023-09-12 10:48
autounattend_UEFI.xml (11.4 KB) autounattend_UEFI.xml pherranz, 2023-09-12 10:48

Related issues 2 (1 open1 closed)

Related to Containers and images - action #105160: Automatic triggering of Windows Image Update test runsResolved2022-01-20

Actions
Related to Containers and images - coordination #138137: [WSL][epic] Improvement of the installation processesNew2023-10-17

Actions
Actions

Also available in: Atom PDF