From 5612718b0f859d1216dde8cf7f4b81aa8ebcd90a Mon Sep 17 00:00:00 2001 From: Phil Estes Date: Thu, 27 Apr 2017 13:33:03 -0400 Subject: [PATCH] The `-drive` parameter for qemu run requires more flags To use `-drive` as an analog for `-hda` or `-hdb`, etc. the qemu docs note that "media" and "index" are required flags. Local testing shows that drive shows up properly as `/dev/sda` after this change. Signed-off-by: Phil Estes --- src/cmd/linuxkit/run_qemu.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmd/linuxkit/run_qemu.go b/src/cmd/linuxkit/run_qemu.go index 6a0f7aa70..87ebee801 100644 --- a/src/cmd/linuxkit/run_qemu.go +++ b/src/cmd/linuxkit/run_qemu.go @@ -238,7 +238,7 @@ func buildQemuCmdline(config QemuConfig) (QemuConfig, []string) { } if config.DiskPath != "" { - qemuArgs = append(qemuArgs, "-drive", "file="+config.DiskPath+",format=qcow2") + qemuArgs = append(qemuArgs, "-drive", "file="+config.DiskPath+",format=qcow2,index=0,media=disk") } // Check flags for iso/uefi boot and if so disable kernel boot