From 9534035a66d2f5bda0e3fdde8f12659cb4a347e1 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Thu, 23 Apr 2020 22:01:38 +0000 Subject: [PATCH] devshell: Fatally error if there's no disk Previously if one had just `cosa build ostree` then `cosa run`, qemu just stalls out confused. (But this would be a bit better with https://github.com/coreos/coreos-assembler/pull/1380 so someone review that please!) --- mantle/cmd/kola/qemuexec.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mantle/cmd/kola/qemuexec.go b/mantle/cmd/kola/qemuexec.go index 64e6a72d64..6c66edd701 100644 --- a/mantle/cmd/kola/qemuexec.go +++ b/mantle/cmd/kola/qemuexec.go @@ -116,6 +116,9 @@ func runQemuExec(cmd *cobra.Command, args []string) error { if directIgnition { return fmt.Errorf("Cannot use devshell with direct ignition") } + if kola.QEMUOptions.DiskImage == "" { + return fmt.Errorf("No disk image provided") + } ignitionFragments = append(ignitionFragments, "autologin") cpuCountHost = true usernet = true