Please follow the below steps.
==> Open the terminal and fire reboot.
==> Now when the VM start fire sudo service hadoop-master restart
==> sudo jps.
==> Now open a new terminal and fire below commands.
> cd $SPARK_HOME
==> Now open a new terminal and start spark-shell
Please try and let us know if you face any issue.
We are eagerly waiting for your response.