From 68f3ec3f8b3bdfb527e7ad14fc245a261a62d179 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Tue, 12 Mar 2024 18:33:15 +0100 Subject: [PATCH] esxi: clean-up state-dir in deactivate storage to ensure we always query a new one on quick add-delete-add cycles. Signed-off-by: Thomas Lamprecht --- src/PVE/Storage/ESXiPlugin.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/PVE/Storage/ESXiPlugin.pm b/src/PVE/Storage/ESXiPlugin.pm index c4795c4..72776e8 100644 --- a/src/PVE/Storage/ESXiPlugin.pm +++ b/src/PVE/Storage/ESXiPlugin.pm @@ -346,6 +346,10 @@ sub deactivate_storage { my ($class, $storeid, $scfg, $cache) = @_; $class->esxi_unmount($storeid, $scfg); + + my $rundir = run_path($storeid); + remove_tree($rundir); # best-effort, ignore errors for now + } sub activate_volume {