lima: vz: lima managed vm hangs with high CPU usage intermittently.

Problem

Virtualization Framework intermittently starts consuming 100%-220%(from Activity Monitor) CPU and is unresponsive. This leads to all limactl commands being unresponsive or failing. This intermittently happens when the lima vm is started and left alone for a while.

Behaviour observed

  • limactl commands hang such as limactl shell <vm name>.
  • sometimes the command fails with RC 255

Once the vm gets to this state All limactl commands fail.

Workaround

The way around it is to recreate vm.

Related issue

https://github.com/docker/for-mac/issues/6655

Expected behaviour

That the vm should not hang when the computer wakes up from sleep.

Host info

macOS version: 13.4
cpu brand: Apple M1 Pro
lima version: 0.16.0

About this issue

  • Original URL
  • State: open
  • Created a year ago
  • Reactions: 6
  • Comments: 20 (10 by maintainers)

Most upvoted comments

I tired the above steps myself. Haven’t got high cpu usage but the freeze happens.

On checking the GUI during the freeze even that was not responsive so i think the freeze happens on virtualization.framework level not on network.

I have also raised a support ticket with Apple with the same info.

Note: This happens to me on M1 only. My intel runs smooth for weeks with sleep and wake cases