[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Libguestfs] [PATCH] ovf: Try to set BiosType correctly according to the oVirt sources.


On Fri, Dec 04, 2020 at 12:53:06PM +0000, Richard W.M. Jones wrote:
> Tomas, what do you think about this?
> As far as I can tell we are not setting the BiosType correctly in any
> current scenario.

Yes, we are.

> Mostly we set it to "0" (cluster default), and I
> guess we can get away with that most of the time.  For UEFI guests we
> set it to "2" which simply seems wrong.
> The patch tries to adjust the BiosType so it actually matches what the
> oVirt source code says.

It's not really intuitive (not to mention undocumented), but there is a
difference from what oVirt reads from OVF and how the Bios types are
represented internally. Basically all values are shifted by one. See the
'+1' in [1]. The change corresponding to the hack is here [2].

When they introduced cluster default in 4.4 development they did not
realize it is used also by others. When we spotted the mistake it was
already quite late and changing the enum to the original state was
already out of question. So this hack was born.

If virt-v2v wanted to set it to cluster default it can be done by
omitting <BiosType> element altogether or by setting custom="false"
attribute. Specifying negative value for <BiosType> should also work but
I'd rather not rely on that.

[1] https://github.com/oVirt/ovirt-engine/blob/master/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfReader.java#L699
[2] https://gerrit.ovirt.org/c/ovirt-engine/+/106692

> Am I missing something?
> Rich.

Tomáš Golembiovský <tgolembi redhat com>

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]