* [PATCH guest-common] fix #7408: guest helpers: activate storage before checking hookscript
@ 2026-09-29 13:48 Michal Fox
0 siblings, 0 replies; only message in thread
From: Michal Fox @ 2026-09-29 13:48 UTC (permalink / raw)
To: pve-devel
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 <me@dualfroz.com>
---
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;
--
2.43.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-30 7:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-29 13:48 [PATCH guest-common] fix #7408: guest helpers: activate storage before checking hookscript Michal Fox
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox