diff --git a/lib/cmdlib.py b/lib/cmdlib.py
index cf4d90220182fe211fe3546d73ded3a9ced45790..afc801f9a42a50237ca101fac1f4989168ca718c 100644
--- a/lib/cmdlib.py
+++ b/lib/cmdlib.py
@@ -10297,7 +10297,7 @@ class LUInstanceCreate(LogicalUnit):
     """
     if self.op.opportunistic_locking:
       # Only consider nodes for which a lock is held
-      node_whitelist = self.owned_locks(locking.LEVEL_NODE)
+      node_whitelist = list(self.owned_locks(locking.LEVEL_NODE))
     else:
       node_whitelist = None
 
@@ -11241,7 +11241,7 @@ class LUInstanceMultiAlloc(NoHooksLU):
 
     if self.op.opportunistic_locking:
       # Only consider nodes for which a lock is held
-      node_whitelist = self.owned_locks(locking.LEVEL_NODE)
+      node_whitelist = list(self.owned_locks(locking.LEVEL_NODE))
     else:
       node_whitelist = None