Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cosalib/ova: template VMware HW and OS versions from image.yaml; enable UEFI #2762

Merged
merged 3 commits into from
Mar 18, 2022
Merged

Conversation

bgilbert
Copy link
Contributor

@bgilbert bgilbert commented Mar 17, 2022

FCOS and RHCOS want to set different VMware hardware versions and OS type IDs. Read both from image.yaml, defaulting to the values we currently use.

OVF images created by VMware Workstation 16.2.3 respectively record Fedora and RHEL 8 guests as:

    <OperatingSystemSection ovf:id="100" vmw:osType="fedora64Guest">
    <OperatingSystemSection ovf:id="80" ovf:version="8" vmw:osType="rhel8_64Guest">

The ovf:id values are defined to come from CIM_OperatingSystem.OsType, which defines 80 as RedHat Enterprise Linux 64-Bit and 100 as Linux 2.6.x 64-Bit. (2.6.x seems to be the last explicit kernel version listed in the spec.) ovf:version appears to be the major version of the OS. VMware's ovftool doesn't seem to care about either of those fields, only the vmw:osType, so we hardcode the ovf:id to 100 and call it a day.

While we're at it, switch to UEFI, which we can do even with hardware version 13. Disable Secure Boot, though, due to coreos/ignition#1092.

For coreos/fedora-coreos-tracker#1119. Alternative to #2740. Fixes coreos/fedora-coreos-config#1494.

We don't use this for anything, and other values are not likely to be
drop-in replacements.
Copy link
Member

@cgwalters cgwalters left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor nit, otherwise LGTM!

src/cosalib/ova.py Outdated Show resolved Hide resolved
bgilbert added a commit to coreos/fedora-coreos-config that referenced this pull request Mar 17, 2022
Stick with hardware version 13 for now, but switch the OS ID from RHEL 7
to 64-bit Fedora.

For coreos/coreos-assembler#2762.
bgilbert and others added 2 commits March 17, 2022 14:37
FCOS and RHCOS want to set different VMware hardware versions and OS
type IDs.  Read both from image.yaml, defaulting to the values we
currently use.

OVF images created by VMware Workstation 16.2.3 respectively record
Fedora and RHEL 8 guests as:

    <OperatingSystemSection ovf:id="100" vmw:osType="fedora64Guest">
    <OperatingSystemSection ovf:id="80" ovf:version="8" vmw:osType="rhel8_64Guest">

The ovf:id values are defined to come from CIM_OperatingSystem.OsType,
which defines 80 as "RedHat Enterprise Linux 64-Bit" and 100 as
"Linux 2.6.x 64-Bit".  (2.6.x seems to be the last explicit kernel version
listed in the spec.)  ovf:version appears to be the major version of the
OS.  VMware's ovftool doesn't seem to care about either of those fields,
only the vmw:osType, so we hardcode the ovf:id to 100 and call it a day.
Disable Secure Boot due to coreos/ignition#1092.

Co-authored-by: Joseph Callen <[email protected]>
@bgilbert
Copy link
Contributor Author

Updated!

@bgilbert
Copy link
Contributor Author

/retest

1 similar comment
@bgilbert
Copy link
Contributor Author

/retest

@bgilbert bgilbert merged commit abcbd34 into coreos:main Mar 18, 2022
@bgilbert bgilbert deleted the vmware branch March 18, 2022 22:27
HuijingHei pushed a commit to HuijingHei/fedora-coreos-config that referenced this pull request Oct 10, 2023
Stick with hardware version 13 for now, but switch the OS ID from RHEL 7
to 64-bit Fedora.

For coreos/coreos-assembler#2762.
HuijingHei pushed a commit to HuijingHei/fedora-coreos-config that referenced this pull request Oct 10, 2023
Stick with hardware version 13 for now, but switch the OS ID from RHEL 7
to 64-bit Fedora.

For coreos/coreos-assembler#2762.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Switch OVA to use EFI by default
3 participants