Skip to content

Conversation

@baude
Copy link
Member

@baude baude commented Jan 7, 2026

Instead of using rpm-ostree, we now use bootc for os apply. the implementation is a little murky right now and will require some cleanup to implement bootc's transports. for now, we only support oci images from registries.

once we have an upgrade command, the transports can be added and the docs for apply can be ammended to be more clear.

Fixes: RUN-3836

Checklist

Ensure you have completed the following checklist for your pull request to be reviewed:

  • Certify you wrote the patch or otherwise have the right to pass it on as an open-source patch by signing all
    commits. (git commit -s). (If needed, use git commit -s --amend). The author email must match
    the sign-off email address. See CONTRIBUTING.md
    for more information.
  • Referenced issues using Fixes: #00000 in commit message (if applicable)
  • Tests have been added/updated (or no tests are needed)
  • Documentation has been updated (or no documentation changes are needed)
  • All commits pass make validatepr (format/lint checks)
  • Release note entered in the section below (or None if no user-facing changes)

Does this PR introduce a user-facing change?

podman machine os apply now uses bootc switch.  at this time, we only support image registries and no additional transports.```

@baude baude marked this pull request as draft January 7, 2026 19:57
@packit-as-a-service
Copy link

tmt tests failed for commit 86c2374. @lsm5, @psss, @thrix please check.

@baude baude added the No New Tests Allow PR to proceed without adding regression tests label Jan 7, 2026
@baude baude marked this pull request as ready for review January 7, 2026 21:32
OCI image.
```
$ podman machine os apply quay.io/podman/machine-os:5.4
$ podman machine os apply quay.io/podman/machine-os:6.1
Copy link
Member

Choose a reason for hiding this comment

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

why do we point the docs to a version that does not yet even exists?

Copy link
Member Author

Choose a reason for hiding this comment

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

good question ... it was a funny position . i didnt want to say 5.8 to 6.0 to set a precedent that it would work, because i am not sure it would. I didn't really want to talk about this in the past, because well ... things have changed.

Copy link
Member Author

Choose a reason for hiding this comment

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

and also, i realized, this will need ta good scrubbing once upgrade is in place and the transports were added in so we have another opportunity to clean this up.

Comment on lines -50 to -52
if exists {
fmt.Println("Pulling from", "containers-storage"+":", imageWithTransport)
dir, err := os.MkdirTemp("", pathSafeString(imageWithTransport))
Copy link
Member

Choose a reason for hiding this comment

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

just to be clear to we no longer plan to support loading from a local image or do you want to add this back later?

Copy link
Member Author

@baude baude Jan 8, 2026

Choose a reason for hiding this comment

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

that would be later ... i want to get upgrade in so we have a full solution. then we need to figure out how to add transports to this command. bootc doesn't use URIs, it uses --transport instead. so the question is do we allow the URIs to continue and then do a split on it OR do we mimic bootc and add a command line option? The latter is cleaner and ensures we don't have confusion of transport URI names.

Copy link
Member

Choose a reason for hiding this comment

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

good question, I don't have a strong opinion. Structurally speaking podman is all about using these transport URI strings for things like pull, push, etc... so it could be weird why only one command does not allow it.

Copy link
Member

Choose a reason for hiding this comment

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

Structurally speaking podman is all about using these transport URI strings for things like pull, push, etc... so it could be weird why only one command does not allow it.

+1

Copy link
Member Author

Choose a reason for hiding this comment

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

initially because i thought the transports would be sufficiently different and that in itself is not good. i can do a comparison once im ready to do that work. i def want to be able to pull it from containers-storage so it will not be forgotten.

}

ostreeCli := []string{"rpm-ostree", "--bypass-driver", "rebase", fmt.Sprintf("ostree-unverified-image:%s", imageWithTransport)}
ostreeCli := []string{"bootc", "switch", image}
Copy link
Member

Choose a reason for hiding this comment

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

oh and just noticed if you repush might as well rename the variable

Copy link
Member Author

Choose a reason for hiding this comment

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

done

Copy link
Member

@l0rd l0rd left a comment

Choose a reason for hiding this comment

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

Tested on arm64 windows using HyperV

args := []string{"podman", "machine", "os", "apply", image}

if err := machine.LocalhostSSH(m.VM.SSH.RemoteUsername, m.VM.SSH.IdentityPath, m.VMName, m.VM.SSH.Port, args); err != nil {
if err := machine.LocalhostSSHShellForceTerm(m.VM.SSH.RemoteUsername, m.VM.SSH.IdentityPath, m.VMName, m.VM.SSH.Port, args); err != nil {
Copy link
Member

Choose a reason for hiding this comment

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

Is this change needed for the bootc command to work or is it a refactoring?

Copy link
Member Author

Choose a reason for hiding this comment

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

that change specifically is so the bootc status(pulling, applying) can be seen by the user; without the use of the ssh terminal, the user would never see it.

Copy link
Member

@ashley-cui ashley-cui left a comment

Choose a reason for hiding this comment

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

LGTM, I'm okay with holding off on transport support on a later PR.

Instead of using rpm-ostree, we now use bootc for os apply.  the
implementation is a little murky right now and will require some cleanup
to implement bootc's transports.  for now, we only support oci images
from registries.

once we have an upgrade command, the transports can be added and the
docs for apply can be ammended to be more clear.

Fixes: RUN-3836

Signed-off-by: Brent Baude <bbaude@redhat.com>
@packit-as-a-service
Copy link

[NON-BLOCKING] Packit jobs failed. @containers/packit-build please check. Everyone else, feel free to ignore.

```

Update the specified Podman machine to latest Podman 5.3 bootable OCI image.
Update the specified Podman machine to latest Podman 6.1 bootable OCI image.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Update the specified Podman machine to latest Podman 6.1 bootable OCI image.
Update the specified Podman machine to the latest Podman 6.1 bootable OCI image.

Copy link
Member

Choose a reason for hiding this comment

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

If you take the note suggestion, drop 6.1 from this line too.

than the client. Unexpected results may occur.

Update the default Podman machine to the most recent Podman 5.4 bootable
Update the default Podman machine to the most recent Podman 6.1 bootable
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Update the default Podman machine to the most recent Podman 6.1 bootable
**NOTE:** The functionality to rebase itself to the content of an OCI image is only available starting with Podman 6.1.
Update the default Podman machine to the most recent Podman bootable

Feel free to tweak the note line if you think it can be worded better.

@baude
Copy link
Member Author

baude commented Jan 9, 2026

@TomSweeneyRedHat i created RUN-3963 to circle back and clean up things once os-upgrade is done and the story is clearer.

Copy link
Member

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

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

LGTM

@Luap99 Luap99 merged commit fd90d33 into containers:main Jan 9, 2026
84 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

machine No New Tests Allow PR to proceed without adding regression tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants