cirruslabs / tart

macOS and Linux VMs on Apple Silicon to use in CI and other automations
https://tart.run
Other
3.67k stars 103 forks source link

"guest has stopped the virtual machine" on M1 Ultra #711

Closed DrGo closed 6 months ago

DrGo commented 6 months ago

after installing tart 2.4.4 and running tart clone ghcr.io/cirruslabs/ubuntu:latest linux

tart run linux gives the error guest has stopped the virtual machine

my setup

 System Software Overview:

      System Version: macOS 14.2.1 (23C71)
      Kernel Version: Darwin 23.2.0
      Boot Volume: Macintosh HD
      Boot Mode: Normal
      Computer Name: xxx
      User Name: xxx
      Secure Virtual Memory: Enabled
      System Integrity Protection: Enabled
      Time since boot: 26 days, 18 hours, 58 minutes

Hardware:

    Hardware Overview:

      Model Name: Mac Studio
      Model Identifier: Mac13,2
      Model Number: Z14K000JWVC/A
      Chip: Apple M1 Ultra
      Total Number of Cores: 20 (16 performance and 4 efficiency)
      Memory: 128 GB
      System Firmware Version: 10151.61.4
      OS Loader Version: 10151.61.4
      Activation Lock Status: Enabled
tart get linux
CPU Memory Disk Display  State
4   4096   0    1024x768 stopped
tart list
Source Name                                                                                              Size State
local  linux                                                                                             0    stopped
oci    ghcr.io/cirruslabs/ubuntu:latest                                                                  0    stopped
oci    ghcr.io/cirruslabs/ubuntu@sha256:f31d309a108fba3af0c07057f20d0b617084f957e1015f0040a0b4859792bd3e 0    stopped
fkorotkov commented 6 months ago

Could you please try growing your VM's disk via tart set ubuntu --disk-size 20. I think this is a regression after https://github.com/cirruslabs/linux-image-templates/pull/7. I'll update documentation shortly.

DrGo commented 6 months ago

Thanks, the set command runs without errors, but tart get still shows zero disk

tart get linux
CPU Memory Disk Display  State
4   4096   0    1024x768 stopped

and tart run fails with the same error

fkorotkov commented 6 months ago

Roger that. Trying to reproduce but I'm with a pretty bad connection at the moment so pulling even 800Mb image is a challenge. I'll get back to you later today once I'm with a better connection. Sorry for your inconvenience.

DrGo commented 6 months ago

No worries at all Is there a way to clear the stopped vms?

fkorotkov commented 6 months ago

You can do 'tart delete' or nuke '$HOME/.tart' to remove everything all together.

DrGo commented 6 months ago

sorry for the multiple questions/reports I tried tart delete which did not error but did not delete the vm folder in ~/.tart. I've deleted the folders manually and recloned the vm image but the disk space is still showing as 0 even running tart set with no errors!

DrGo commented 6 months ago

Also even after the tart delete, nuking the cache folders and recloning tart list is still showing the stopped vms

~> tart list
Source Name                                                                                              Size State
local  linux                                                                                             0    stopped
oci    ghcr.io/cirruslabs/ubuntu:latest                                                                  0    stopped
oci    ghcr.io/cirruslabs/ubuntu@sha256:f31d309a108fba3af0c07057f20d0b617084f957e1015f0040a0b4859792bd3e 0    stopped
fkorotkov commented 6 months ago

The 0 size might be fine since Tart floors the value and shows only actual bytes on disk. You disk.img can be 20GB but physically it's still 800Mb. A little bit of magic and weirdness of Apple FileSystem.

I'm finally with an OK connection and tried to reproduce. Unfortunetly, it worked for me on my M1 Max.

When you run tart run linux do you see an Tart window where Ubuntu it trying to boot? Or it exits right away?

DrGo commented 6 months ago

it exits right a way

edigaryev commented 6 months ago

it exits right a way

Have you tried other VM images (macOS, Debian, Fedora)?

Does this happen with them too?

DrGo commented 6 months ago

this works fine

~> tart clone ghcr.io/cirruslabs/debian:latest deb
pulling manifest...
pulling disk (0.6 GB compressed)...
100%
pulling NVRAM...
~> tart get deb
CPU Memory Disk Display  State
4   4096   1    1024x768 stopped
~> tart set deb --disk-size 40
~> tart get deb
CPU Memory Disk Display  State
4   4096   1    1024x768 stopped
~> tart run deb
DrGo commented 6 months ago

Hi, I wrote a tutorial at https://medium.com/@salah.mahmud/quick-introduction-into-using-tart-for-virtualizing-a-linux-machine-on-a-macos-system-with-apple-88310d6c8cbc still a draft... happy to make any edits you think are appropriate.

fkorotkov commented 6 months ago

Glad it finally worked for you! The blog post also looks great. Thank you for making this tuttorial!

DrGo commented 6 months ago

Thanks.. the tutorial got a great response... Feel free to link to it if you like. I find that easy-to-follow tutorials for new software increases its uptake