On Mon, Dec 07, 2020 at 09:58:56AM +0100, Tomáš Golembiovský wrote:
Hi,
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].
Urrrgh. Thanks Tomas, I'll adjust virt-v2v again :-)
Rich.
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...
[2]
https://gerrit.ovirt.org/c/ovirt-engine/+/106692
>
> Am I missing something?
>
> Rich.
>
>
--
Tomáš Golembiovský <tgolembi(a)redhat.com>
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
http://libguestfs.org/virt-builder.1.html