Try running the following commands on your VM terminal:
sudo -u hdfs hadoop fs -mkdir /user/hive/warehouse
sudo -u hdfs hadoop fs -chmod g+w /tmp
sudo -u hdfs hadoop fs -chmod g+w /user/hive/warehouse
sudo -u hdfs hadoop fs -chown -R training /user/hive/warehouse
sudo chmod 777 /var/lib/hive/metastore
cd /var/lib/hive/metastore/metastore_db/
sudo rm *.lck
This should be able to fix the metastore instantiation issue that you are facing in hadoop.