access private VM from other computer over wifi
I have a private network VM for developing on my mac. I'd like for my
android device to be able to communicate with the VM on my mac. Currently
i can visit the IP defined in my Vagrantfile, 10.10.10.10, on my mac and
access it just fine but i can't access it via my phone on the same wifi.
What do i need to do to make it available across my local network and
visible to my phone over wifi?
Here's my Vagrantfile
Vagrant.configure("2") do |config|
config.vm.box = "precise64"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
config.vm.network :private_network, ip: "10.10.10.10"
config.ssh.forward_agent = true
config.vm.provider :virtualbox do |v|
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
v.customize ["modifyvm", :id, "--memory", 1024]
v.customize ["modifyvm", :id, "--name", "PHPBoxWith54"]
end
nfs_setting = RUBY_PLATFORM =~ /darwin/ || RUBY_PLATFORM =~ /linux/
config.vm.synced_folder "./", "/var/www", id: "vagrant-root" , :nfs =>
nfs_setting
config.vm.provision :shell, :inline =>
"if [[ ! -f /apt-get-run ]]; then sudo apt-get update && sudo touch
/apt-get-run; fi"
config.vm.provision :shell, :inline => 'echo -e "mysql_root_password=root
controluser_password=awesome" > /etc/phpmyadmin.facts;'
config.vm.provision :puppet do |puppet|
puppet.manifests_path = "manifests"
puppet.module_path = "modules"
puppet.options = ['--verbose']
end
end
No comments:
Post a Comment