Skip to content

podman machine: image override files need user-write access #27576

@baude

Description

@baude

Issue Description

While doing some testing today, I learned that at least for qemu machines, qemu-img requires user write access or we get an error. This is probably true for all providers but we need to check that.

❯ podman machine init --image builds/latest/x86_64/rhcos-10.1.20251017-0-qemu.x86_64.qcow2 test
Extracting compressed file: test-amd64.qcow2: done  
qemu-img: Could not open '/home/baude/.local/share/containers/podman/machine/qemu/test-amd64.qcow2': Could not open '/home/baude/.local/share/containers/podman/machine/qemu/test-amd64.qcow2': Permission denied
Error: resizing image: "exit status 1"

and

❯ ls -l builds/latest/x86_64/rhcos-10.1.20251017-0-qemu.x86_64.qcow2
-r--r--r--. 1 baude baude 1950744576 Nov 20 15:21 builds/latest/x86_64/rhcos-10.1.20251017-0-qemu.x86_64.qcow2

Steps to reproduce the issue

Steps to reproduce the issue
1.
2.
3.

Describe the results you received

Describe the results you received

Describe the results you expected

Describe the results you expected

podman info output

If you are unable to run podman info for any reason, please provide the podman version, operating system and its version and the architecture you are running.

Podman in a container

No

Privileged Or Rootless

None

Upstream Latest Release

Yes

Additional environment details

Additional environment details

Additional information

Additional information like issue happens only occasionally or issue happens with a particular architecture or on a particular setting

Metadata

Metadata

Assignees

No one assigned

    Labels

    Good First IssueThis issue would be a good issue for a first time contributor to undertake.kind/bugCategorizes issue or PR as related to a bug.machinetriagedIssue has been triaged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions