diff --git a/sky/provision/common.py b/sky/provision/common.py index a588fbe94e8..6a5f4ac9ac8 100644 --- a/sky/provision/common.py +++ b/sky/provision/common.py @@ -205,7 +205,13 @@ def _get_ips(self, use_internal_ips: bool) -> List[str]: def get_feasible_ips(self, force_internal_ips: bool = False) -> List[str]: """Get external IPs if they exist, otherwise get internal ones.""" - return self._get_ips(not self.has_external_ips() or force_internal_ips) + if self.provider_config is not None: + use_internal_ips = self.provider_config.get('use_internal_ips', + False) + else: + use_internal_ips = False + return self._get_ips(use_internal_ips or not self.has_external_ips() or + force_internal_ips) def get_ssh_ports(self) -> List[int]: """Get the SSH port of all the instances."""