Skip to content

Commit 72c0d9d

Browse files
committed
Add startup warning
1 parent 6c9b877 commit 72c0d9d

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

cmd/api/api/cp.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,4 +419,3 @@ func (s *ApiService) handleCopyFrom(ctx context.Context, ws *websocket.Conn, ins
419419
}
420420
return bytesReceived, nil
421421
}
422-

cmd/api/main.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import (
2323
"github.com/onkernel/hypeman/cmd/api/api"
2424
"github.com/onkernel/hypeman/cmd/api/config"
2525
"github.com/onkernel/hypeman/lib/guest"
26+
"github.com/onkernel/hypeman/lib/hypervisor/qemu"
2627
"github.com/onkernel/hypeman/lib/instances"
2728
mw "github.com/onkernel/hypeman/lib/middleware"
2829
"github.com/onkernel/hypeman/lib/oapi"
@@ -125,6 +126,11 @@ func run() error {
125126
}
126127
logger.Info("KVM access verified")
127128

129+
// Check if QEMU is available (optional - only warn if not present)
130+
if _, err := (&qemu.Starter{}).GetBinaryPath(nil, ""); err != nil {
131+
logger.Warn("QEMU not available - QEMU hypervisor will not work", "error", err)
132+
}
133+
128134
// Validate log rotation config
129135
var logMaxSize datasize.ByteSize
130136
if err := logMaxSize.UnmarshalText([]byte(app.Config.LogMaxSize)); err != nil {

0 commit comments

Comments
 (0)