Virt manager mac os

davesilva / virt-manager-macos.md

If you have a Linux machine with KVM on it, you can manage those VMs remotely from a Mac using virt-manager.

Step 1: Allow your user non-root access to KVM

SSH to the Linux machine and add your SSH user to the libvirt group

Running id $(whoami) should list the libvirt group. You may also need to edit /etc/libvirt/libvirtd.conf to ensure that the socket has the right owner and permissions. Make sure you have these lines in there:

you should now be able to manage your VMs from the Linux machine without root access. If you open virt-manager locally on the Linux machine (assuming it’s not headless) you will no longer be prompted to enter your password.

Step 2: Install virt-manager for Mac OS

As stated in the readme, you can install it using

Step 3: Connect virt-manager to the Linux machine over SSH

First you need to ensure that you’re using an SSH key rather than a password to log into the Linux machine. If you connect over ssh without specifying a password then you should be good.

If you try to tell virt-manager to connect over SSH by just specifying the hostname it might not work though. You’ll see an error like End of file while reading data: nc: unix connect failed: No such file or directory: Input/output error . The file it’s referring to is the libvirtd socket and the reason it can’t find it is because it’s looking in the wrong place. It’s looking for the sock file in /usr/local/lib but it actually lives at /var/run/libvirt/libvirt-sock (at least it does on Debian). Luckily there’s a query param you can pass in the SSH URL to override the socket location:

That should allow virt-manager to connect and let you manage your VMs.

Источник

Manage virtual machines with virt-manager

The virt-manager application is a desktop user interface for managing virtual machines through libvirt. It primarily targets KVM VMs, but also manages Xen and LXC (linux containers). It presents a summary view of running domains, their live performance & resource utilization statistics. Wizards enable the creation of new domains, and configuration & adjustment of a domain’s resource allocation & virtual hardware. An embedded VNC and SPICE client viewer presents a full graphical console to the guest domain.

Читайте также:  Перевод речи windows 10

About virt-manager’s supporting tools

virt-install is a command line tool which provides an easy way to provision operating systems into virtual machines.

virt-viewer is a lightweight UI interface for interacting with the graphical display of virtualized guest OS. It can display VNC or SPICE, and uses libvirt to lookup the graphical connection details.

virt-clone is a command line tool for cloning existing inactive guests. It copies the disk images, and defines a config with new name, UUID and MAC address pointing to the copied disks.

virt-xml is a command line tool for easily editing libvirt domain XML using virt-install’s command line options.

virt-bootstrap is a command line tool providing an easy way to setup the root file system for libvirt-based containers.

Источник

Running virt-manager and libvirt on macOS

I’ve previously written about using QEMU on macOS to create an Ubuntu VM via CLI. In this blog post I’m going to describe how to install libvirt and virt-manager on macOS to create an Ubuntu VM via QEMU from the virt-manager GUI.

What’s described in this blog post was more of an experiment to see if it would work. Running libvirt locally is very slow and not usable due to the missing support for the HVF Hypervisor.Framework.

If you’re only interested in running virt-manager on macOS (and connect to remote machines) you can skip the steps after the virt-manager installation.

Description

Libvirt uses a hypervisor (such as QEMU) to run a VM and provides an API to manage it. API Clients are available for many languages such as Python, Go or Rust.

Virt-manager is a Python application that provides a GUI to manage VMs though the libvirt API.

Installation

Libvirt is available in Homebrew and the installation can be done with a single command:

Virt-manager is not available in Homebrew but there’s a custom formula available that makes it convenient to install it. However, this formula is outdated and fails to run on macOS Catalina and Big Sur.

To fix this I’ve created a fork with updated dependencies. It can be installed via a custom tap:

The installation might take a few minutes due to many dependencies.

Читайте также:  Windows 10 для lumia 435 dual sim

Usage

When the installation has finished we can test it by starting the libvirtd daemon:

and then virt-manager with a connection to it:

The original Homebrew formula had a custom patch applied that made —no-fork the default behaviour (launching it in the foreground). To make it easier to maintain the formula I’ve removed the patch. If the process should run in the foreground the —no-fork argument needs to be specified or else it will run in the background.

Note that the virt-manager window will be hidden after starting. It will show up in the Dock (the icon is a rocket) and clicking on it will bring it into the foreground.

