Skip to content

Commit b28badf

Browse files
authored
Merge pull request #16 from anyvm-org/dev
fix openindiana on apple_silicon
2 parents 9b90b81 + 1669010 commit b28badf

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

anyvm.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2925,6 +2925,7 @@ def sync_scp(ssh_cmd, vhost, vguest, sshport, hostid_file, ssh_user):
29252925
"-o", "StrictHostKeyChecking=no",
29262926
"-o", "UserKnownHostsFile={}".format(SSH_KNOWN_HOSTS_NULL),
29272927
"-o", "LogLevel=ERROR",
2928+
"-o", "BatchMode=yes",
29282929
"-o", "ConnectTimeout=10",
29292930
] + sources + ["{}@127.0.0.1:".format(ssh_user) + vguest + "/"])
29302931

@@ -4499,6 +4500,8 @@ def supports_ansi_color(stream):
44994500
"-o", "StrictHostKeyChecking=no",
45004501
"-o", "UserKnownHostsFile={}".format(SSH_KNOWN_HOSTS_NULL),
45014502
"-o", "LogLevel=ERROR",
4503+
"-o", "BatchMode=yes",
4504+
"-o", "ConnectTimeout=10",
45024505
]
45034506
if hostid_file:
45044507
ssh_base_cmd.extend(["-i", hostid_file])
@@ -4613,6 +4616,13 @@ def supports_ansi_color(stream):
46134616
should_sync = False
46144617

46154618
if should_sync:
4619+
# On slow emulated systems (like Apple Silicon running x86),
4620+
# Solaris/OpenIndiana services might need a moment to settle after SSH becomes responsive
4621+
# to avoid 'logout without login' audit errors.
4622+
is_apple_silicon = (platform.system() == 'Darwin' and platform.machine() == 'arm64')
4623+
if is_apple_silicon and config['os'] == 'openindiana':
4624+
log("Apple Silicon detected: waiting 5s for OpenIndiana services to settle...")
4625+
time.sleep(5)
46164626
sync_vm_time(config, ssh_base_cmd)
46174627

46184628
# Post-boot config: Setup reverse SSH config inside VM

0 commit comments

Comments
 (0)