Fix get IP error

This commit is contained in:
Timothyxxx
2024-02-22 20:39:07 +08:00
parent b61984a5ca
commit 938a3bb918

View File

@@ -137,7 +137,7 @@ class DesktopEnv(gym.Env):
logger.info("Getting IP Address...")
for _ in range(max_retries):
try:
output = _execute_command(["vmrun", "-T", "ws", "getGuestIPAddress", self.path_to_vm]).strip()
output = _execute_command(["vmrun", "-T", "ws", "getGuestIPAddress", self.path_to_vm, "-wait"]).strip()
logger.info(f"IP address: {output}")
return output
except Exception as e: