MacOS Direct Connect To KVM Client Desktop
Recently I have been experimenting with a tiny KVM setup. Everything is good till I want to use my Mac Mini to connect to the client desktop.
I spend so much time trying and the most successful setup is through Linux running inside VirtualBox.
However that seems overkill and take up a lot of resource on the Mac Mini. I continue to push with other solution and finally come up with a satisfying setup.
Issue with OS X connecting to KVM client
The most common way to KVM client running graphical interface is through KVM manager. Though that will work locally on the KVM host out of the box, it proves to be difficult even from another Linux server, and require a lot of research and tweaking for people new to KVM. However there is a easy solution for MacOS.
Homebrew
Homebrew allow Linux package to be installed and ran on OS X system. Follow instruction on Homebrew:
|
|
virt-viewer/remote-viewer
Though homebrew core include virt-manager
, it does not have virt-viewer
. We need to add a tap from jeffreywildman
:
|
|
Then install virt-viewer with following command
|
|
There are two ways to use virt-viewer
: virt-viewer
and remote-viewer
.
virt-viewer
The command virt-viewer
can connect through the virt framework, make it easy to connect to vm with NAT network. This requires a connection string and the vm name. Connecting from MacOS, the connection string is in following format:
|
|
The full command will be as follow:
|
|
Replace <user@hostname>
and <vm name>
for your environment.
remote-viewer
In contra to virt-viewer
, the command remote-viewer
has a gui and make direct connection to target vm.
XQuartz
XQuartz is no longer required for virt-viewer. However, if you find your MacOS / OS X still need it, obtain it here.
MacOS virt-manager
Check out MacOS Connect to KVM Client Desktop for using virt-manager
on MacOS to manage and connect remote KVM.