* [PATCH guest-common] fix #7408: guest helpers: activate storage before checking hookscript
@ 2026-09-29 13:48 Michal Fox
2026-11-05 14:12 ` applied: " Fabian Grünbichler
0 siblings, 1 reply; 2+ messages 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] 2+ messages in thread
* applied: [PATCH guest-common] fix #7408: guest helpers: activate storage before checking hookscript
2026-09-29 13:48 [PATCH guest-common] fix #7408: guest helpers: activate storage before checking hookscript Michal Fox
@ 2026-11-05 14:12 ` Fabian Grünbichler
0 siblings, 0 replies; 2+ messages in thread
From: Fabian Grünbichler @ 2026-11-05 14:12 UTC (permalink / raw)
To: pve-devel, Michal Fox
On Tue, 29 Sep 2026 15:48:52 +0200, Michal Fox wrote:
> 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.
>
> [...]
Applied, thanks!
[1/1] fix #7408: guest helpers: activate storage before checking hookscript
commit: b091195887bfb9ac547021293f5b091cc2582d9e
Best regards,
--
Fabian Grünbichler <f.gruenbichler@proxmox.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-05 14:12 UTC | newest]
Thread overview: 2+ messages (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
2026-11-05 14:12 ` applied: " Fabian Grünbichler
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox