Index: /trunk/src/VBox/Main/MachineImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/MachineImpl.cpp	(revision 35008)
+++ /trunk/src/VBox/Main/MachineImpl.cpp	(revision 35009)
@@ -4296,5 +4296,5 @@
     //    and must be closed first, or closing the parents will fail because they will
     //    children);
-    // 2) media from the youngest snapshots followed those from the parent snapshots until
+    // 2) media from the youngest snapshots followed by those from the parent snapshots until
     //    the root ("first") snapshot of the machine
     // This order allows for closing the media on this list from the beginning to the end
@@ -4402,9 +4402,12 @@
 
         Utf8Str bstrLocation = pMedium->getLocationFull();
+
+        bool fDoesMediumNeedFileDeletion = pMedium->isMediumFormatFile();
+
         // close the medium now; if that succeeds, then that means the medium is no longer
         // in use and we can add it to the list of files to delete
         rc = pMedium->close(&pTask->llRegistriesThatNeedSaving,
                             mediumAutoCaller);
-        if (SUCCEEDED(rc))
+        if (SUCCEEDED(rc) && fDoesMediumNeedFileDeletion)
             pTask->llFilesToDelete.push_back(bstrLocation);
     }
Index: /trunk/src/VBox/Main/MediumImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/MediumImpl.cpp	(revision 35008)
+++ /trunk/src/VBox/Main/MediumImpl.cpp	(revision 35009)
@@ -2953,4 +2953,18 @@
 {
     return m->formatObj;
+}
+
+/**
+ * Internal method that returns true if the medium is represented by a file on the host disk
+ * (and not iSCSI or something).
+ * @return
+ */
+bool Medium::isMediumFormatFile() const
+{
+    if (    m->formatObj
+         && (m->formatObj->getCapabilities() & MediumFormatCapabilities_File)
+       )
+        return true;
+    return false;
 }
 
Index: /trunk/src/VBox/Main/include/MediumImpl.h
===================================================================
--- /trunk/src/VBox/Main/include/MediumImpl.h	(revision 35008)
+++ /trunk/src/VBox/Main/include/MediumImpl.h	(revision 35009)
@@ -171,4 +171,5 @@
     const Utf8Str& getFormat() const;
     const ComObjPtr<MediumFormat> & getMediumFormat() const;
+    bool isMediumFormatFile() const;
     uint64_t getSize() const;
     DeviceType_T getDeviceType() const;
