(attempts: number)
| 152 | }; |
| 153 | |
| 154 | const waitSsh = async (attempts: number): Promise<boolean> => { |
| 155 | for (let i = 0; i < attempts; i++) { |
| 156 | if ((await ssh("true")).code === 0) return true; |
| 157 | await sleep(2000); |
| 158 | } |
| 159 | return false; |
| 160 | }; |
| 161 | |
| 162 | const handle: VmHandle = { |
| 163 | os, |