[tools][qemu] Managing device boot order with bootindex
Hello tool team experts,
Can I ask for your kindly help to see if we can set boot order for VMs with qemu backend?
We used to set bootindex=0 for disk or cdrom, but I don't know if we can set the boot order for different devices with bootindex proertity.
For example, I need set:
If we have multiple boot devices, we can set the boot order for them.
- Due date set to 2022-05-08
- Category set to Support
- Status changed from New to Feedback
- Assignee set to okurz
- Target version set to Ready
It is possible to use either boot indeces or the bootorder parameter, see https://qemu.readthedocs.io/en/latest/system/bootindex.html . I don't know what to help. Maybe you can explain in more details what the requirement is unless the mentioned URL already helps you enough.
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:
we can see the job setting: "BOOTFROM =d", the the backend qemu command sets cdrom as "bootindex=0"
we can see the job setting: "BOOT_HDD_IMAGE=1", the the backend qemu command sets virtio disk as "bootindex=0"
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.
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.
Ok, so I guess adding a test variable for setting the boot index of a specific device would help you. E.g. we could implement the following:
That would be a presumably easy change in
- Due date deleted (
- Category changed from Support to Feature requests
- Status changed from Feedback to New
- Assignee deleted (
- Priority changed from Normal to Low
- Target version changed from Ready to future