From 30fa232ec3fda7d45df8b8725f419b90894176e2 Mon Sep 17 00:00:00 2001 From: Michal Fox Date: Fri, 25 Sep 2026 11:31:39 +0200 Subject: [PATCH] fix #7408: guest helpers: activate storage before checking hookscript The hookscript is looked up on its storage without activating it first. If the snippets live on a network storage like CIFS or NFS that is not mounted yet, for example when a guest is started on boot, the check fails with "script ... does not exist" and the guest does not start, even though the storage would be mounted on its first regular use. Activate the storage of the hookscript volume before checking the file, as is done for any other volume used by a guest. Signed-off-by: Michal Fox --- src/PVE/GuestHelpers.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/PVE/GuestHelpers.pm b/src/PVE/GuestHelpers.pm index f8d112b..ccd00b9 100644 --- a/src/PVE/GuestHelpers.pm +++ b/src/PVE/GuestHelpers.pm @@ -105,6 +105,9 @@ sub check_hookscript { die "'$volid' is not in the snippets directory\n" if $type ne 'snippets'; + my ($storeid) = PVE::Storage::parse_volume_id($volid); + PVE::Storage::activate_storage($storecfg, $storeid); + die "script '$volid' does not exist\n" if !-f $path;