Skip to content

Commit 4902d82

Browse files
authored
PHD: assume specialized Windows images (#636)
Change the Windows guest adapters to assume they're operating on a fully- specialized, post-OOBE guest image. This fixes tests like the `lspci` lifecycle test that stop and start a VM and assume that it will go through the same boot sequence on its initial and subsequent attempts to start. Also fix up the PHD README to describe the WS2019 adapter (missed this in the change that added the adapter). Tested with WS2019 and WS2022 guests.
1 parent a8e63d2 commit 4902d82

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

phd-tests/README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@ encoded into the logon sequences for each adapter and reproduced below:
217217
| Alpine Linux | `root` | |
218218
| Debian 11 (nocloud) | `root` | |
219219
| Ubuntu 20.04 | `ubuntu` | `1!Passw0rd` |
220+
| Windows Server 2019 | `Administrator` | `0xide#1Fan` |
220221
| Windows Server 2022 | `Administrator` | `0xide#1Fan` |
221222

222223
If you add a custom image to your artifact file, you must make sure either to
@@ -289,4 +290,4 @@ PHD is arranged into the following crates:
289290
[^1]: Technically, this uses the value of
290291
[`$CARGO_TARGET_DIR`](https://doc.rust-lang.org/cargo/reference/environment-variables.html#environment-variables-cargo-reads),
291292
so if that's overridden, `cargo xtask phd` will use whatever the Cargo
292-
target dir is.
293+
target dir is.

phd-tests/framework/src/guest_os/windows.rs

-11
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,6 @@ use super::{CommandSequence, CommandSequenceEntry, GuestOsKind};
1111
///
1212
/// This login sequence assumes the following:
1313
///
14-
/// - The image has been generalized (by running `sysprep /generalize`) and is
15-
/// configured so that on first boot it will skip the out-of-box experience
16-
/// (OOBE) and initialize the local administrator account with the appropriate
17-
/// password. See [MSDN's Windows Setup
18-
/// documentation](https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/generalize?view=windows-11)
19-
/// for more details.
2014
/// - Cygwin is installed to C:\cygwin and can be launched by invoking
2115
/// C:\cygwin\cygwin.bat.
2216
/// - The local administrator account is enabled with password `0xide#1Fan`.
@@ -27,11 +21,6 @@ pub(super) fn get_login_sequence_for(guest: GuestOsKind) -> CommandSequence {
2721
));
2822

2923
let mut commands = vec![
30-
// Assume the image will need to reboot one last time after being
31-
// specialized.
32-
CommandSequenceEntry::WaitFor(
33-
"Computer is booting, SAC started and initialized.",
34-
),
3524
CommandSequenceEntry::WaitFor(
3625
"Computer is booting, SAC started and initialized.",
3726
),

0 commit comments

Comments
 (0)