Github user DaanHoogland commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/792#discussion_r39499607 --- Diff: plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/CitrixResourceBase.java --- @@ -3407,6 +3390,18 @@ public void handleSrAndVdiDetach(final String iqn, final Connection conn) throws removeSR(conn, sr); } + protected void destroyUnattachedVBD(Connection conn, VM vm) { + try { + for (VBD vbd : vm.getVBDs(conn)) { + if (Types.VbdType.DISK.equals(vbd.getType(conn)) && !vbd.getCurrentlyAttached(conn)) { + vbd.destroy(conn); + } + } + } catch (final Exception e) { + s_logger.debug("destroyUnattachedVBD failed due to " + e.toString()); --- End diff -- maybe add the exception or/and catch more specific exceptions
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---