Index: /trunk/include/VBox/com/array.h
===================================================================
--- /trunk/include/VBox/com/array.h	(revision 37552)
+++ /trunk/include/VBox/com/array.h	(revision 37553)
@@ -168,4 +168,5 @@
 #include "VBox/com/ptr.h"
 #include "VBox/com/assert.h"
+#include "iprt/cpp/list.h"
 
 #ifdef VBOX_WITH_XPCOM
@@ -1008,4 +1009,19 @@
         return *this;
     }
+
+    /**
+     * Returns a copy of this SafeArray as RTCList<T>.
+     */
+	RTCList<T> toList()
+	{
+		RTCList<T> list(size());
+		for (size_t i = 0; i < size(); ++i)
+#ifdef VBOX_WITH_XPCOM
+			list.append(m.arr[i]);
+#else
+			list.append(m.raw[i]);
+#endif
+		return list;
+	}
 
     inline void initFrom(const com::SafeArray<T> & aRef);
Index: /trunk/include/VBox/com/list.h
===================================================================
--- /trunk/include/VBox/com/list.h	(revision 37552)
+++ /trunk/include/VBox/com/list.h	(revision 37553)
@@ -196,13 +196,4 @@
 };
 
-//template <typename T> RTCList<T> SafeArrayToRTCList(ComSafeArrayIn(T, other), T* = 0)
-//{
-//    com::SafeArray<T> sfaOther(ComSafeArrayInArg(other));
-//    RTCList<T> list(sfaOther.size());
-//    for (size_t i = 0; i < sfaOther.size(); ++i)
-//        list.append(sfaOther[i]);
-//    return list;
-//}
-
 #endif /* !___VBox_com_list_h */
 
Index: /trunk/src/VBox/Main/src-server/MachineImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/MachineImpl.cpp	(revision 37552)
+++ /trunk/src/VBox/Main/src-server/MachineImpl.cpp	(revision 37553)
@@ -6083,11 +6083,7 @@
     /* Convert the options. */
     RTCList<CloneOptions_T> optList;
-    if (options != NULL)
-    {
-         com::SafeArray<CloneOptions_T> sfaOpts(ComSafeArrayInArg(options));
-         for (size_t i = 0; i < sfaOpts.size(); ++i)
-             optList.append(sfaOpts[i]);
-//        optList = SafeArrayToRTCList<CloneOptions_T>(ComSafeArrayInArg(options));
-    }
+	if (options != NULL)
+		optList = com::SafeArray<CloneOptions_T>(ComSafeArrayInArg(options)).toList();
+		
     AssertReturn(!optList.contains(CloneOptions_Link), E_NOTIMPL);
     AssertReturn(!(optList.contains(CloneOptions_KeepAllMACs) && optList.contains(CloneOptions_KeepNATMACs)), E_FAIL);
