Hello -
I am trying to setup a VM to be able to reach from Host - using api version 2.
I am using Salt for provisioning.
I tried the configuration as follows:
...
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "precise64"
config.vm.define :dbms do |dbms|
dbms.vm.network :private_network, ip: "172.16.1.09"
dbms.vm.hostname = "dbms"
config.vm.provision :salt do |salt|
salt.minion_config = "provision/saltstack/minion"
salt.run_highstate = true
end
end
...
However I cannot reach the VM from host with a ping 172.16.1.09. I tried ping from directory Vagrantfile is in.
Then I tried: dbms.vm.network :hostonly, "172.16.1.09"
This given an error.
It seems from documentation hostonly should work. Just wondering what I may be doing wrong?
Also, I want to be able to ssh into this host VM from any directory, not just where Vagrantfile is in.
WIl that be possible?
...
And eventually I would ideally like to run as public network.
Vagrant.configure("2") do |config|
config.vm.network "public_network"
end
I would like to be able to assign it an IP and be able to always access it by that IP. My network router assigns IP by MAC addresses I have set up.
Will something like that be possible in this configuration so I can get a specific IP?
Meaning I would like to have this DBMS box always have a certain IP so I can access it from another machine on the network. I would prefer not to use port forwarding if I can.
Look forward to your help.
Thank you.