diff --git a/src/cmd/linuxkit/run_qemu.go b/src/cmd/linuxkit/run_qemu.go index 354e1bdae..f072c0d54 100644 --- a/src/cmd/linuxkit/run_qemu.go +++ b/src/cmd/linuxkit/run_qemu.go @@ -170,6 +170,9 @@ func runQemu(args []string) { // user not trying to boot off ISO or kernel, so assume booting from a disk image if !*kernelBoot && !*isoBoot { + if _, err := os.Stat(path); err != nil { + log.Fatalf("Boot disk image %s does not exist", path) + } // currently no way to set format, but autodetect probably works d := Disks{DiskConfig{Path: path}} disks = append(d, disks...)