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 #1

Updated by pherranz about 2 years ago

Actions #2

Updated by ilausuch about 2 years ago

  • Description updated (diff)
Actions #3

Updated by pherranz about 2 years ago

  • Related to action #105160: Automatic triggering of Windows Image Update test runs added
Actions #4

Updated by mgrossu almost 2 years ago

  • Assignee set to mgrossu
Actions #5

Updated by mgrossu over 1 year ago

  • Assignee deleted (mgrossu)
Actions #6

Updated by ph03nix over 1 year ago

  • Priority changed from Low to Normal
Actions #7

Updated by ph03nix over 1 year ago

  • Subject changed from [research] Automate Windows install to [research] Unattended Windows install
Actions #8

Updated by pherranz over 1 year ago

Finally I've been able to run unattended installations for all the Windows. The issue was in the Autounattend.xml. I'll change the attachments to this ticket with the proper files.

Updated by pherranz over 1 year ago

Actions #10

Updated by pherranz over 1 year ago

  • Assignee set to pherranz
Actions #11

Updated by pherranz over 1 year ago

  • Status changed from Workable to In Progress
Actions #12

Updated by pherranz over 1 year ago

  • Subject changed from [research] Unattended Windows install to [WSL] Unattended Windows install

The installation is done automatically now. The final XML files are uploaded to this ticket and also to the https://github.com/os-autoinst/os-autoinst-distri-opensuse/pull/17865 PR (data/wsl folder).

Actions #13

Updated by pherranz over 1 year ago

Following @mloviska advice, I'm keeping the manual installation alongside the unattended one. I created a MR for modifying the qac-openqa-yaml and adding the corresponding jobs:

https://gitlab.suse.de/qac/qac-openqa-yaml/-/merge_requests/1346

Actions #14

Updated by ph03nix about 1 year ago

Actions #15

Updated by pherranz about 1 year ago

  • Status changed from In Progress to Resolved
Actions #16

Updated by ph03nix 3 months ago

  • Tags set to WSL
Actions #17

Updated by ph03nix 2 months ago

  • Project changed from 199 to Containers and images
Actions

Also available in: Atom PDF