[pve-devel] [PATCH v6 pve-storage 2/6] Proper check if VM/CT is running
mir at datanom.net
mir at datanom.net
Mon Jun 19 16:44:23 CEST 2017
From: Michael Rasmussen <mir at datanom.net>
Signed-off-by: Michael Rasmussen <mir at datanom.net>
---
PVE/Storage/FreeNASPlugin.pm | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/PVE/Storage/FreeNASPlugin.pm b/PVE/Storage/FreeNASPlugin.pm
index 771061e..c438519 100644
--- a/PVE/Storage/FreeNASPlugin.pm
+++ b/PVE/Storage/FreeNASPlugin.pm
@@ -1072,8 +1072,13 @@ sub free_image {
sub volume_resize {
my ($class, $scfg, $storeid, $volname, $size, $running) = @_;
+ my $run = PVE::QemuServer::check_running($vmid);
+ if (!$run) {
+ $run = PVE::LXC::check_running($vmid);
+ }
+
die 'mode failure - unable to resize disk(s) on a running system due to FreeNAS bug.<br />
- See bug report: <a href="https://bugs.freenas.org/issues/24432" target="_blank">#24432</a><br />' if $running;
+ See bug report: <a href="https://bugs.freenas.org/issues/24432" target="_blank">#24432</a><br />' if $run;
my ($vtype, $name, $vmid) = $class->parse_volname($volname);
--
2.11.0
----
This mail was virus scanned and spam checked before delivery.
This mail is also DKIM signed. See header dkim-signature.
More information about the pve-devel
mailing list