Retrieve a VM based on the ID.

def _get_vm_by_id(vmid, allDetails=False):
    '''
    Retrieve a VM based on the ID.
    '''
    for vm_name, vm_details in six.iteritems(get_resources_vms(includeConfig=allDetails)):
        if six.text_type(vm_details['vmid']) == six.text_type(vmid):
            return vm_details

    log.info('VM with ID "%s" could not be found.', vmid)
    return False