@@ -74,22 +74,24 @@ If any private key under ~/.ssh is protected with a passphrase, you need to have
74
74
if * a .y .Plain {
75
75
return req
76
76
}
77
- req = append (req ,
78
- requirement {
79
- description : "user session is ready for ssh" ,
80
- script : `#!/bin/bash
77
+ if * a .y .VMType != limayaml .EXT {
78
+ req = append (req ,
79
+ requirement {
80
+ description : "user session is ready for ssh" ,
81
+ script : `#!/bin/bash
81
82
set -eux -o pipefail
82
83
if ! timeout 30s bash -c "until sudo diff -q /run/lima-ssh-ready /mnt/lima-cidata/meta-data 2>/dev/null; do sleep 3; done"; then
83
84
echo >&2 "not ready to start persistent ssh session"
84
85
exit 1
85
86
fi
86
87
` ,
87
- debugHint : `The boot sequence will terminate any existing user session after updating
88
+ debugHint : `The boot sequence will terminate any existing user session after updating
88
89
/etc/environment to make sure the session includes the new values.
89
90
Terminating the session will break the persistent SSH tunnel, so
90
91
it must not be created until the session reset is done.
91
92
` ,
92
- })
93
+ })
94
+ }
93
95
94
96
if * a .y .MountType == limayaml .REVSSHFS && len (a .y .Mounts ) > 0 {
95
97
req = append (req , requirement {
@@ -171,20 +173,22 @@ Also see "/var/log/cloud-init-output.log" in the guest.
171
173
172
174
func (a * HostAgent ) finalRequirements () []requirement {
173
175
req := make ([]requirement , 0 )
174
- req = append (req ,
175
- requirement {
176
- description : "boot scripts must have finished" ,
177
- script : `#!/bin/bash
176
+ if * a .y .VMType != limayaml .EXT {
177
+ req = append (req ,
178
+ requirement {
179
+ description : "boot scripts must have finished" ,
180
+ script : `#!/bin/bash
178
181
set -eux -o pipefail
179
182
if ! timeout 30s bash -c "until sudo diff -q /run/lima-boot-done /mnt/lima-cidata/meta-data 2>/dev/null; do sleep 3; done"; then
180
183
echo >&2 "boot scripts have not finished"
181
184
exit 1
182
185
fi
183
186
` ,
184
- debugHint : `All boot scripts, provisioning scripts, and readiness probes must
187
+ debugHint : `All boot scripts, provisioning scripts, and readiness probes must
185
188
finish before the instance is considered "ready".
186
189
Check "/var/log/cloud-init-output.log" in the guest to see where the process is blocked!
187
190
` ,
188
- })
191
+ })
192
+ }
189
193
return req
190
194
}
0 commit comments