Module: VagrantPlugins::SyncedFolderNFSGuest::ProviderVMwareFusion::Cap
- Defined in:
- lib/vagrant-nfs_guest/providers/vmware_fusion/cap/nfs_settings.rb
Class Method Summary collapse
Class Method Details
.nfs_settings(machine) ⇒ Object
11 12 13 14 15 |
# File 'lib/vagrant-nfs_guest/providers/vmware_fusion/cap/nfs_settings.rb', line 11 def self.nfs_settings(machine) host_ip = self.read_host_ip machine_ip = machine.provider.driver.read_ip return host_ip, machine_ip end |
.read_host_ip ⇒ Object
5 6 7 8 9 |
# File 'lib/vagrant-nfs_guest/providers/vmware_fusion/cap/nfs_settings.rb', line 5 def self.read_host_ip # In practice, we need the host's IP on the vmnet device this VM uses. # It seems a bit tricky to get the right one, so let's allow all. return `for N in $(ifconfig | awk -F: '/vmnet/ { print $1; }'); do ifconfig $N | awk '/inet / { print $2; }'; done`.split("\n") end |