mirror of
https://github.com/getcompanion-ai/computer-host.git
synced 2026-04-15 09:01:12 +00:00
fix: put mmds data after config-file boot for guest personalization
This commit is contained in:
parent
73cdf2eb74
commit
a1e8eb758a
1 changed files with 12 additions and 0 deletions
|
|
@ -137,6 +137,18 @@ func (r *Runtime) Boot(ctx context.Context, spec MachineSpec, usedNetworks []Net
|
||||||
}
|
}
|
||||||
socketPath := procSocketPath(firecrackerPID)
|
socketPath := procSocketPath(firecrackerPID)
|
||||||
|
|
||||||
|
if spec.MMDS != nil && spec.MMDS.Data != nil {
|
||||||
|
client := newAPIClient(socketPath)
|
||||||
|
if err := waitForSocket(ctx, client, socketPath); err != nil {
|
||||||
|
cleanup(network, paths, command, firecrackerPID)
|
||||||
|
return nil, fmt.Errorf("wait for firecracker socket: %w", err)
|
||||||
|
}
|
||||||
|
if err := client.PutMMDS(ctx, spec.MMDS.Data); err != nil {
|
||||||
|
cleanup(network, paths, command, firecrackerPID)
|
||||||
|
return nil, fmt.Errorf("put mmds data: %w", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
now := time.Now().UTC()
|
now := time.Now().UTC()
|
||||||
state := MachineState{
|
state := MachineState{
|
||||||
ID: spec.ID,
|
ID: spec.ID,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue