mirror of
https://github.com/getcompanion-ai/computer-host.git
synced 2026-04-16 14:01:04 +00:00
fix: seed mmds data via --metadata flag at boot, eliminates race with guest init
This commit is contained in:
parent
9dd606f26a
commit
44bd0ff089
4 changed files with 32 additions and 17 deletions
|
|
@ -66,7 +66,7 @@ func configureMachine(ctx context.Context, client *apiClient, paths machinePaths
|
|||
return nil
|
||||
}
|
||||
|
||||
func launchJailedFirecracker(paths machinePaths, machineID MachineID, firecrackerBinaryPath string, jailerBinaryPath string, enablePCI bool, configFilePath string) (*exec.Cmd, error) {
|
||||
func launchJailedFirecracker(paths machinePaths, machineID MachineID, firecrackerBinaryPath string, jailerBinaryPath string, enablePCI bool, configFilePath string, metadataFilePath string) (*exec.Cmd, error) {
|
||||
args := []string{
|
||||
"--id", string(machineID),
|
||||
"--uid", strconv.Itoa(os.Getuid()),
|
||||
|
|
@ -81,6 +81,9 @@ func launchJailedFirecracker(paths machinePaths, machineID MachineID, firecracke
|
|||
}
|
||||
if configFilePath != "" {
|
||||
args = append(args, "--config-file", configFilePath)
|
||||
if metadataFilePath != "" {
|
||||
args = append(args, "--metadata", metadataFilePath)
|
||||
}
|
||||
} else {
|
||||
args = append(args,
|
||||
"--log-path", paths.JailedFirecrackerLogPath,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue