public List<VirtualMachine> findVirtualMachinesNotAllocatedCompatibleHypervisor(
final Hypervisor hypervisor)
{
Criteria criteria = createCriteria();
criteria.createAlias(VirtualMachine.VIRTUAL_MACHINE_TEMPLATE_PROPERTY, "template");
criteria.createAlias(VirtualMachine.VIRTUAL_IMAGE_CONVERSION_PROPERTY, "conversion",
JoinFragment.LEFT_OUTER_JOIN);
criteria.createAlias("conversion."
+ VirtualImageConversion.VIRTUAL_MACHINE_TEMPLATE_PROPERTY, "masterconversion",
JoinFragment.LEFT_OUTER_JOIN);
criteria.add(Restrictions.and(Restrictions.isNull(VirtualMachine.HYPERVISOR_PROPERTY),