vagrant commands must be executed from the local machine. If you look at your bash prompt, you can still defer (secure shelling) to your virtual machine. You need to log out of the ssh session and then run the vagrant commands on the local computer in the local directory where your Vagrantfile configuration file is Vagrantfile .
You have sshed into a vagrant car. first exit to return to your computer and then do vagrant halt
Hagai source share