Possible to get SSH server address from shell script or directly from Parallels?

I use Windows virtual machines on macOS via Parallels. It is useful from time to time to SSH into these VMs. However, the IP address of the VMs changes on each boot, and the name is not available to resolve from the macOS host.

Parallels does, fortunately, provide both an API and a CLI for retrieving a VM's IP address.

Is it possible to configure a Core Tunnel item to get the remote address from a shell script? Failing that, does Core Tunnel have Parallels integration for this - or might consider adding this in the near future?

Thanks,
-Dan

There is a workaround that much simpler – edit your hosts file:

When IP address of the VMs changed, just update your hosts file, and flush DNS cache, then you're all set.

It's also possible automate above actions through shell script or AppleScript.

Another option might be dynamic DNS, have your VMs register with a dynamic DNS server running somewhere on your network.