From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id C33F31FF0AA for ; Tue, 03 Nov 2026 16:18:47 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id D5C7C21906; Tue, 03 Nov 2026 16:18:45 +0100 (CET) From: =?UTF-8?q?Michael=20K=C3=B6ppl?= To: pve-devel@lists.proxmox.com Subject: [PATCH test-instance 1/1] instance: skip the GRUB menu when booting installed instances Date: Tue, 3 Nov 2026 16:18:41 +0100 Message-ID: <20261103151841.1779365-1-m.koeppl@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1793719122464 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.221 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: RLBLOHYRIOVE5HINUR27U5V7CWCWQBNH X-Message-ID-Hash: RLBLOHYRIOVE5HINUR27U5V7CWCWQBNH X-MailFrom: m.koeppl@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Rollbacks between test cases restore offline snapshots, so the instances boot again before every test case. Each of these boots waits in the GRUB menu for Debian's default timeout of five seconds, which means multiple minutes of waiting for a regular test run. In a tested example run of 47 test cases, this timeout resulted in roughly 4 minutes across all instances used. Set the timeout to zero in the firstboot script, skipping over the waiting time and saving a lot time during test runs. Signed-off-by: Michael Köppl --- .../src/instance_manager/helpers.rs | 21 ++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/proxmox-test-instance/src/instance_manager/helpers.rs b/proxmox-test-instance/src/instance_manager/helpers.rs index f461286f..0e52d899 100644 --- a/proxmox-test-instance/src/instance_manager/helpers.rs +++ b/proxmox-test-instance/src/instance_manager/helpers.rs @@ -28,10 +28,25 @@ pub fn get_remote_run_script(cmd: &str) -> String { ) } -/// Constructs the shell script used after the first boot. At the moment contains networking -/// configuration for additional NICs. +/// Skips the boot menu. Each rollback between test cases restores a powered-off instance that has +/// to boot again for the next test case, so the timeout adds up over a run. +const SKIP_BOOT_MENU: &str = "echo 'GRUB_TIMEOUT=0' > /etc/default/grub.d/proxmox-test-tools.cfg +update-grub"; + +/// Constructs the shell script used after the first boot of an installed instance. It skips the +/// boot menu and configures additional NICs. pub fn construct_first_boot_script(instance: &SetupInstance) -> Option { - get_network_setup(instance).map(|nss| get_remote_run_script(&nss)) + if !matches!(instance.kind, InstanceKind::Vm(_)) { + return None; + } + + let mut script = SKIP_BOOT_MENU.to_string(); + if let Some(network_setup) = get_network_setup(instance) { + script.push('\n'); + script.push_str(&network_setup); + } + + Some(get_remote_run_script(&script)) } fn get_network_setup(instance: &SetupInstance) -> Option { -- 2.47.3