Skip to content

Conversation

afbjorklund
Copy link
Member

@afbjorklund afbjorklund commented Sep 7, 2025

This is supposed to be provided by the driver, and passed to the
hostagent as features. The cidata and hostagent doesn't know VZ.

Note: this also excludes the VMOpts.VZ from default and override,
similar to the change made to VMOpts.QEMU already. It is unknown.

@afbjorklund
Copy link
Member Author

afbjorklund commented Sep 7, 2025

Still need to fix VMOpts.VZ in the templates:

templates/docker-rootful.yaml:  {{- if .Instance.Config.VMOpts.VZ.Rosetta.Enabled}}
templates/docker.yaml:  {{- if .Instance.Config.VMOpts.VZ.Rosetta.Enabled}}

It is a bit over-engineered at the moment, since the docker templates don't set VMOpts.
i.e. there is no particular reason why it has to mention the AOT and CDI in the message

@afbjorklund afbjorklund force-pushed the vmopts-rosetta branch 2 times, most recently from 6dd9aad to 8c936aa Compare September 7, 2025 16:20
@AkihiroSuda AkihiroSuda added this to the v2.0.0 milestone Sep 11, 2025
rosettaEnabled := limaDriver.Info().Features.RosettaEnabled
rosettaBinFmt := limaDriver.Info().Features.RosettaBinFmt
// Disable Rosetta in Plain mode
if *inst.Config.Plain {
Copy link
Contributor

Choose a reason for hiding this comment

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

If the hostagent could query the plain mode config to the driver, wouldn't the hostagent be able to pass them to the functions that process the template without touching the contents of the config?

Copy link
Member Author

@afbjorklund afbjorklund Sep 12, 2025

Choose a reason for hiding this comment

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

Yes, it would be possible to move the logic from the hostagent to the guest and the boot scripts and have them read $LIMA_CIDATA_PLAIN instead (if one is willing to make them more "smart" like that)

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, should the hostagent be able to receive the template string used for lima.env from the driver?

Copy link
Member Author

Choose a reason for hiding this comment

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

The lima.env is not handled by the driver, it is hostagent that creates the cidata (which includes lima.env)

@afbjorklund afbjorklund force-pushed the vmopts-rosetta branch 2 times, most recently from e2f09da to a462109 Compare September 19, 2025 05:42
This is supposed to be provided by the driver, and passed to the
hostagent as features. The cidata and hostagent doesn't know VZ.

Note: this also excludes the VMOpts.VZ from default and override,
similar to the change made to VMOpts.QEMU already. It is unknown.

Signed-off-by: Anders F Björklund <[email protected]>
Copy link
Member

@AkihiroSuda AkihiroSuda left a comment

Choose a reason for hiding this comment

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

Thanks

@AkihiroSuda AkihiroSuda merged commit 6ef4970 into lima-vm:master Sep 20, 2025
164 of 171 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants