Skip to content

applehv can silently downgrade the amount of memory #297

@Salynn

Description

@Salynn

The investigation in containers/podman#25803 has uncovered that this issue can be reproduced with vfkit itself, so it's not an issue of how podman is using vfkit.

Under some circumstances, applehv backed VMs created by vfkit can silently have the amount of RAM seen by the OS downgraded.

Here is what's known:

  • This has not been reproduced for any memory sizes below 63GiB + 1MiB
  • This has not been reproduced on a machine with less than 64GiB of RAM
  • This has (so far) only been reproduced on Intel CPUs (but it's unclear if the attempt on an ARM CPU had sufficient RAM)
  • Virtualization Framework correctly rejects with an error a request for more memory than the host has
  • A slight modification to the Running Linux in a Virtual Machine sample code could not reproduce the issue and was able to create a VM that exposed 64GiB to the guest OS

So far, this issue has only been reproduced with coreos (as used by podman) and Fedora Cloud 42.

I have not yet been able to get vfkit to launch any other image to a point where I could access the system to check on how much memory the OS saw, so I have not been able to test other distributions. Recommendations for other disk images to try would be appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions