Virtual Network automatically removed from default cluster when creating VM

Please, describe the problem here and provide additional information below (if applicable) …

All Virtual Networks are allocated in default cluster. When creating VM this below error comes:

[TemplateInstantiate] Error allocating a new virtual machine template. Missing clusters. Network for NIC 0 is not in any cluster

All Virtual network are removed from cluster automatically. How to resolve this issue


Versions of the related components and OS (frontend, hypervisors, VMs):
Frontend: 5.2.1
OS: CentOS7

Steps to reproduce:

Add all Virtual networks in default cluster
Create multiple VMs using that Virtual network
Then this error comes

Current results:

[TemplateInstantiate] Error allocating a new virtual machine template. Missing clusters. Network for NIC 0 is not in any cluster

Expected results:

VM gets created without error from default cluster

Thanks for the feedback, this is being address for upcoming 5.8 (to be release next week)