Class 'Drupal\user\Entity\User' not found when running drush I am trying to run a drush on functional Drupal 7 site, however, the attempt of run drush ends with an error saying: Class 'Drupal\user\Entity\User' not found in /usr/local/share/drush/lib/Drush/Boot/DrupalBoot.php, line 571.

Any idea what may be happening?

Full output:

vagrant@1843vm:/var/www/drupalvm/drupal/web$ drush
PHP Fatal error:  Class 'Drupal\user\Entity\User' not found in /usr/local/share/drush/lib/Drush/Boot/DrupalBoot.php on line 571
[error]  Drush command terminated abnormally due to an unrecoverable error.
Error: Class 'Drupal\user\Entity\User' not found in /usr/local/share/drush/lib/Drush/Boot/DrupalBoot.php, line 571 
[error]  Drush was not able to start (bootstrap) Drupal.
Hint: This error can only occur once the database connection has already been successfully initiated, therefore this error generally points to a site configuration issue, and not a problem connecting to the database.

Drush was attempting to connect to: 
 drupal-version         :  7.50                                              
 drupal-settings-file   :  sites/default/settings.php                        
 uri                    :  http://default                                    
 db-driver              :  mysql                                             
 db-hostname            :  localhost                                         
 db-username            :  root                                              
 db-password            :  123                                               
 db-name                :  il                                                
 db-port                :                                                    
 install-profile        :  standard                                          
 db-status              :  Connected                                         
 theme                  :  intelligent_life                                  
 admin-theme            :  seven                                             
 php-bin                :  /usr/bin/php                                      
 php-os                 :  Linux                                             
 php-conf               :  /etc/php/5.6/cli/php.ini                          
 drush-script           :  /usr/local/share/drush/drush.php                  
 drush-version          :  9.0-dev-g1c91f8b                                  
 drush-temp             :  /tmp                                              
 drush-conf             :                                                    
 drush-alias-files      :  /home/vagrant/.drush/drupalvm.aliases.drushrc.php 
 root                   :  /var/www/drupalvm/drupal/web                      
 site                   :  sites/default                                     
 modules                :  sites/all/modules                                 
 themes                 :  sites/all/themes                                  
 files                  :  sites/default/files                               
 temp                   :  /tmp                                              
 %paths                 :  /var/www/drupalvm/drupal/web                      
                       sites/default                                     
                       sites/all/modules                                 
                       sites/all/themes                                  
                       sites/default/files                               
                       /tmp`
I had the same problem, it's related to the Drush version used by the DrupalVM.
You can change the Drush version in the config.yml file.

More info: https://github.com/geerlingguy/drupal-vm/issues/1020