When attempting to make a VM compliant in VMware Cloud Director an error is returned with:org.hibernate.NonUniqueResultException: query did not return a unique result: 2 at org.hibernate.impl.AbstractQueryImpl.uniqueElement(AbstractQueryImpl.java:844)
VMware Cloud Director 10.6.x
There was a failure when VMs were migrating between Org VDCs or they were moved outside of Cloud Director.
There are several possible resolutions:
- Clone the VMs, remove the cloud UUID from the vmx file, and re-import the VMs.
- Follow Error "query did not return a unique result: 2" when deleting a vApp or VM
- Follow Error: "Internal Server Error - query did not return a unique result: 2; nested exception is org.hibernate.NonUniqueResultException" occurs when attempting to set a new default sizing policy