Skip to content
This repository has been archived by the owner on Sep 26, 2021. It is now read-only.

Use vmrun to find guest IP #4847

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

lloeki
Copy link

@lloeki lloeki commented Nov 13, 2020

Since there is no more vmnet devices on Big Sur, there's no DHCP lease update either. Find ip using vmrun's own feature first, falling back to the legacy ones next.

Fixes #4846

Since there is no more vmnet devices on Big Sur, there's no DHCP lease update either. Find ip using vmrun's own feature first, falling back to the legacy ones next.

Fixes docker#4846
vmx := d.vmxPath()

ip := regexp.MustCompile(`(\d+\.\d+\.\d+\.\d+)`)
stdout, _, _ := vmrun("getGuestIPAddress", vmx)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this works in VMWare headless mode - there appears to be a bug that requires passing the -wait option to getGuestIPAddress otherwise it returns Error: The VMware Tools are not running in the virtual machine.

Also see machine-drivers/docker-machine-driver-vmware#31 (comment)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

VMware Fusion can't find IP address on Big Sur
2 participants