Skip to content

Commit 9a4a350

Browse files
committed
vm/qemu: debug boot
1 parent 9ebf9c2 commit 9a4a350

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

vm/qemu/qemu.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,10 +345,14 @@ func (pool *Pool) Create(ctx context.Context, workdir string, index int) (vmimpl
345345
if err := ctx.Err(); err != nil {
346346
return nil, err
347347
}
348+
from := time.Now()
348349
inst, err := pool.ctor(workdir, sshkey, sshuser, index)
350+
log.Logf(0, "boot(idx=%d): attempt=%d took=%v err=%v",
351+
index, i, time.Since(from), err)
349352
if err == nil {
350353
return inst, nil
351354
}
355+
352356
if errors.Is(err, vmimpl.ErrCantSSH) {
353357
// It is most likely a boot crash, just return the error as is.
354358
return nil, err

0 commit comments

Comments
 (0)