Merge pull request #2194 from dave-tucker/fix-qemu-bug

linuxkit: Fix qemu run behaviour when file does not exist
This commit is contained in:
Rolf Neugebauer 2017-07-13 13:29:14 +01:00 committed by GitHub
commit 425f37890d

View File

@ -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...)