cirruslabs / tart

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

Problem with VNC and macOS virtualization #818

Closed rahb3rt closed 1 month ago

rahb3rt commented 1 month ago

tart run sonoma-base --net-bridged en0 --vnc

I am running the above command to create a MacOS VM. With the vnc flag I am unable to vnc into the instance. But without it it opens a UI. Any thoughts on this?

edigaryev commented 1 month ago
  1. What is the origin of sonoma-base? Is it ghcr.io/cirruslabs/macos-sonoma-base:latest or a custom-built VM image?

  2. Once you run the tart run, does the tart ip --wait 30 --resolver=arp sonoma-base return anything?

    • If so, can you SSH into the VM by using this IP address?
rahb3rt commented 1 month ago
tart ip --wait 30 --resolver=arp sonoma-base
192.168.0.66

I can ssh, And I am using your artifact.

But when I run with the vnc flag and it asks for credentials it just does not take them

rahb3rt commented 1 month ago

So as an update I tried --vnc-experimental and that had no issues. but the straight --vnc flag did

edigaryev commented 1 month ago

But when I run with the vnc flag and it asks for credentials it just does not take them

admin as user name and admin as password should work for our VM images.

rahb3rt commented 1 month ago

Yup I tried that and just error'd out

edigaryev commented 1 month ago

Does it work without --net-bridged en0 but with --vnc?

rahb3rt commented 1 month ago

Does it work without --net-bridged en0 but with --vnc?

No it does not, it just sorta hangs there trying to do something but nothing happens

fkorotkov commented 1 month ago

Hey @rahb3rt, could you please elaborate on the exact steps you do and what is not working? When I'm reading you initial comment it seems to me that you see the window but "unable to vnc into the instance" because of username/password. But later in the comments you mention that it "hangs there trying to do something". So what exactly happens when you tart run sonoma-base --net-bridged en0 --vnc?

rahb3rt commented 1 month ago

@fkorotkov when I run tart run sonoma-base --net-bridged en0 --vnc it prompts me to input username and password which I do as admin:admin it then it cancels. When I run tart run Sonoma-base --net-bridged en0 --vnc-experimental it has no issues at all, but I feel like I dont want to be using the experimental version of it if possible.

fkorotkov commented 1 month ago

What do you mean by "it then it cancels"? After you see "Opening vnc://" message in Terminal Tart delegates to Screen Sharing App for the rest. Please make sure you have Screen Sharing App open. So far we can't reproduce the issue and it seems something fishy is with your Screen Sharing App.

rahb3rt commented 1 month ago

@fkorotkov image

image

It says "connecting" and then the window shakes and says no and asks me to re-input my credentials. Unless you do not support the native screen share by Apple with this?

fkorotkov commented 1 month ago

While the window is open, can you ssh into it via admin:admin?

ssh admin@192.168.0.66

Please also make sure that you haven't modified the sonoma-base and inside the VM via tart run sonoma-base you have screen sharing allowed:

Screenshot 2024-05-09 at 11 01 11 AM
rahb3rt commented 1 month ago

@fkorotkov - was able to make it work. I did not press standard performance I chose high performance and that locked me out and wouldnt let me VNC. I deleted my instance and started fresh and this became a non-issue