Github user koushik-das commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/792#discussion_r39827592 --- 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 -- @DaanHoogland Are you suggesting to log the full exception? Currently only the message is getting logged. The destroyUnattachedVBD is a best-effort call to cleanup VBDs.
--- 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. ---