Thanks Oliver for the quick response! Let me add more detail information for my requirements.
Actually, we have had some discussion within Security and Migration teams on migration tests, take the below cases as example:
http://openqa.suse.de/tests/8445566#
we can see the job setting: "BOOTFROM =d", the the backend qemu command sets cdrom as "bootindex=0"
-device scsi-cd,id=cd0-device,drive=cd0-overlay0,bootindex=0,serial=cd0
https://openqa.suse.de/tests/8571022
we can see the job setting: "BOOT_HDD_IMAGE=1", the the backend qemu command sets virtio disk as "bootindex=0"
-device virtio-blk,id=hd0-device,drive=hd0-overlay0,bootindex=0,serial=hd0
Seems we can only set "bootindex=0" here, based on our test requirement, we may need set "bootindex=1" for other boot devices if possible.
It will help much for our test with this change, especially for offline migration tests, since we used to attach both virtio disk and cdrom at the same time in qemu backend, we may need set them as "boot order = 0,1".
Current logic is we set bootindex=0 for cdrom device, and in boot menu, we switch to "boot from disk" every time we try to boot the disk device.
http://openqa.suse.de/tests/8445566#step/boot_to_desktop/2
In openQA automation tests, if we can define virtio-disk as 1st boot device, and set cdrom as 2nd boot device, then after booting from disk, once we exit from grub2 phase, it will switch to cdrom boot by default.
Please feel free to let me know if any concerns.