https://progress.opensuse.org/https://progress.opensuse.org/themes/openSUSE/favicon/favicon.ico?15829177842022-04-24T17:48:13ZopenSUSE Project Management ToolopenQA Project - action #110229: [tools][qemu] Managing device boot order with bootindexhttps://progress.opensuse.org/issues/110229?journal_id=5132022022-04-24T17:48:13Zokurzokurz@suse.com
<ul><li><strong>Due date</strong> set to <i>2022-05-08</i></li><li><strong>Category</strong> set to <i>Support</i></li><li><strong>Status</strong> changed from <i>New</i> to <i>Feedback</i></li><li><strong>Assignee</strong> set to <i>okurz</i></li><li><strong>Target version</strong> set to <i>Ready</i></li></ul><p>It is possible to use either boot indeces or the bootorder parameter, see <a href="https://qemu.readthedocs.io/en/latest/system/bootindex.html" class="external">https://qemu.readthedocs.io/en/latest/system/bootindex.html</a> . 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.</p>
openQA Project - action #110229: [tools][qemu] Managing device boot order with bootindexhttps://progress.opensuse.org/issues/110229?journal_id=5132172022-04-25T02:20:24Zrfan1richard.fan@suse.com
<ul></ul><p>Thanks Oliver for the quick response! Let me add more detail information for my requirements.<br>
Actually, we have had some discussion within Security and Migration teams on migration tests, take the below cases as example:</p>
<p><a href="http://openqa.suse.de/tests/8445566#" class="external">http://openqa.suse.de/tests/8445566#</a><br>
we can see the job setting: "BOOTFROM =d", the the backend qemu command sets cdrom as "bootindex=0"</p>
<pre><code class="html syntaxhl" data-language="html">-device scsi-cd,id=cd0-device,drive=cd0-overlay0,bootindex=0,serial=cd0
</code></pre>
<p><a href="https://openqa.suse.de/tests/8571022" class="external">https://openqa.suse.de/tests/8571022</a><br>
we can see the job setting: "BOOT_HDD_IMAGE=1", the the backend qemu command sets virtio disk as "bootindex=0"</p>
<pre><code class="html syntaxhl" data-language="html">-device virtio-blk,id=hd0-device,drive=hd0-overlay0,bootindex=0,serial=hd0
</code></pre>
<p>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.</p>
<p>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".</p>
<p>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.<br>
<a href="http://openqa.suse.de/tests/8445566#step/boot_to_desktop/2" class="external">http://openqa.suse.de/tests/8445566#step/boot_to_desktop/2</a></p>
<p>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.</p>
<p>Please feel free to let me know if any concerns.</p>
openQA Project - action #110229: [tools][qemu] Managing device boot order with bootindexhttps://progress.opensuse.org/issues/110229?journal_id=5132352022-04-25T03:22:56Zrfan1richard.fan@suse.com
<ul></ul><p>In summary,</p>
<p>My requirement is:</p>
<p>Based on our job setting:<br>
"BOOTFROM =d" or "BOOT_HDD_IMAGE=1", then in qemu backend command, one boot device is set to "bootindex=0".</p>
<p>I want to set another boot device to "bootindex=1" if possible.</p>
openQA Project - action #110229: [tools][qemu] Managing device boot order with bootindexhttps://progress.opensuse.org/issues/110229?journal_id=5137722022-04-26T12:15:36Zmkittlermarius.kittler@suse.com
<ul></ul><p>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:</p>
<ul>
<li><code>BOOT_INDEX_ISO=n</code> would set <code>bootindex=n</code> for <code>ISO</code></li>
<li><code>BOOT_INDEX_HDD_i=n</code> would set <code>bootindex=n</code> for <code>HDD_i</code></li>
</ul>
<p>That would be a presumably easy change in <code>configure_blockdevs</code> (in <code>os-autoinst/OpenQA/Qemu/Proc.pm</code>).</p>
openQA Project - action #110229: [tools][qemu] Managing device boot order with bootindexhttps://progress.opensuse.org/issues/110229?journal_id=5138382022-04-27T01:09:30Zrfan1richard.fan@suse.com
<ul></ul><p>Thank you <a class="user active user-mention" href="https://progress.opensuse.org/users/22072">@mkittler</a>, that should be great!</p>
openQA Project - action #110229: [tools][qemu] Managing device boot order with bootindexhttps://progress.opensuse.org/issues/110229?journal_id=5139372022-04-27T07:18:39Zokurzokurz@suse.com
<ul><li><strong>Due date</strong> deleted (<del><i>2022-05-08</i></del>)</li><li><strong>Category</strong> changed from <i>Support</i> to <i>Feature requests</i></li><li><strong>Status</strong> changed from <i>Feedback</i> to <i>New</i></li><li><strong>Assignee</strong> deleted (<del><i>okurz</i></del>)</li><li><strong>Priority</strong> changed from <i>Normal</i> to <i>Low</i></li><li><strong>Target version</strong> changed from <i>Ready</i> to <i>future</i></li></ul><p><a class="user active user-mention" href="https://progress.opensuse.org/users/34730">@rfan1</a> I think with the ideas given in <a class="issue tracker-4 status-1 priority-3 priority-lowest" title="action: [tools][qemu] Managing device boot order with bootindex (New)" href="https://progress.opensuse.org/issues/110229#note-4">#110229#note-4</a> this is something you could try to add yourself. Feel welcome to provide even an incomplete draft pull request for <a href="https://github.com/os-autoinst/os-autoinst" class="external">https://github.com/os-autoinst/os-autoinst</a> and we can provide help in the pull request.</p>
openQA Project - action #110229: [tools][qemu] Managing device boot order with bootindexhttps://progress.opensuse.org/issues/110229?journal_id=5139462022-04-27T07:24:35Zrfan1richard.fan@suse.com
<ul></ul><p>Thank you <a class="user active user-mention" href="https://progress.opensuse.org/users/17668">@okurz</a>, let me try to do that.</p>