14 comments

[ 2.6 ms ] story [ 42.0 ms ] thread
There's also a good argument for using qemu without libvirt, for those who dislike libvirt's complexity. See eg https://news.ycombinator.com/item?id=19737289

libvirt is most useful if you use it to abstract over different virtualization backends, like vmware/kvm/lxd etc.

What is the abstraction layer for virtualization natively available in MacOSX?
It’s the Hypervisor Framework:

https://developer.apple.com/documentation/hypervisor

which Apple oddly is introducing for Intel Macs only in MacOS 11, at the same time they’re introducing support for non Intel ‘Apple hardware’ Macs.

The Hypervisor framework has been in macOS since at least Mojave (if not longer, this is just what I began using it), it's not new to macOS 11.
They might be introducing a GUI or something, which is what it still lacks (there are some 3rd-party products out there, none particularly impressive last I checked).
Parallels can interface with the Hypervisor Framework instead of it's own, so there is at least one decent GUI. However performance compared to the Parallels hypervisor is very poor.

I would be interested in an Apple VM app overlay for the integrated Hypervisor though! And hopefully we see some speed improvements. :)

Seems like Apple Silicon support is already there? https://developer.apple.com/documentation/hypervisor/apple_s...
And there is direct hardware support for it in Apple Silicon. It's going to be very interesting to see where things end up with Apple Silicon and what they choose to put in their silicon that would never see the light of day on Intel or other CPUs aimed for broader markets.
Small tweak: you do not need to install RealVNC Viewer. macOS already comes with a high performance VNC client:

/System/Library/CoreServices/Applications/Screen Sharing.app

You can drag it to the Dock or use Spotlight to find it, as it is indexed by default.

When I tried using the built in VNC client, it asked for a password and wouldn't accept any value I gave it. I only got QEMU to work with 3rd party VNC viewers. If somebody can figure out how to use the built in one, that would be great.
I'm uncertain specifically what VNC connects to in the vm situation. Is it 127.0.0.1 or the address of the vm?

Maybe you have screen sharing already turned on?

  netstat -an -p tcp
(is anything on port 5900?)

Anyway, I use screen sharing a lot using SSH port forwarding on macos.

If a maching foo is running a vnc server, I put something like this in .ssh/config:

  Host foo
    (other settings)
    LocalForward 5900 localhost:5900
to make screen sharing accessible, I add it to the dock.

select finder. then open a folder in finder:

  command-shift-G /System/Library/CoreServices/Applications
Drag "Screen Sharing.app" to the dock.

Then log into the remote machine:

  $ ssh foo
  <etc>
  foo$ 
Now back to the dock click on Screen Sharing.

It will ask you for a host name. Enter 127.0.0.1 and press connect.

this will connect to localhost:5900 which ssh will port forward to foo and dump on foo's localhost:5900

bottom line - you will connect to foo port 5900 via screen sharing.

Or use Finder “Connect to...” in one of the menus (cmd-k) and type in VNC://ip.address.goes.here