Catch the error, if the dataset doesn't exists.
If it will not catched, you can't remove a VM.
---
 PVE/Storage/ZFSPoolPlugin.pm | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/PVE/Storage/ZFSPoolPlugin.pm b/PVE/Storage/ZFSPoolPlugin.pm
index 6b095f1..d3bb0fd 100644
--- a/PVE/Storage/ZFSPoolPlugin.pm
+++ b/PVE/Storage/ZFSPoolPlugin.pm
@@ -338,6 +338,9 @@ sub zfs_delete_zvol {
        if ($err = $@) {
            if ($err =~ m/^zfs error:(.*): dataset is busy.*/) {
                sleep(1);
+           } elsif ($err =~ m/^zfs error:.*: dataset does not exist.*$/) {
+               $err = undef;
+               last;
            } else {
                die $err;
            }
-- 
2.1.4


_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to