Skip to content

Commit

Permalink
add pre-flight check
Browse files Browse the repository at this point in the history
  • Loading branch information
sethjback committed Dec 18, 2023
1 parent 1a137ca commit c807f01
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions nex-node/prereq.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,18 @@ func CheckPreRequisites(config *NodeConfiguration) {
} else {
fmt.Printf("✅ Located the firecracker executable in path (%s)\n", cyan(firecrackerBinary))
}

if _, err := os.Stat(config.KernelPath); errors.Is(err, os.ErrNotExist) {
fmt.Printf("⛔ Could not access the virtual machine kernel (%s)\n", red(config.KernelPath))
} else {
fmt.Printf("✅ Able to access the virtual machine kernel (%s)\n", cyan(config.KernelPath))
}

if _, err := os.Stat(config.RootFsPath); errors.Is(err, os.ErrNotExist) {
fmt.Printf("⛔ Could not access the virtual machine root fs image (%s)\n", red(config.KernelPath))
} else {
fmt.Printf("✅ Able to access the virtual machine root fs image (%s)\n", cyan(config.KernelPath))
}
}

func writeCniConf(fileName string, networkName string) error {
Expand Down

0 comments on commit c807f01

Please sign in to comment.