From 73831285bf5f85af95bb202f0349545f45ac278f Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Mon, 24 Feb 2020 22:56:07 +0000 Subject: [PATCH] qemu: Always add serial= for disks This is used for device enumeration order, and is required for NVMe drives apparently. Hit this while trying to use a NVMe device as a target for coreos-install testing (not primary disk). --- platform/qemu.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/platform/qemu.go b/platform/qemu.go index 8911ed03b..0816c6cbb 100644 --- a/platform/qemu.go +++ b/platform/qemu.go @@ -403,6 +403,9 @@ func (builder *QemuBuilder) addDiskImpl(disk *Disk, primary bool) error { diskOpts := disk.DeviceOpts if primary { diskOpts = append(diskOpts, "serial=primary-disk") + } else { + // Note that diskId is incremented by addQcow2DiskFd + diskOpts = append(diskOpts, "serial="+fmt.Sprintf("disk%d", builder.diskId)) } channel := disk.Channel if channel == "" {