Get started with VM

I’ll be jiggered if I know which category to post this in, but since I’m beginning with VMs I’m plumping for Get Started. I’m running Git Bash on a Windows 7 PC. I’ve created a shell script in my home directory which contains the following commands:

#!/bin/bash
cd ~/homestead_improved-master
bin/folderfix.sh
vagrant up

A minor irritation is that I cannot seem to run the script from the home directory by simply entering homestead.sh - but have to enter either ./homestead.sh or ~/homestead.sh.

When I’m done with Vagrant, I try vagrant halt but I get a message:

A Vagrant environment or target machine is required to run this
command. Run vagrant init to create a new Vagrant environment. Or,
get an ID of a target machine from vagrant global-status to run
this command on. A final option is to change to a directory with a
Vagrantfile and to try again.

If I run vagrant global-status to get the vagrant machine id and then vagrant halt fe31855 my VM closes down.

Can I do anything to make life easier for myself? (Being a lazy little Git - pun intended).

1 Like