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

docs: add rosetta documentation information #8789

Merged
merged 6 commits into from
Sep 11, 2024

Conversation

cdrage
Copy link
Contributor

@cdrage cdrage commented Sep 6, 2024

docs: add rosetta documentation information

What does this PR do?

  • Adds information regarding how rosetta is used for creating machines
    on macOS
  • Also adds a minor title change to WSL doc that is only Windows
    relevant.

Screenshot / video of UI

N/A

What issues does this PR fix or reference?

Closes #7777

How to test this PR?

  • Tests are covering the bug fix or the new feature

Signed-off-by: Charlie Drage [email protected]

@cdrage cdrage requested review from shipsing, slemeur, benoitf and a team as code owners September 6, 2024 16:46
@cdrage cdrage requested review from dgolovin, axel7083 and SoniaSandler and removed request for a team September 6, 2024 16:46
### What does this PR do?

* Adds information regarding how rosetta is used for creating machines
  on macOS
* Also adds a minor title change to WSL doc that is only Windows
  relevant.

### Screenshot / video of UI

<!-- If this PR is changing UI, please include
screenshots or screencasts showing the difference -->

N/A

### What issues does this PR fix or reference?

<!-- Include any related issues from Podman Desktop
repository (or from another issue tracker). -->

Closes containers#7777

### How to test this PR?

<!-- Please explain steps to verify the functionality,
do not forget to provide unit/component tests -->

- [X] Tests are covering the bug fix or the new feature

Signed-off-by: Charlie Drage <[email protected]>
Copy link
Contributor

@shipsing shipsing left a comment

Choose a reason for hiding this comment

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

@cdrage, provided some suggestions for you to consider. Thanks


# Native Apple Rosetta translation layer

Virtual machine's created by Podman Machine use the native Apple hypervisor `applehv` with Rosetta enabled by default. This increases the speed of any `x86_64` builds or containers to near-native levels by using a translation layer.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Virtual machine's created by Podman Machine use the native Apple hypervisor `applehv` with Rosetta enabled by default. This increases the speed of any `x86_64` builds or containers to near-native levels by using a translation layer.
On macOS, Podman machine creates a virtual machine that uses the native `applehv` Apple hypervisor with Rosetta enabled by default. This increases the speed of any `x86_64` builds or containers to near-native levels by using a translation layer.


For more information, refer to the [official Apple documentation](https://developer.apple.com/documentation/virtualization/running_intel_binaries_in_linux_vms_with_rosetta) regarding the Rosetta technology.

Rosetta support is **enabled by default** on all new Podman Machine installations. If you disable Rosetta, [qemu](https://www.qemu.org/) will instead be used.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Rosetta support is **enabled by default** on all new Podman Machine installations. If you disable Rosetta, [qemu](https://www.qemu.org/) will instead be used.
Rosetta support is enabled by default on all new Podman machine installations. If you disable Rosetta, [qemu](https://www.qemu.org/) will instead be used.

We should reserve the bold formatting only for actual clickable items in the UI. Otherwise, this formatting might confuse readers.
If we want to highlight this piece of information, we can put it in a note.


#### Procedure

To enable Rosetta support, your Podman Machine instance must be re-created.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
To enable Rosetta support, your Podman Machine instance must be re-created.
To enable Rosetta support, re-create your Podman machine instance:


To enable Rosetta support, your Podman Machine instance must be re-created.

1. Delete your Podman Machine.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
1. Delete your Podman Machine.
1. Delete your Podman machine.


![rosetta](img/rosetta.png)

3. Re-create your Podman Machine.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
3. Re-create your Podman Machine.
3. Re-create your Podman machine.

Can we link to this content: https://66db43672b43eb7a8e0846fb--podman-desktop-pr.netlify.app/docs/podman/creating-a-podman-machine for a user's reference?


If `rosetta = false` does _not_ exist, or is missing, Rosetta is already enabled by default.

You can also benchmark
Copy link
Contributor

@shipsing shipsing Sep 10, 2024

Choose a reason for hiding this comment

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

You can also benchmark is this piece really relevant? If yes, can we add some more context? What do we mean by benchmark in this case??


To verify that Rosetta has been enabled, check your `~/.config/containers/containers.conf` configuration.

If `rosetta = false` does _not_ exist, or is missing, Rosetta is already enabled by default.
Copy link
Contributor

Choose a reason for hiding this comment

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

does not exist or is missing sounds the same thing. What does it actually depict?
In the procedure part above, we asked users to enable the Rosetta support and here, we are saying Rosetta is already enabled by default. --- contradictory statements.

Should we simply say:
Open your containers.conf file
Check that the value of the rosetta parameter is set to true.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

rosetta parameter is true by default, but does not show in containers.conf.

The doc is more intended for users who haven't upgraded past 5.0.0 yet, or with to disable / enable rosetta support.

Signed-off-by: Charlie Drage <[email protected]>
@cdrage
Copy link
Contributor Author

cdrage commented Sep 10, 2024

@shipsing updated! thanks for the review :)

@shipsing
Copy link
Contributor

LGTM, @cdrage
Just a minor comment: Since we have now added an additional resources section in the end. We can remove this particular line from the intro paragraph: For more information, refer to the official Apple documentation regarding the Rosetta technology.

Both the references point to the same page.

Signed-off-by: Charlie Drage <[email protected]>
@cdrage
Copy link
Contributor Author

cdrage commented Sep 11, 2024

LGTM, @cdrage Just a minor comment: Since we have now added an additional resources section in the end. We can remove this particular line from the intro paragraph: For more information, refer to the official Apple documentation regarding the Rosetta technology.

Both the references point to the same page.

Done! THank you :)

@cdrage cdrage enabled auto-merge (squash) September 11, 2024 12:38
@cdrage cdrage merged commit cb16fa4 into containers:main Sep 11, 2024
15 of 16 checks passed
@podman-desktop-bot podman-desktop-bot added this to the 1.13.0 milestone Sep 11, 2024
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.

Separate documentation page on Rosetta support for Mac M1 for building amd64 binaries
3 participants