Skip to content

Conversation

@Prashanth684
Copy link
Contributor

For aarch64, we need to specify the firmware to be efi so the loader and the nvram is correctly
populated with the appropriate files for machine creation.

This actually started in #213 similar to what was done in the terraform provider, but the newer
libvirt-go-xml libraries support setting of this attribute making things easier

For aarch64, we need to specify the firmware to be efi so the loader and the nvram is correctly
populated with the appropriate files for machine creation.

This actually started in openshift#213 similar to what was done in the terraform provider, but the newer
libvirt-go-xml libraries support setting of this attribute making things easier
@openshift-ci-robot openshift-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 3, 2020
// reference: https://libvirt.org/formatdomain.html#bios-bootloader
if arch == "aarch64" {
domainDef.OS.Firmware = "efi"
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am ok with hardcoding this for aarch64, but do we want to expose this through the machine provider api so it can be set through the installer and this code can be arch agnostic?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok..on second thought .. probably not...this is a basic property of aarch64...better to leave it as is and keep things simple

Copy link
Contributor

Choose a reason for hiding this comment

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

It must not be so basic, otherwise it would be the libvirt default ;) I agree with leaving this as is for now, as I don't think cluster-api-provider-libvirt should support arbitrary VM configurations. This is one case where it should be able to pick up the correct value needed by openshift. For x86_64, the efi switch would happen when we start using the q35 machine type.

@Prashanth684 Prashanth684 changed the title WIP: Set firmware attribute in libvirt domain for aarch64 Set firmware attribute in libvirt domain for aarch64 Dec 3, 2020
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 3, 2020
github.com/libvirt/libvirt-go-xml v4.6.0+incompatible h1:dL2JDzkEtsiZkPh42KHvLt208wgNfO40IsBjHtaXohs=
github.com/libvirt/libvirt-go-xml v4.6.0+incompatible/go.mod h1:oBlgD3xOA01ihiK5stbhFzvieyW+jVS6kbbsMVF623A=
github.com/libvirt/libvirt-go v5.10.0+incompatible h1:01fwkdUHH2hk4YyFNCr48OvSGqXYLzp9cofUpeyeLNc=
github.com/libvirt/libvirt-go v5.10.0+incompatible/go.mod h1:34zsnB4iGeOv7Byj6qotuW8Ya4v4Tr43ttjz/F0wjLE=
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think it's required to bump libvirt-go, only libvirt-go-xml should be needed? If you bump the libvirt-go dependency, this can cause unexpected failures to run the installer (if you build on a system where libvirt 5.10 is installed and you then try to run it on a system with libvirt 4.6 installed). I'd prefer to keep the libvirt-go dependency unchanged if possible.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i changed libvirt-go and libvirt-go-xml to match that of the openshift installer. I thought it would be good to keep both in sync? in any case the installer uses the same versions so should be fine ?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think the installer upgraded to a newer version indirectly (it updated another module which needed a newer version). This caused issues fwiw openshift/installer#4339
Since we already bit the bullet with the installer, we can try changing it here as well :)

@cfergeau
Copy link
Contributor

cfergeau commented Dec 3, 2020

/approve
/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Dec 3, 2020
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cfergeau

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 3, 2020
@Prashanth684
Copy link
Contributor Author

/retest

@openshift-merge-robot openshift-merge-robot merged commit b57e18b into openshift:master Dec 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants