I am creating two CentOS Boxes with a Vagrantfile, and using two unique host names for them, in their respectibe blocks
box1_config.vm.host_name = "Base1"
box1_config.vm.network:hostonly, "192.168.50.4"
box2_config.vm.host_name = "Base2"
box2_config.vm.network:hostonly, "192.168.50.5"
The OS starts without any issues, but I don’t know what hostname to use to access them.
I tried following as argument to “vagrant ssh”, but none worked and I get error: “This command requires a specific VM name to target in a multi-VM environment”
Tried with:
- host_name
- IP Address
- The VM Name in VirtualBox
Any clues where I might be going wrong?
The argument for vagrant ssh is the symbol attached to the vm definition block. For example (from the vagrant docs):
you would do
or
since those are the names of the box as defined in the config.
HTH.