-
Notifications
You must be signed in to change notification settings - Fork 661
vz: lima managed vm hangs with high CPU usage intermittently. #1609
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
Comments
@vsiravar Before sleep was there any high intensive task running in vm ? |
No, it's quite intermittent.
Not really, I just have a hello-world container running in the vm. I have not experienced this behaviour with qemu. |
@vsiravar When it hangs you can check from ui and see if vm is accessible. This will give an idea if the issue is with network/with vm itself |
Sure, will try this out. Thanks! |
@ningziwen could you also try enabling display as mentioned above and see ?? Also do share you template which you used. |
@balajiv113 Sorry I didn't get what it means. Would you like to do screen recording and upload the video? Or using any GUI? Could you point me the instruction if it is GUI? |
@ningziwen
This will give us a idea if there are some issues with network/whole vm itself. |
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 |
@balajiv113 Hey. Did you get any reply from Apple? Is the support ticket link sharable? |
Updated ticket description and title based on new behaviour observed. |
Maybe once #1659 is resolved you can look at the |
Confirming that this is still happening ( |
I am also experiencing the same issue. Just started using limactl instead of other VM providers. First had to deal with the time shift, so I have added the following timedatectl set-ntp no
apt update
apt install -y ntp Now, every morning get to the high CPU usage, and cannot access my VMs. |
I started a lima virtual machine with the following command, and logged in to the virtual machine background from video using root limactl create --name=default template://docker \
--cpus=2 --memory=4 --vm-type=vz --mount-writable=true \
--disk=5 --network=lima:user-v2 --rosetta --video
limactl start How can I confirm whether it is a problem with the virtual machine network or the m1 virtualization service? I have encountered both of the following situations:
How can I help identify the problem in the above two situations? lima version |
@balajiv113 Was able to catch the following in the network log when this occurs:
Unsure if this is relevant. The network process seems to remain alive. |
I tried disabling rosetta but that did not help. Something interesting I noticed though is that after disabling rosetta, when the vm hangs, cpu is pinned at half the allocated cpu. Pinned at 100% when allocated 2 cpu. But when rosetta is enabled it's usually pinned at 200%. |
After upgrading my M2 Mac mini to Sonoma, I've been encountering this issue frequently. Yesterday, I noticed that one of my Lima VM and an UTM VM (both utilizing the virtualization.framework) froze simultaneously. The UTM VM works after killing and restarting it. However, the Lima VM fails to restart after a In addition, my Colima VM, also running on vz, has been experiencing frequent hangs as well. I can always resolve it by using the |
I'm able to reproduce this issue almost every time when starting a large docker compose project (which I'm unable to share unfortunately). Today I noticed something new. I opened the system log utility to view any logs related to virtualization during one of these events. Doing so I was able to get some logs that seem interesting:
These logs occur very close to when the the vm begins to hang. From my naive perspective this kind of seems like the os may be killing the virtualization process or severely throttling it for using too much cpu. Does that seem possible? I tried setting the vm's cpu limit to the number of cores my machine has but am still able to reproduce this. Side note: I'm strangely able to set the number of cpu to a number larger than my machine has. The final log occurs some time after the vm begins to hang. |
I have the same issue with qemu. Running the same command will sometimes work and sometimes freeze the vm, requiring a You have already raised a ticket with Apple, but would it be possible to double-check and confirm if in your scenario the behaviour is reproducible using qemu instead of vz? |
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 shell <vm name>
.Once the vm gets to this state
All limactl commands fail.
Workaround
The way around it is to recreate vm.
Related issue
docker/for-mac#6655
Expected behaviour
That the vm should not hang when the computer wakes up from sleep.
Host info
The text was updated successfully, but these errors were encountered: