50

It is common that programmers will need to interface with virtual-machines in their day-to-day workflows, and one popular way of doing so on Linux and Windows systems is with virt-manager.

Is their a way to get virt-manager or a similar alternative running on a MacOS machine?

Adam E.
481 silver badge8 bronze badges
asked Oct 13, 2010 at 8:13
2
  • 2
    This question seems off-topic on stackoverflow, should be moved to a different site of the stackexchange network like askdifferent. Commented Nov 7, 2015 at 10:46
  • instead of voting for the closure consider to relocate the question and all helpful answers to the appropriate site - will be way more helpful for everyone Commented Oct 30, 2019 at 14:44

4 Answers 4

67

There's now a brew formula homebrew-virt-manager which I've used to successfully connect to a CentOS 5 box running qemu+kvm.

brew tap jeffreywildman/homebrew-virt-manager
brew install virt-manager virt-viewer
sudo ln -s /usr/bin/python /usr/bin/python2
virt-manager -c qemu+ssh://user@libvirthost/system?socket=/var/run/libvirt/libvirt-sock
answered Aug 5, 2015 at 17:35
Sign up to request clarification or add additional context in comments.

8 Comments

Small question: how do I find out what my qemu+ssh connection string is? What user/socket should I use?
I followed your steps and I cannot pass the third step. $ sudo ln -s /usr/bin/python /usr/bin/python2 Password: ln: /usr/bin/python2: Operation not permitted Then I have problem in step four. $ virt-manager -c qemu+ssh://user@debianserver/system?socket=/var/run/libvirt/libvirt-sock --no-fork env: python2: No such file or directory
@hatted: If you're running OS X El Capitan, this is because of the new "System Integrity Protection" feature which prevents modification of the System folder outside of Installer or Software Update. One way to fix is by adding an alias in your shell rc instead of creating a symlink. alias python2=/usr/bin/python
I needed to copy my ssh key to libvirthost for this to work.
Doesn't work on macOS Sierra :/
|
23

sadly no, you can however install virt-manager on a linux box and run it on your mac desktop through vnc and X11.

what you need to do is start X11, open xterm (command + N), type ssh -X user@linux-box, then type virt-manager once logged on.

answered Oct 23, 2010 at 21:14

4 Comments

extra requirement for Mountain Lion onwards: you will need to run XQuartz in place of X11 (it's the community X11 started by Apple)
Technically you don't need vnc, just X11 (or XQuartz)
True, but X is much slower over distances than VNC for interacting with the VMs. I use X for virt-manager and VNC for the VMs.
You can skip the extra Linux installation altogether and forward X11 over SSH for Virt-Manager oroborosx.sourceforge.net/remotex.html -- and also use VNC to connect to the virtual machines by configuring it to access your KVM server's IP address with different ports for each VM (e.g. port 5900 for VM 1, 5901 for VM 2, etc.)
5

Same problem here, tried several solutions and workarounds, and found that for managing virtual machines on a remote Qemu/KVM server nothing is as reliable and comfortable than a GNU/Linux system running virt-manager.

Our best solution so far is to install Virtualbox in MacOS to run a Lubuntu LTS system with virt-manager.

We found Lubuntu excellent for this purpose: it just works, it's easy to use and requires few resources to run (it can use less than 300 MB of RAM to run virt-manager and 3-4 SPICE clients). You can save this Virtualbox machine state when you don't need it, and restore it in a few seconds when needed.

Moreover, there's irony in running a virtual machine locally to manage remote virtual machines! :-)


Update

Someone prepared a vagrantfile to quickly setup an Ubuntu virtual machine and run virt-manager via ssh. See:

https://st-g.de/2016/08/virt-manager-in-vagrant

answered Jan 31, 2017 at 14:55

1 Comment

This is a brilliant solution!!! I got this working in about 5 minutes.
3

AFAIK no, but you can use it alright if you do this:

  1. install (in the host) the NoMachine NX server
  2. install the NX client on your mac
  3. login from the mac
  4. fix the keyboard issues following these instructions
  5. open virt-manager in the gnome session in your server/host (that you are using via the NX client)
  6. have fun
answered Jan 3, 2012 at 19:25

3 Comments

requires having X on the host
I normally do ssh -Y linuxbox virt-manager from OS X machine.
HDave do you know any virt-manager that doesn't? (require X on the host?)

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.