Creating a VM

As an example I’m creating a Ubuntu 20.10 VM.

Virt-manager assumes that SPICE is available and will add it to the default settings. However, it’s is not supported on macOS and therefore we need to change a the default values to remove all SPICE related settings:

Make sure to check the customize box before starting the VM:

In the customization window we need to remove all hardware related to SPICE (Right-Click -> Remove Hardware):

  • Channel spice
  • USB Redirector 1
  • USB Redirector 2

In the Display section set the type to VNC server:

In the Video section set the model to Virtio:

Apply these changes and click on Begin Installation in the top left corner. It will open a window that boots into the Ubuntu installer. From there on we can follow the installer. The default settings are usually fine.

Источник

holms / virt-manager-osx

git clone git://git.fedorahosted.org/virt-manager.git
cd virt-manager
sudo port -v install intltool py27-pygtk
sudo python setup.py install

This comment has been minimized.

Copy link Quote reply

dghodgson commented Aug 11, 2014

Doesn’t work in OSX 10.9

Even after symlinking /usr/bin/pythonw2.7 to /usr/bin/python2 and installing py27-gobject (and py27-gobject3 ), I still get the following error:

This comment has been minimized.

Copy link Quote reply

jaccoh commented Nov 11, 2014

I fixed that by doing:

now for the next error.

This comment has been minimized.

Copy link Quote reply

jamesooden commented Nov 21, 2014

I am experiencing the same problem, and got as far as you did (though I am using brew). libvirt-glib is separate library and it looks like the version of of gi.repository that you and I both have does not support it. I haven’t figured out much more than that.

This comment has been minimized.

Copy link Quote reply

jamesooden commented Nov 21, 2014

I found from another place that you need to tell gobject-inspector (that is the gi, part of gi.repository) where to find its type libs by using an environment variable GI_TYPELIB_PATH. In my case that would have been:

Читайте также:  Вскрыт пароль для windows

The problem was the particular gi typelib in question, LibvirtGlib did not exist. I could not find a brew package for this library so I built it myself pulling it from here:

Sadly after figuring out how to make it build (I had to patch the make files to remove an unsupported link option), it did not seem to product the typelib library, so I’m stuck again.

This comment has been minimized.

Copy link Quote reply

jamesooden commented Nov 21, 2014

OK, there is an —enable-introspection on the configure for libvirt-glib, however it does not detect the gobject-introspection library (which it is doing via a package tool). Anyway I bet if I could ever git this LibvirtGlib.typelib file built virt-manager would run.

This comment has been minimized.

Copy link Quote reply

jeffreywildman commented Dec 23, 2014

There are also a couple of other dependencies that need to be satisfied after libvirt-glib. I managed to get virt-manager installed and running using homebrew, albeit it is missing a few features. I’ve created a homebrew tap for others to check out and experiment with:

Источник

Есть ли альтернатива virt-manager для Mac OS X? [закрытый]

здесь на работе мы используем виртуальную инфраструктуру. Мы часто используем virt-manager, но я на Mac и не могу заставить его работать.

есть ли способ заставить его работать или альтернатива ?

4 ответов

теперь есть формула заваривания самогон-Вирт-менеджер который я использовал для успешного подключения к коробке CentOS 5 под управлением qemu+kvm.

к сожалению, нет, вы можете установить virt-manager на Linux box и запустить его на рабочем столе mac через vnc и X11.

что вам нужно сделать, это запустить X11, открыть xterm (command + N), введите ssh-X пользователь@linux-box, затем введите virt-manager после входа в систему.

та же проблема здесь, попробовал несколько решений и обходных путей и обнаружил, что для управления виртуальными машинами на удаленном сервере Qemu/KVM нет ничего более надежного и удобного, чем работающая система GNU/Linux virt-manager .

нашим лучшим решением до сих пор является установка Virtualbox в MacOS для запуска Lubuntu LTS

насколько мне известно, нет, но вы можете использовать его так Если вы это сделаете:

  1. установите (в хост) сервер NoMachine NX
  2. установите клиент NX на свой mac
  3. вход с компьютера mac
  4. исправить проблемы с клавиатурой после эти инструкции
  5. откройте virt-manager в сеансе gnome на вашем сервере / хосте (который вы используете через клиент NX)
  6. удачи

Источник

Оцените статью