From ea7daa19b1d833bcbca0dff8032ab739fa7ac93e Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Fri, 13 May 2016 16:04:09 -0400 Subject: [PATCH] call get_info() for rmvm -f -p --- xCAT-server/lib/xcat/plugins/kvm.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/plugins/kvm.pm b/xCAT-server/lib/xcat/plugins/kvm.pm index 3458548fb..bc8e305fb 100755 --- a/xCAT-server/lib/xcat/plugins/kvm.pm +++ b/xCAT-server/lib/xcat/plugins/kvm.pm @@ -1764,7 +1764,11 @@ sub rmvm { last; } if ($vol) { - eval { $vol->delete(); }; + eval { + # Need to call get_info() before deleting a volume, without that, delete() will sometimes fail. Issue #455 + $vol->get_info(); + $vol->delete(); + }; if ($@) { xCAT::MsgUtils->trace(0, "e", "kvm: $@"); }