Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

virt-manager installation error #184

Open
orgazmer opened this issue Sep 16, 2021 · 67 comments
Open

virt-manager installation error #184

orgazmer opened this issue Sep 16, 2021 · 67 comments

Comments

@orgazmer
Copy link

brew install virt-manager
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 3 taps (hashicorp/tap, homebrew/core and homebrew/cask).
==> New Formulae
apache-pulsar bat-extras jpdfbookmarks librist osc-cli pkgconf selene vespa-cli viu
==> Updated Formulae
Updated 425 formulae.
==> New Casks
epilogue-operator gcs mathcha-notebook nimblenote remotion
==> Updated Casks
Updated 203 casks.

==> Downloading https://ghcr.io/v2/homebrew/core/harfbuzz/manifests/2.9.1
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/harfbuzz/blobs/sha256:991c547aad91d318700252b2b63dc33a8a203779c9e4e68154d772e24a2fbea7
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:991c547aad91d318700252b2b63dc33a8a203779c9e4e68154d772e24a2fbea7?se=2021-09-16T12%3A10%3A00Z&sig=VypheZ
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/pango/manifests/1.48.10
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/pango/blobs/sha256:ea25146681018c99e13404ee299f006679397c082a388c486c7a685ec8d8eca9
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:ea25146681018c99e13404ee299f006679397c082a388c486c7a685ec8d8eca9?se=2021-09-16T12%3A10%3A00Z&sig=W8T6Qi
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/adwaita-icon-theme/manifests/41.0
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/adwaita-icon-theme/blobs/sha256:b00bb687bcb075aba1ba256fbbab907cbb385c4ccc66c5b4045bb3d9b6b8f987
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:b00bb687bcb075aba1ba256fbbab907cbb385c4ccc66c5b4045bb3d9b6b8f987?se=2021-09-16T12%3A10%3A00Z&sig=0E4TfU
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/libass/manifests/0.15.2
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/libass/blobs/sha256:d11e2972aa5ae2e763cf4101712fac61421082db4d47720a8adc17b8a3e84a27
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:d11e2972aa5ae2e763cf4101712fac61421082db4d47720a8adc17b8a3e84a27?se=2021-09-16T12%3A10%3A00Z&sig=hjbiNg
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/libvpx/manifests/1.10.0_1
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/libvpx/blobs/sha256:cadad4e7b1bf8d5188da826ac6ecbb7729e0a26ce4665b40fc04386e780c4dc3
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:cadad4e7b1bf8d5188da826ac6ecbb7729e0a26ce4665b40fc04386e780c4dc3?se=2021-09-16T12%3A10%3A00Z&sig=kNWO5o
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/srtp/manifests/2.4.1
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/srtp/blobs/sha256:feeac7058038e22e2259587a6270521c78df2768b05f680e6a0cf5d7deb4d148
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:feeac7058038e22e2259587a6270521c78df2768b05f680e6a0cf5d7deb4d148?se=2021-09-16T12%3A10%3A00Z&sig=9p7TXY
######################################################################## 100.0%
==> Downloading https://libvirt.org/sources/python/libvirt-python-6.10.0.tar.gz
Already downloaded: /Users/rooter/Library/Caches/Homebrew/downloads/c0ea3dcb750aed089cfed8d3988e3aef79b70d635cfd42c87db147e860647de4--libvirt-python-6.10.0.tar.gz
==> Downloading https://pypi.io/packages/source/i/idna/idna-2.8.tar.gz
Already downloaded: /Users/rooter/Library/Caches/Homebrew/downloads/89cd3c9503f30cf4794067fbb3bb85881a04d4a79002cd52dd006617f4dee6d5--idna-2.8.tar.gz
==> Downloading https://pypi.io/packages/source/c/certifi/certifi-2019.11.28.tar.gz
Already downloaded: /Users/rooter/Library/Caches/Homebrew/downloads/d305888203f80870f04cbff5b615679be127a718ffeec3b3ce5db16bdc4abfa2--certifi-2019.11.28.tar.gz
==> Downloading https://pypi.io/packages/source/c/chardet/chardet-3.0.4.tar.gz
Already downloaded: /Users/rooter/Library/Caches/Homebrew/downloads/0b520e43abac95fdb4182899f49c1c7ced69c67c4bc132b3801691b993eb33f9--chardet-3.0.4.tar.gz
==> Downloading https://pypi.io/packages/source/u/urllib3/urllib3-1.25.7.tar.gz
Already downloaded: /Users/rooter/Library/Caches/Homebrew/downloads/04dc027e49125d42a130fd408cde60c9d9a87ce021683a3e49bf067a62316261--urllib3-1.25.7.tar.gz
==> Downloading https://pypi.io/packages/source/r/requests/requests-2.22.0.tar.gz
Already downloaded: /Users/rooter/Library/Caches/Homebrew/downloads/4253f7dff3c4f4a5a7fe142af689d95ed2e77979f696451a78d96412e90b0f94--requests-2.22.0.tar.gz
==> Downloading https://virt-manager.org/download/sources/virt-manager/virt-manager-2.2.1.tar.gz
Already downloaded: /Users/rooter/Library/Caches/Homebrew/downloads/77e22463a35b2e2bde8d02253c10129aabb1e5dfbfe2e6f33ef87bd35955dcf2--virt-manager-2.2.1.tar.gz
==> Installing virt-manager from jeffreywildman/virt-manager
==> Installing dependencies for jeffreywildman/virt-manager/virt-manager: harfbuzz, pango, adwaita-icon-theme, libass, libvpx and srtp
==> Installing jeffreywildman/virt-manager/virt-manager dependency: harfbuzz
==> Pouring harfbuzz--2.9.1.big_sur.bottle.tar.gz
🍺 /usr/local/Cellar/harfbuzz/2.9.1: 68 files, 7.2MB
==> Installing jeffreywildman/virt-manager/virt-manager dependency: pango
==> Pouring pango--1.48.10.big_sur.bottle.tar.gz
🍺 /usr/local/Cellar/pango/1.48.10: 65 files, 3.0MB
==> Installing jeffreywildman/virt-manager/virt-manager dependency: adwaita-icon-theme
==> Pouring adwaita-icon-theme--41.0.all.bottle.tar.gz
🍺 /usr/local/Cellar/adwaita-icon-theme/41.0: 6,051 files, 22.7MB
==> Installing jeffreywildman/virt-manager/virt-manager dependency: libass
==> Pouring libass--0.15.2.big_sur.bottle.tar.gz
🍺 /usr/local/Cellar/libass/0.15.2: 11 files, 579.7KB
==> Installing jeffreywildman/virt-manager/virt-manager dependency: libvpx
==> Pouring libvpx--1.10.0_1.big_sur.bottle.tar.gz
🍺 /usr/local/Cellar/libvpx/1.10.0_1: 20 files, 5.2MB
==> Installing jeffreywildman/virt-manager/virt-manager dependency: srtp
==> Pouring srtp--2.4.1.big_sur.bottle.tar.gz
🍺 /usr/local/Cellar/srtp/2.4.1: 14 files, 481.5KB
==> Installing jeffreywildman/virt-manager/virt-manager
==> Patching
==> python3 -m venv --system-site-packages /usr/local/Cellar/virt-manager/2.2.1_3/libexec
==> /usr/local/Cellar/virt-manager/2.2.1_3/libexec/bin/pip install -v --no-deps --no-binary :all: --ignore-installed /private/tmp/virt-manager--libvirt-python-20210916-77745-qahoyt/libvirt
Last 15 lines from /Users/rooter/Library/Logs/Homebrew/virt-manager/02.pip:
Running setup.py install for libvirt-python: started
Running command /usr/local/Cellar/virt-manager/2.2.1_3/libexec/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/pip-req-build-77k_3pk0/setup.py'"'"'; file='"'"'/private/tmp/pip-req-build-77k_3pk0/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/tmp/pip-record-izoiq628/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/Cellar/virt-manager/2.2.1_3/libexec/include/site/python3.9/libvirt-python
running install
running build
/usr/local/Homebrew/Library/Homebrew/shims/mac/super/pkg-config --print-errors --atleast-version=0.9.11 libvirt
/usr/local/Cellar/virt-manager/2.2.1_3/libexec/bin/python3.9 generator.py libvirt /usr/local/Cellar/libvirt/7.7.0/share/libvirt/api/libvirt-api.xml
Found 487 functions in /usr/local/Cellar/libvirt/7.7.0/share/libvirt/api/libvirt-api.xml
Found 0 functions in libvirt-override-api.xml
Generated 397 wrapper functions
Missing type converters:
char ** *:1
ERROR: failed virDomainGetMessages
error: command '/usr/local/Cellar/virt-manager/2.2.1_3/libexec/bin/python3.9' failed with exit code 1
Running setup.py install for libvirt-python: finished with status 'error'
ERROR: Command errored out with exit status 1: /usr/local/Cellar/virt-manager/2.2.1_3/libexec/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/pip-req-build-77k_3pk0/setup.py'"'"'; file='"'"'/private/tmp/pip-req-build-77k_3pk0/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/tmp/pip-record-izoiq628/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/Cellar/virt-manager/2.2.1_3/libexec/include/site/python3.9/libvirt-python Check the logs for full command output.

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
https://github.com/jeffreywildman/homebrew-virt-manager/issues

These open issues may also help:
virt-manager crashed when opening a VM on remote host #180
virt-manager: command not found #177
bump virt-manager/view-viewer and deps #166
virt-manager: command not found #169
virt-manager broken on Big Sur after minor update #170
Error installing virt-manager #145
cannot install virt-manager, error with python version despite having python 3.9 installed #172
Assertion Error When Running Virt-Manager on MacOS BigSur #174
osx virt-manager console screen is black #113
Virt-manager wont build. Update to libvirt-python #171
virt-manager crashing with Python quit unexpectedly while using the libgdk-3.0.dylib #62

@jresteban
Copy link

+1

@krishjainx
Copy link

@jresteban @orgazmer Try my fork. It works #181 . Try https://github.com/Krish-sysadmin/homebrew-virt-manager

@jresteban
Copy link

jresteban commented Sep 17, 2021

@Krish-sysadmin thanks!! it works fine in Mojave 10.14.4 and Catalina 10.15.7

@orgazmer
Copy link
Author

@jresteban @orgazmer Try my fork. It works #181 . Try https://github.com/Krish-sysadmin/homebrew-virt-manager

==> Installing virt-manager from jeffreywildman/virt-manager
==> Patching
==> python3 -m venv --system-site-packages /usr/local/Cellar/virt-manager/2.2.1_3/libexec
==> /usr/local/Cellar/virt-manager/2.2.1_3/libexec/bin/pip install -v --no-deps --no-binary :all: --ignore-installed /private/tmp/virt-manager--libvirt-python-20210917-83625-1e5rltf/libvir
Last 15 lines from /Users/rooter/Library/Logs/Homebrew/virt-manager/02.pip:
Running setup.py install for libvirt-python: started
Running command /usr/local/Cellar/virt-manager/2.2.1_3/libexec/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/pip-req-build-q52btqux/setup.py'"'"'; file='"'"'/private/tmp/pip-req-build-q52btqux/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/tmp/pip-record-p1d4l4an/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/Cellar/virt-manager/2.2.1_3/libexec/include/site/python3.9/libvirt-python
running install
running build
/usr/local/Homebrew/Library/Homebrew/shims/mac/super/pkg-config --print-errors --atleast-version=0.9.11 libvirt
/usr/local/Cellar/virt-manager/2.2.1_3/libexec/bin/python3.9 generator.py libvirt /usr/local/Cellar/libvirt/7.7.0/share/libvirt/api/libvirt-api.xml
Found 487 functions in /usr/local/Cellar/libvirt/7.7.0/share/libvirt/api/libvirt-api.xml
Found 0 functions in libvirt-override-api.xml
Generated 397 wrapper functions
Missing type converters:
char ** *:1
ERROR: failed virDomainGetMessages
error: command '/usr/local/Cellar/virt-manager/2.2.1_3/libexec/bin/python3.9' failed with exit code 1
Running setup.py install for libvirt-python: finished with status 'error'
ERROR: Command errored out with exit status 1: /usr/local/Cellar/virt-manager/2.2.1_3/libexec/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/pip-req-build-q52btqux/setup.py'"'"'; file='"'"'/private/tmp/pip-req-build-q52btqux/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/tmp/pip-record-p1d4l4an/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/Cellar/virt-manager/2.2.1_3/libexec/include/site/python3.9/libvirt-python Check the logs for full command output.

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
https://github.com/jeffreywildman/homebrew-virt-manager/issues

These open issues may also help:

@jresteban
Copy link

jresteban commented Sep 17, 2021

==> Installing virt-manager from jeffreywildman/virt-manager

@orgazmer you are installing from jeffreywildman repository. Try:
brew remove virt-manager
brew remove virt-viewer
brew untap jeffreywildman/homebrew-virt-manager

and run

brew tap Krish-sysadmin/homebrew-virt-manager
brew install virt-manager virt-viewer

@krishjainx
Copy link

@jresteban yes, thanks for helping orgazmer out. Perhaps more people should star my fork so it comes first in search results so people don't face this issue in the first place

@orgazmer
Copy link
Author

==> Installing virt-manager from jeffreywildman/virt-manager

@orgazmer you are installing from jeffreywildman repository. Try:
brew remove virt-manager
brew remove virt-viewer
brew untap jeffreywildman/homebrew-virt-manager

and run

brew tap Krish-sysadmin/homebrew-virt-manager
brew install virt-manager virt-viewer

it works !! Thanx !!! :-)

@MurlengNik
Copy link

@Krish-sysadmin getting an install error on both forks related to a dependency on "intltool"

tried running: brew install intlool
but no luck as it doesn't seem to available anywhere. Wondering if you've tested your fork on a fresh installation of macOS within the past week. So far I'm getting this on all of my new ones.
thanks!

@krishjainx
Copy link

Yes, I have tested it on a fresh installation of macOS catalina and big sur like 5 days back and neither have I or my users faced any problem. Mind attaching a screenshot showing what you are running as well as telling me what macos version you are on? @MurlengNik Happy to help!

@DUOLabs333
Copy link

DUOLabs333 commented Sep 30, 2021

Whenever I try to run it, it returns a segmentation fault. This is on Big Sur M1.

@orgazmer
Copy link
Author

orgazmer commented Oct 1, 2021

Whenever I try to run it, it returns a segmentation fault. This is on Big Sur M1.

i have the same problem!

@krishjainx
Copy link

I don't use M1 mac so can't reproduce the error. Sorry

@slamdev
Copy link

slamdev commented Oct 4, 2021

fork didn't help

==> Installing virt-manager from krish-sysadmin/virt-manager
==> Patching
==> python3 -m venv --system-site-packages /usr/local/Cellar/virt-manager/2.2.1_3/libexec
==> /usr/local/Cellar/virt-manager/2.2.1_3/libexec/bin/pip install -v --no-deps --no-binary :all: --ignore-installed /private/tmp/virt-manager--libvirt-python-20211004-53387-wai36j/libvirt-python-7.6.0
Last 15 lines from /Users/slam/Library/Logs/Homebrew/virt-manager/02.pip:
    Running setup.py install for libvirt-python: started
    Running command /usr/local/Cellar/virt-manager/2.2.1_3/libexec/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/pip-req-build-vftfff4u/setup.py'"'"'; __file__='"'"'/private/tmp/pip-req-build-vftfff4u/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/tmp/pip-record-rv8_d26z/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/Cellar/virt-manager/2.2.1_3/libexec/include/site/python3.9/libvirt-python
    running install
    running build
    /usr/local/Homebrew/Library/Homebrew/shims/mac/super/pkg-config --print-errors --atleast-version=0.9.11 libvirt
    /usr/local/Cellar/virt-manager/2.2.1_3/libexec/bin/python3.9 generator.py libvirt /usr/local/Cellar/libvirt/7.8.0/share/libvirt/api/libvirt-api.xml
    Found 492 functions in /usr/local/Cellar/libvirt/7.8.0/share/libvirt/api/libvirt-api.xml
    Found 0 functions in libvirt-override-api.xml
    Generated 402 wrapper functions
    Missing type converters:
    int *:1
    ERROR: failed virNodeDeviceGetAutostart
    error: command '/usr/local/Cellar/virt-manager/2.2.1_3/libexec/bin/python3.9' failed with exit code 1
    Running setup.py install for libvirt-python: finished with status 'error'
ERROR: Command errored out with exit status 1: /usr/local/Cellar/virt-manager/2.2.1_3/libexec/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/pip-req-build-vftfff4u/setup.py'"'"'; __file__='"'"'/private/tmp/pip-req-build-vftfff4u/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/tmp/pip-record-rv8_d26z/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/Cellar/virt-manager/2.2.1_3/libexec/include/site/python3.9/libvirt-python Check the logs for full command output.

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
  https://github.com/krish-sysadmin/homebrew-virt-manager/issues

macos x86 10.15.7

any suggestions to try out?

@DaveB91
Copy link

DaveB91 commented Oct 5, 2021

The Fork isn't working for me either

Last 15 lines from /Users/dave/Library/Logs/Homebrew/virt-manager/02.pip:
Running setup.py install for libvirt-python: started
Running command /usr/local/Cellar/virt-manager/2.2.1_3/libexec/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/pip-req-build-h8f9difz/setup.py'"'"'; file='"'"'/private/tmp/pip-req-build-h8f9difz/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/tmp/pip-record-nqa8x8cy/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/Cellar/virt-manager/2.2.1_3/libexec/include/site/python3.9/libvirt-python
running install
running build
/usr/local/Homebrew/Library/Homebrew/shims/mac/super/pkg-config --print-errors --atleast-version=0.9.11 libvirt
/usr/local/Cellar/virt-manager/2.2.1_3/libexec/bin/python3.9 generator.py libvirt /usr/local/Cellar/libvirt/7.8.0/share/libvirt/api/libvirt-api.xml
Found 492 functions in /usr/local/Cellar/libvirt/7.8.0/share/libvirt/api/libvirt-api.xml
Found 0 functions in libvirt-override-api.xml
Generated 402 wrapper functions
Missing type converters:
int *:1
ERROR: failed virNodeDeviceGetAutostart
error: command '/usr/local/Cellar/virt-manager/2.2.1_3/libexec/bin/python3.9' failed with exit code 1
Running setup.py install for libvirt-python: finished with status 'error'
ERROR: Command errored out with exit status 1: /usr/local/Cellar/virt-manager/2.2.1_3/libexec/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/pip-req-build-h8f9difz/setup.py'"'"'; file='"'"'/private/tmp/pip-req-build-h8f9difz/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/tmp/pip-record-nqa8x8cy/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/Cellar/virt-manager/2.2.1_3/libexec/include/site/python3.9/libvirt-python Check the logs for full command output.

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
https://github.com/krish-sysadmin/homebrew-virt-manager/issues

@radoslaw-karasinski-sauce

@slamdev @DaveB91 you need to update libvirt-python to newest version, take a look: https://github.com/radoslaw-karasinski-sauce/homebrew-virt-manager

@krishjainx
Copy link

@slamdev @DaveB91 Yup, use https://github.com/Krish-sysadmin/homebrew-virt-manager . This is maintained actively by me. Just been AFK for a bit!

@DaveB91
Copy link

DaveB91 commented Oct 6, 2021

Thanks @Krish-sysadmin - Works now
Now.. Anyone know how I can open a .vv file with this?

@krishjainx
Copy link

Launch Automator, and click on a New project

Use the Type "Application"

Search for "shell" on the left hand side, and drag the "Run shell script" entry to the right

Use the following:

/usr/local/bin/remote-viewer "$@"

Save this as say ~/Applications/oVirt-Console.app

Now, the security policy of a Mac won't let you run this app made by an "untrusted developer", so in Finder, locate the .vv file, and then hold down the Control key. With the Control key pressed, click on the .vv file, and then right click, open with, look for the .app file you just made, and check the "Always Open With" checkbox in the bottom of the dialog. This took a couple of tries for it to work for me, so also try launching the file with the control key pressed, and selecting your .app file.

Finally, in Chrome, after clicking on the Console button in oVirt, keep the downloaded file somewhere, and then click on the small downwards arrow on the list of downloads on the bottom, and select "Always open files of this type".

After this, from now on, it should launch remote-viewer immediately after clicking on the console button. @DaveB91

@sidd-satish
Copy link

sidd-satish commented Oct 8, 2021

@Krish-sysadmin I am unable to open .vv file using the steps that you mentioned. Once I open it via the ~/Applications/oVirt-Console.app, it asks me to enter the connection address again. Not sure what's the problem. Can you please help?

Screenshot 2021-10-08 at 1 15 51 PM

@krishjainx
Copy link

@sidd-satish Try running virt-manager <path/to/.vv file> and let me know how that goes

@sidd-satish
Copy link

@Krish-sysadmin This is the error I am getting

Error starting Virtual Machine Manager: Unhandled command line options '['/Users/siddharth/Downloads/pve-spice.vv']'

Traceback (most recent call last):
  File "/usr/local/Cellar/virt-manager/2.2.1_3/libexec/share/virt-manager/virt-manager", line 347, in <module>
    main()
  File "/usr/local/Cellar/virt-manager/2.2.1_3/libexec/share/virt-manager/virt-manager", line 270, in main
    raise RuntimeError("Unhandled command line options '%s'" % leftovers)
RuntimeError: Unhandled command line options '['/Users/siddharth/Downloads/pve-spice.vv']'

@DaveB91
Copy link

DaveB91 commented Oct 8, 2021 via email

@david9991
Copy link

Whenever I try to run it, it returns a segmentation fault. This is on Big Sur M1.

Same here.

@krishjainx
Copy link

I believe this is associated with an erroneous system call. I believe virt-manager itself does not support M1.

@david9991
Copy link

This is the cause of the crash on M1. https://gitlab.gnome.org/GNOME/pygobject/-/issues/455

@krishjainx
Copy link

Did you fix it? @david9991

@david9991
Copy link

Did you fix it? @david9991

No, I don't know much about gobject-introspection. :)

@Damenly
Copy link

Damenly commented Oct 22, 2021

Did you fix it? @david9991

There was PR for gobject-introspection already.
However, two months passed, gnome guys seem to care only what they care.
For m1(arm64), my repo works:

https://github.com/Damenly/homebrew-virt-manager

@phlobbi
Copy link

phlobbi commented Oct 26, 2021

@Krish-sysadmin Using your fork worked perfectly for the installation, however, whenever I try to connect to a remote VM with remote-viewer, it just shows a black screen. Somehow it seems to be connected though, because the cursor changes appearance when I hover over the fields where the login prompt in the VM should be

@krishjainx
Copy link

@phlobbi Hi, if I had more time on my hands I would love to help you out, but I don't right now, but I will soon. If you want, feel free to fork my fork and then fix the issue. I ran some tests and it doesn't seem excruciatingly hard to fix. Good luck! As of right now I don't have access to a mac machine and tend to stay on Linux so not sure I am the best person to ask. Thanks for the feedback

@phlobbi
Copy link

phlobbi commented Oct 29, 2021

@Damenly Thank you a lot! That fixed it for me!

@florian-obradovic
Copy link

@Damenly THANKS!

My path is different: /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/gtk+3.rb

CleanShot 2021-10-29 at 21 19 55@2x

@YaroKasear
Copy link

This worked. There is much celebration and joy today.

@fhriley
Copy link

fhriley commented Nov 13, 2021

@Damenly Your gtk fork fails to build for me:

==> Cloning https://github.com/Damenly/gtk.git
Cloning into '/Users/friley/Library/Caches/Homebrew/gtk+3--git'...
==> Checking out branch master
Already on 'master'
Your branch is up to date with 'origin/master'.
==> Installing dependencies for gtk+3: ninja and meson
==> Installing gtk+3 dependency: ninja
==> Pouring ninja--1.10.2_1.arm64_monterey.bottle.tar.gz
🍺  /opt/homebrew/Cellar/ninja/1.10.2_1: 10 files, 388KB
==> Installing gtk+3 dependency: meson
==> Pouring meson--0.60.1.all.bottle.tar.gz
🍺  /opt/homebrew/Cellar/meson/0.60.1: 216 files, 3.2MB
==> Installing gtk+3 --HEAD
==> Patching
==> Applying 36315cbe2b3c9d1c1b7508d9494a251eddbc4452.diff
patching file gdk/quartz/gdkwindow-quartz.c
Hunk #1 FAILED at 183.
1 out of 1 hunk FAILED -- saving rejects to file gdk/quartz/gdkwindow-quartz.c.rej

Do not report this issue to Homebrew/brew or Homebrew/core!

Please create pull requests instead of asking for help on Homebrew's GitHub,
Twitter or any other official channels.

@Damenly
Copy link

Damenly commented Nov 14, 2021

@Damenly Your gtk fork fails to build for me:

==> Cloning https://github.com/Damenly/gtk.git
Cloning into '/Users/friley/Library/Caches/Homebrew/gtk+3--git'...
==> Checking out branch master
Already on 'master'
Your branch is up to date with 'origin/master'.
==> Installing dependencies for gtk+3: ninja and meson
==> Installing gtk+3 dependency: ninja
==> Pouring ninja--1.10.2_1.arm64_monterey.bottle.tar.gz
🍺  /opt/homebrew/Cellar/ninja/1.10.2_1: 10 files, 388KB
==> Installing gtk+3 dependency: meson
==> Pouring meson--0.60.1.all.bottle.tar.gz
🍺  /opt/homebrew/Cellar/meson/0.60.1: 216 files, 3.2MB
==> Installing gtk+3 --HEAD
==> Patching
==> Applying 36315cbe2b3c9d1c1b7508d9494a251eddbc4452.diff
patching file gdk/quartz/gdkwindow-quartz.c
Hunk #1 FAILED at 183.
1 out of 1 hunk FAILED -- saving rejects to file gdk/quartz/gdkwindow-quartz.c.rej

Do not report this issue to Homebrew/brew or Homebrew/core!

Please create pull requests instead of asking for help on Homebrew's GitHub,
Twitter or any other official channels.

I see. Homebrew has fixed the issue by patching fixes. So no more need to add my repo.
Just do

cd /opt/homebrew/Library/Taps/homebrew/homebrew-core # or your homebrew path
git checkout ./Formula/gtk+3.rb # Or remove the line of my reo
brew update
brew upgrade

@flotpg
Copy link

flotpg commented Nov 14, 2021

@Damenly: thanks a lot for your effort!

@m-bers
Copy link

m-bers commented Nov 22, 2021

@Damenly I installed from your repo and it seems to manage remote hosts well. I am however trying to get it to work with qemu:///session and it is not happy. I'm on the M1 Macbook Air FWIW

Here's the output of virt-manager --debug --no-fork with connection to qemu:///session

[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (cli:204) Launched with command line: /opt/homebrew/Cellar/virt-manager/HEAD-0c146b2_7/libexec/bin/virt-manager --debug --no-fork -c qemu:///session
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (virtmanager:167) virt-manager version: 3.2.0
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (virtmanager:168) virtManager import: /opt/homebrew/Cellar/virt-manager/HEAD-0c146b2_7/libexec/share/virt-manager/virtManager
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (virtmanager:205) PyGObject version: 3.41.0
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (virtmanager:209) GTK version: 3.24.30
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (systray:476) Showing systray: False
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (inspection:206) python guestfs is not installed
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (engine:113) Loading stored URIs:
qemu:///session
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (engine:461) processing cli command uri=qemu:///session show_window=manager domain=
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:482) conn=qemu:///session changed to state=Connecting
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:902) Scheduling background open thread for qemu:///session
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (engine:211) Initial gtkapplication activated
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:952) libvirt version=7009000
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:953) daemon version=7009000
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:954) conn version=6001000
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:955) qemu:///session capabilities:
<capabilities>
# Removed a lot of stuff here due to length, but I can post it if necessary
</capabilities>

[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:964) Connection doesn't seem to support network APIs.
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:966) Connection doesn't seem to support nodedev APIs.
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:739) Using domain events
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:780) Error registering network events: this function is not supported by the connection driver: virConnectNetworkEventRegisterAny
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:796) Using storage pool events
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:824) Error registering node device events: this function is not supported by the connection driver: virConnectNodeDeviceEventRegisterAny
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (engine:299) Error polling connection qemu:///session
Traceback (most recent call last):
  File "/opt/homebrew/Cellar/virt-manager/HEAD-0c146b2_7/libexec/share/virt-manager/virtManager/engine.py", line 294, in _handle_tick_queue
    conn.tick_from_engine(**kwargs)
  File "/opt/homebrew/Cellar/virt-manager/HEAD-0c146b2_7/libexec/share/virt-manager/virtManager/connection.py", line 1321, in tick_from_engine
    self._tick(*args, **kwargs)
  File "/opt/homebrew/Cellar/virt-manager/HEAD-0c146b2_7/libexec/share/virt-manager/virtManager/connection.py", line 1204, in _tick
    self._hostinfo = self._backend.getInfo()
  File "/opt/homebrew/Cellar/virt-manager/HEAD-0c146b2_7/libexec/lib/python3.9/site-packages/libvirt.py", line 4565, in getInfo
    raise libvirtError('virNodeGetInfo() failed')
libvirt.libvirtError: cannot obtain CPU freq: No such file or directory
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:837) conn.close() uri=qemu:///session
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:482) conn=qemu:///session changed to state=Disconnected

@Damenly
Copy link

Damenly commented Nov 22, 2021

@Damenly I installed from your repo and it seems to manage remote hosts well. I am however trying to get it to work with qemu:///session and it is not happy. I'm on the M1 Macbook Air FWIW

Here's the output of virt-manager --debug --no-fork with connection to qemu:///session

[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (cli:204) Launched with command line: /opt/homebrew/Cellar/virt-manager/HEAD-0c146b2_7/libexec/bin/virt-manager --debug --no-fork -c qemu:///session
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (virtmanager:167) virt-manager version: 3.2.0
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (virtmanager:168) virtManager import: /opt/homebrew/Cellar/virt-manager/HEAD-0c146b2_7/libexec/share/virt-manager/virtManager
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (virtmanager:205) PyGObject version: 3.41.0
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (virtmanager:209) GTK version: 3.24.30
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (systray:476) Showing systray: False
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (inspection:206) python guestfs is not installed
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (engine:113) Loading stored URIs:
qemu:///session
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (engine:461) processing cli command uri=qemu:///session show_window=manager domain=
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:482) conn=qemu:///session changed to state=Connecting
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:902) Scheduling background open thread for qemu:///session
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (engine:211) Initial gtkapplication activated
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:952) libvirt version=7009000
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:953) daemon version=7009000
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:954) conn version=6001000
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:955) qemu:///session capabilities:
<capabilities>
# Removed a lot of stuff here due to length, but I can post it if necessary
</capabilities>

[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:964) Connection doesn't seem to support network APIs.
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:966) Connection doesn't seem to support nodedev APIs.
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:739) Using domain events
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:780) Error registering network events: this function is not supported by the connection driver: virConnectNetworkEventRegisterAny
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:796) Using storage pool events
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:824) Error registering node device events: this function is not supported by the connection driver: virConnectNodeDeviceEventRegisterAny
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (engine:299) Error polling connection qemu:///session
Traceback (most recent call last):
  File "/opt/homebrew/Cellar/virt-manager/HEAD-0c146b2_7/libexec/share/virt-manager/virtManager/engine.py", line 294, in _handle_tick_queue
    conn.tick_from_engine(**kwargs)
  File "/opt/homebrew/Cellar/virt-manager/HEAD-0c146b2_7/libexec/share/virt-manager/virtManager/connection.py", line 1321, in tick_from_engine
    self._tick(*args, **kwargs)
  File "/opt/homebrew/Cellar/virt-manager/HEAD-0c146b2_7/libexec/share/virt-manager/virtManager/connection.py", line 1204, in _tick
    self._hostinfo = self._backend.getInfo()
  File "/opt/homebrew/Cellar/virt-manager/HEAD-0c146b2_7/libexec/lib/python3.9/site-packages/libvirt.py", line 4565, in getInfo
    raise libvirtError('virNodeGetInfo() failed')
libvirt.libvirtError: cannot obtain CPU freq: No such file or directory
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:837) conn.close() uri=qemu:///session
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:482) conn=qemu:///session changed to state=Disconnected

@Damenly I installed from your repo and it seems to manage remote hosts well. I am however trying to get it to work with qemu:///session and it is not happy. I'm on the M1 Macbook Air FWIW

Here's the output of virt-manager --debug --no-fork with connection to qemu:///session

[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (cli:204) Launched with command line: /opt/homebrew/Cellar/virt-manager/HEAD-0c146b2_7/libexec/bin/virt-manager --debug --no-fork -c qemu:///session
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (virtmanager:167) virt-manager version: 3.2.0
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (virtmanager:168) virtManager import: /opt/homebrew/Cellar/virt-manager/HEAD-0c146b2_7/libexec/share/virt-manager/virtManager
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (virtmanager:205) PyGObject version: 3.41.0
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (virtmanager:209) GTK version: 3.24.30
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (systray:476) Showing systray: False
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (inspection:206) python guestfs is not installed
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (engine:113) Loading stored URIs:
qemu:///session
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (engine:461) processing cli command uri=qemu:///session show_window=manager domain=
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:482) conn=qemu:///session changed to state=Connecting
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:902) Scheduling background open thread for qemu:///session
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (engine:211) Initial gtkapplication activated
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:952) libvirt version=7009000
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:953) daemon version=7009000
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:954) conn version=6001000
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:955) qemu:///session capabilities:
<capabilities>
# Removed a lot of stuff here due to length, but I can post it if necessary
</capabilities>

[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:964) Connection doesn't seem to support network APIs.
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:966) Connection doesn't seem to support nodedev APIs.
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:739) Using domain events
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:780) Error registering network events: this function is not supported by the connection driver: virConnectNetworkEventRegisterAny
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:796) Using storage pool events
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:824) Error registering node device events: this function is not supported by the connection driver: virConnectNodeDeviceEventRegisterAny
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (engine:299) Error polling connection qemu:///session
Traceback (most recent call last):
  File "/opt/homebrew/Cellar/virt-manager/HEAD-0c146b2_7/libexec/share/virt-manager/virtManager/engine.py", line 294, in _handle_tick_queue
    conn.tick_from_engine(**kwargs)
  File "/opt/homebrew/Cellar/virt-manager/HEAD-0c146b2_7/libexec/share/virt-manager/virtManager/connection.py", line 1321, in tick_from_engine
    self._tick(*args, **kwargs)
  File "/opt/homebrew/Cellar/virt-manager/HEAD-0c146b2_7/libexec/share/virt-manager/virtManager/connection.py", line 1204, in _tick
    self._hostinfo = self._backend.getInfo()
  File "/opt/homebrew/Cellar/virt-manager/HEAD-0c146b2_7/libexec/lib/python3.9/site-packages/libvirt.py", line 4565, in getInfo
    raise libvirtError('virNodeGetInfo() failed')
libvirt.libvirtError: cannot obtain CPU freq: No such file or directory
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:837) conn.close() uri=qemu:///session
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:482) conn=qemu:///session changed to state=Disconnected

Sorry, I didn't get your usage scenario.
Do you want to add the m1 host itself to virt-manager? AFAIK, there is no libvirtd support in macOS.
Even qemu-aarch64 is running on m1, I think it's libvirtd's work to create qemu sessions.

@m-bers
Copy link

m-bers commented Nov 22, 2021

libvirtd is supported on macos and is available via the default homebrew repo (homebrew-core). I can't personally confirm that it works with virt-manager but others seem to have had success (at least on x86_64).

The libvirt formula in homebrew-core compiles on Apple silicon machines but needs patches in order to avoid the Unsupported hardware architecture error. Following recommendations from @andreabolognani, I got libvirt working and I can create and manage VMs with virsh. I built a homebrew formula and it works with the qemu from homebrew-core (albeit only with usermode networking)

While virsh works, neither virt-manager nor virt-install seem to.

@Damenly
Copy link

Damenly commented Nov 22, 2021

libvirtd is supported on macos and is available via the default homebrew repo (homebrew-core). I can't personally confirm that it works with virt-manager but others seem to have had success (at least on x86_64).

The libvirt formula in homebrew-core compiles on Apple silicon machines but needs patches in order to avoid the Unsupported hardware architecture error. Following recommendations from @andreabolognani, I got libvirt working and I can create and manage VMs with virsh. I built a homebrew formula and it works with the qemu from homebrew-core (albeit only with usermode networking)

While virsh works, neither virt-manager nor virt-install seem to.

Oh, I missed it. Let me try and figure out what’s going on.

@liej6799
Copy link

liej6799 commented Nov 23, 2021

@Damenly I installed from your repo and it seems to manage remote hosts well. I am however trying to get it to work with qemu:///session and it is not happy. I'm on the M1 Macbook Air FWIW

Here's the output of virt-manager --debug --no-fork with connection to qemu:///session

[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (cli:204) Launched with command line: /opt/homebrew/Cellar/virt-manager/HEAD-0c146b2_7/libexec/bin/virt-manager --debug --no-fork -c qemu:///session
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (virtmanager:167) virt-manager version: 3.2.0
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (virtmanager:168) virtManager import: /opt/homebrew/Cellar/virt-manager/HEAD-0c146b2_7/libexec/share/virt-manager/virtManager
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (virtmanager:205) PyGObject version: 3.41.0
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (virtmanager:209) GTK version: 3.24.30
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (systray:476) Showing systray: False
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (inspection:206) python guestfs is not installed
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (engine:113) Loading stored URIs:
qemu:///session
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (engine:461) processing cli command uri=qemu:///session show_window=manager domain=
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:482) conn=qemu:///session changed to state=Connecting
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:902) Scheduling background open thread for qemu:///session
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (engine:211) Initial gtkapplication activated
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:952) libvirt version=7009000
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:953) daemon version=7009000
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:954) conn version=6001000
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:955) qemu:///session capabilities:
<capabilities>
# Removed a lot of stuff here due to length, but I can post it if necessary
</capabilities>

[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:964) Connection doesn't seem to support network APIs.
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:966) Connection doesn't seem to support nodedev APIs.
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:739) Using domain events
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:780) Error registering network events: this function is not supported by the connection driver: virConnectNetworkEventRegisterAny
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:796) Using storage pool events
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:824) Error registering node device events: this function is not supported by the connection driver: virConnectNodeDeviceEventRegisterAny
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (engine:299) Error polling connection qemu:///session
Traceback (most recent call last):
  File "/opt/homebrew/Cellar/virt-manager/HEAD-0c146b2_7/libexec/share/virt-manager/virtManager/engine.py", line 294, in _handle_tick_queue
    conn.tick_from_engine(**kwargs)
  File "/opt/homebrew/Cellar/virt-manager/HEAD-0c146b2_7/libexec/share/virt-manager/virtManager/connection.py", line 1321, in tick_from_engine
    self._tick(*args, **kwargs)
  File "/opt/homebrew/Cellar/virt-manager/HEAD-0c146b2_7/libexec/share/virt-manager/virtManager/connection.py", line 1204, in _tick
    self._hostinfo = self._backend.getInfo()
  File "/opt/homebrew/Cellar/virt-manager/HEAD-0c146b2_7/libexec/lib/python3.9/site-packages/libvirt.py", line 4565, in getInfo
    raise libvirtError('virNodeGetInfo() failed')
libvirt.libvirtError: cannot obtain CPU freq: No such file or directory
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:837) conn.close() uri=qemu:///session
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:482) conn=qemu:///session changed to state=Disconnected

@Damenly I installed from your repo and it seems to manage remote hosts well. I am however trying to get it to work with qemu:///session and it is not happy. I'm on the M1 Macbook Air FWIW
Here's the output of virt-manager --debug --no-fork with connection to qemu:///session

[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (cli:204) Launched with command line: /opt/homebrew/Cellar/virt-manager/HEAD-0c146b2_7/libexec/bin/virt-manager --debug --no-fork -c qemu:///session
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (virtmanager:167) virt-manager version: 3.2.0
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (virtmanager:168) virtManager import: /opt/homebrew/Cellar/virt-manager/HEAD-0c146b2_7/libexec/share/virt-manager/virtManager
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (virtmanager:205) PyGObject version: 3.41.0
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (virtmanager:209) GTK version: 3.24.30
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (systray:476) Showing systray: False
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (inspection:206) python guestfs is not installed
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (engine:113) Loading stored URIs:
qemu:///session
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (engine:461) processing cli command uri=qemu:///session show_window=manager domain=
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:482) conn=qemu:///session changed to state=Connecting
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:902) Scheduling background open thread for qemu:///session
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (engine:211) Initial gtkapplication activated
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:952) libvirt version=7009000
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:953) daemon version=7009000
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:954) conn version=6001000
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:955) qemu:///session capabilities:
<capabilities>
# Removed a lot of stuff here due to length, but I can post it if necessary
</capabilities>

[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:964) Connection doesn't seem to support network APIs.
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:966) Connection doesn't seem to support nodedev APIs.
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:739) Using domain events
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:780) Error registering network events: this function is not supported by the connection driver: virConnectNetworkEventRegisterAny
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:796) Using storage pool events
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:824) Error registering node device events: this function is not supported by the connection driver: virConnectNodeDeviceEventRegisterAny
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (engine:299) Error polling connection qemu:///session
Traceback (most recent call last):
  File "/opt/homebrew/Cellar/virt-manager/HEAD-0c146b2_7/libexec/share/virt-manager/virtManager/engine.py", line 294, in _handle_tick_queue
    conn.tick_from_engine(**kwargs)
  File "/opt/homebrew/Cellar/virt-manager/HEAD-0c146b2_7/libexec/share/virt-manager/virtManager/connection.py", line 1321, in tick_from_engine
    self._tick(*args, **kwargs)
  File "/opt/homebrew/Cellar/virt-manager/HEAD-0c146b2_7/libexec/share/virt-manager/virtManager/connection.py", line 1204, in _tick
    self._hostinfo = self._backend.getInfo()
  File "/opt/homebrew/Cellar/virt-manager/HEAD-0c146b2_7/libexec/lib/python3.9/site-packages/libvirt.py", line 4565, in getInfo
    raise libvirtError('virNodeGetInfo() failed')
libvirt.libvirtError: cannot obtain CPU freq: No such file or directory
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:837) conn.close() uri=qemu:///session
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:482) conn=qemu:///session changed to state=Disconnected

@Damenly I installed from your repo and it seems to manage remote hosts well. I am however trying to get it to work with qemu:///session and it is not happy. I'm on the M1 Macbook Air FWIW
Here's the output of virt-manager --debug --no-fork with connection to qemu:///session

[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (cli:204) Launched with command line: /opt/homebrew/Cellar/virt-manager/HEAD-0c146b2_7/libexec/bin/virt-manager --debug --no-fork -c qemu:///session
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (virtmanager:167) virt-manager version: 3.2.0
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (virtmanager:168) virtManager import: /opt/homebrew/Cellar/virt-manager/HEAD-0c146b2_7/libexec/share/virt-manager/virtManager
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (virtmanager:205) PyGObject version: 3.41.0
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (virtmanager:209) GTK version: 3.24.30
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (systray:476) Showing systray: False
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (inspection:206) python guestfs is not installed
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (engine:113) Loading stored URIs:
qemu:///session
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (engine:461) processing cli command uri=qemu:///session show_window=manager domain=
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:482) conn=qemu:///session changed to state=Connecting
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:902) Scheduling background open thread for qemu:///session
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (engine:211) Initial gtkapplication activated
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:952) libvirt version=7009000
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:953) daemon version=7009000
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:954) conn version=6001000
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:955) qemu:///session capabilities:
<capabilities>
# Removed a lot of stuff here due to length, but I can post it if necessary
</capabilities>

[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:964) Connection doesn't seem to support network APIs.
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:966) Connection doesn't seem to support nodedev APIs.
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:739) Using domain events
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:780) Error registering network events: this function is not supported by the connection driver: virConnectNetworkEventRegisterAny
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:796) Using storage pool events
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:824) Error registering node device events: this function is not supported by the connection driver: virConnectNodeDeviceEventRegisterAny
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (engine:299) Error polling connection qemu:///session
Traceback (most recent call last):
  File "/opt/homebrew/Cellar/virt-manager/HEAD-0c146b2_7/libexec/share/virt-manager/virtManager/engine.py", line 294, in _handle_tick_queue
    conn.tick_from_engine(**kwargs)
  File "/opt/homebrew/Cellar/virt-manager/HEAD-0c146b2_7/libexec/share/virt-manager/virtManager/connection.py", line 1321, in tick_from_engine
    self._tick(*args, **kwargs)
  File "/opt/homebrew/Cellar/virt-manager/HEAD-0c146b2_7/libexec/share/virt-manager/virtManager/connection.py", line 1204, in _tick
    self._hostinfo = self._backend.getInfo()
  File "/opt/homebrew/Cellar/virt-manager/HEAD-0c146b2_7/libexec/lib/python3.9/site-packages/libvirt.py", line 4565, in getInfo
    raise libvirtError('virNodeGetInfo() failed')
libvirt.libvirtError: cannot obtain CPU freq: No such file or directory
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:837) conn.close() uri=qemu:///session
[Sun, 21 Nov 2021 16:55:47 virt-manager 1560] DEBUG (connection:482) conn=qemu:///session changed to state=Disconnected

Sorry, I didn't get your usage scenario. Do you want to add the m1 host itself to virt-manager? AFAIK, there is no libvirtd support in macOS. Even qemu-aarch64 is running on m1, I think it's libvirtd's work to create qemu sessions.

I have the same issue where virt-manager crash after try to connect the vm, but different error shown. Maybe this will help the investigation for this issue.

[Tue, 23 Nov 2021 23:52:48 virt-manager 28800] DEBUG (connection:777) Using network events
[Tue, 23 Nov 2021 23:52:48 virt-manager 28800] DEBUG (connection:796) Using storage pool events
[Tue, 23 Nov 2021 23:52:48 virt-manager 28800] DEBUG (connection:821) Using node device events
[Tue, 23 Nov 2021 23:52:48 virt-manager 28800] DEBUG (connection:1076) network=default status=Active added
[Tue, 23 Nov 2021 23:52:48 virt-manager 28800] DEBUG (connection:691) storage pool refresh event: pool=iso
[Tue, 23 Nov 2021 23:52:48 virt-manager 28800] DEBUG (connection:1076) pool=iso status=Active added
[Tue, 23 Nov 2021 23:52:48 virt-manager 28800] DEBUG (connection:691) storage pool refresh event: pool=default
[Tue, 23 Nov 2021 23:52:48 virt-manager 28800] DEBUG (connection:1076) domain=Win_7_64 status=Running added
[Tue, 23 Nov 2021 23:52:48 virt-manager 28800] DEBUG (connection:1076) pool=default status=Active added
[Tue, 23 Nov 2021 23:52:48 virt-manager 28800] DEBUG (connection:1076) domain=Win_7-clone status=Shutoff added
[Tue, 23 Nov 2021 23:52:48 virt-manager 28800] DEBUG (connection:1076) domain=Win_7 status=Running added
[Tue, 23 Nov 2021 23:52:49 virt-manager 28800] DEBUG (storage:139) Found default pool name=default target=/var/lib/libvirt/images
[Tue, 23 Nov 2021 23:52:49 virt-manager 28800] DEBUG (connection:482) conn=qemu+ssh://[email protected]/session?socket=/var/run/libvirt/libvirt-sock changed to state=Active
[Tue, 23 Nov 2021 23:52:49 virt-manager 28800] DEBUG (serialcon:17) Using VTE API 2.91
[Tue, 23 Nov 2021 23:52:49 virt-manager 28800] DEBUG (xmleditor:12) Using GtkSource 4
[Tue, 23 Nov 2021 23:52:50 virt-manager 28800] DEBUG (vmwindow:184) Showing VM details: <vmmDomain name=Win_7 id=0x10a2afb40>
[Tue, 23 Nov 2021 23:52:50 virt-manager 28800] DEBUG (engine:316) window counter incremented to 2
[Tue, 23 Nov 2021 23:52:50 virt-manager 28800] DEBUG (console:711) Starting connect process for proto=vnc trans=ssh connhost=192.168.0.100 connuser=joes connport= gaddr=127.0.0.1 gport=5900 gtlsport=None gsocket=None
[Tue, 23 Nov 2021 23:52:50 virt-manager 28800] DEBUG (sshtunnels:253) Pre-generated ssh command for ginfo: ssh -l joes 192.168.0.100 sh -c 'nc -q 2>&1 | grep "requires an argument" >/dev/null;if [ $? -eq 0 ] ; then   CMD="nc -q 0 127.0.0.1 5900";else   CMD="nc 127.0.0.1 5900";fi;eval "$CMD";'
[Tue, 23 Nov 2021 23:52:50 virt-manager 28800] DEBUG (sshtunnels:277) Generated tunnel fd=22 for viewer
[Tue, 23 Nov 2021 23:52:50 virt-manager 28800] DEBUG (sshtunnels:201) Opened tunnel PID=28805 ERRFD=20
Co-routine is yielding to no one
Abort trap: 6

@m-bers
Copy link

m-bers commented Nov 23, 2021

@liej6799 Are you sure this is the right connection string?

qemu+ssh://[email protected]/session?socket=/var/run/libvirt/libvirt-sock

I'd try this again with qemu:///system rather than qemu:///session unless you know libvirtd is running in a usermode session (as it is on my M1 Mac). This page explains the difference: https://wiki.libvirt.org/page/FAQ#What_is_the_difference_between_qemu:.2F.2F.2Fsystem_and_qemu:.2F.2F.2Fsession.3F_Which_one_should_I_use.3F

What command are you using to invoke virt-manager?

@liej6799
Copy link

@liej6799 Are you sure this is the right connection string?

qemu+ssh://[email protected]/session?socket=/var/run/libvirt/libvirt-sock

I'd try this again with qemu:///system rather than qemu:///session unless you know libvirtd is running in a usermode session (as it is on my M1 Mac). This page explains the difference: https://wiki.libvirt.org/page/FAQ#What_is_the_difference_between_qemu:.2F.2F.2Fsystem_and_qemu:.2F.2F.2Fsession.3F_Which_one_should_I_use.3F

What command are you using to invoke virt-manager?

This is the command i use to run the virt-manager

virt-manager -c 'qemu+ssh://[email protected]/system?socket=/var/run/libvirt/libvirt-sock' --debug --no-fork

What I did is replace the user@libvirthost with [email protected] from the guide

I also try virt-viewer

virt-viewer -c 'qemu+ssh://[email protected]/system?socket=/var/run/libvirt/libvirt-sock' --debug

And this is the error after select the vm to connect:

(virt-viewer:30929): virt-viewer-DEBUG: 21:09:25.596: connecting ...
(virt-viewer:30929): virt-viewer-DEBUG: 21:09:25.596: Opening connection to libvirt with URI qemu+ssh://[email protected]/system?socket=/var/run/libvirt/libvirt-sock
(virt-viewer:30929): virt-viewer-DEBUG: 21:09:26.063: initial connect
(virt-viewer:30929): virt-viewer-DEBUG: 21:09:26.064: notebook show status 0x12a022390
(virt-viewer:30929): virt-viewer-DEBUG: 21:09:28.110: virt_viewer_app_set_uuid_string: UUID changed to 340c5aba-1415-490a-8ec4-21e1f8b1b1a0
(virt-viewer:30929): virt-viewer-DEBUG: 21:09:28.116: notebook show status 0x12a022390
(virt-viewer:30929): virt-viewer-DEBUG: 21:09:28.122: Guest Win_7_64 is running, determining display
(virt-viewer:30929): virt-viewer-DEBUG: 21:09:28.129: Set connect info: (null),(null),-1,-1,(null),(null),(null),0
(virt-viewer:30929): virt-viewer-DEBUG: 21:09:28.130: Guest Win_7_64 has a vnc display
(virt-viewer:30929): virt-viewer-DEBUG: 21:09:28.132: Guest graphics address is 127.0.0.1:5902
(virt-viewer:30929): virt-viewer-DEBUG: 21:09:28.132: Set connect info: 192.168.0.100,127.0.0.1,5902,-1,ssh,(null),joes,0
(virt-viewer:30929): virt-viewer-DEBUG: 21:09:28.133: Error operation forbidden: read only access prevents virDomainOpenGraphicsFD
(virt-viewer:30929): virt-viewer-DEBUG: 21:09:28.133: After open connection callback fd=-1
(virt-viewer:30929): virt-viewer-DEBUG: 21:09:28.133: Opening indirect TCP connection to display at 127.0.0.1:5902
(virt-viewer:30929): virt-viewer-DEBUG: 21:09:28.133: Setting up SSH tunnel via [email protected]
(virt-viewer:30929): virt-viewer-DEBUG: 21:09:28.137: notebook show status 0x12a022390
(virt-viewer:30929): virt-viewer-DEBUG: 21:09:28.144: reconnect_poll: 0
(virt-viewer:30929): virt-viewer-DEBUG: 21:09:28.189: notebook show status 0x12a022390
(virt-viewer:30929): virt-viewer-DEBUG: 21:09:28.189: Insert display 0 0x10700eda0
(virt-viewer:30929): virt-viewer-DEBUG: 21:09:28.190: notebook show status 0x12a022390
(virt-viewer:30929): virt-viewer-DEBUG: 21:09:28.203: Allocated 1024x744
(virt-viewer:30929): virt-viewer-DEBUG: 21:09:28.203: Child allocate 1024x640
Co-routine is yielding to no one
Abort trap: 6

@andreabolognani
Copy link

Note that the ?socket=... part of the connection URI should no longer be needed, assuming your version of libvirt on both the client and server is 6.9.0 (released a year ago) or newer. See #157

To rule out issues deeper in libvirt or with the setup, I would first ensure that things like

$ virsh -c qemu+ssh://${user}@${host}/system list --all
$ virsh -c qemu+ssh://${user}@${host}/system start ${guest}
$ virsh -c qemu+ssh://${user}@${host}/system shutdown ${guest}

work correctly. One thing that comes to mind is that you'll want to make sure that ${user} is allowed to connect to qemu:///system on ${host}. This is usually achieved by adding it to the libvirt group.

@WowYouCanReallyDance
Copy link

WowYouCanReallyDance commented Dec 10, 2021

==> Installing virt-manager from jeffreywildman/virt-manager

@orgazmer you are installing from jeffreywildman repository. Try: brew remove virt-manager brew remove virt-viewer brew untap jeffreywildman/homebrew-virt-manager

and run

brew tap Krish-sysadmin/homebrew-virt-manager brew install virt-manager virt-viewer

this is very very useful to me! Thanks too much! love you teh.

@krishjainx
Copy link

Sure, anytime ;) @WowYouCanReallyDance

@angryhamsterx
Copy link

angryhamsterx commented Dec 13, 2021

@liej6799 Are you sure this is the right connection string?

qemu+ssh://[email protected]/session?socket=/var/run/libvirt/libvirt-sock

I'd try this again with qemu:///system rather than qemu:///session unless you know libvirtd is running in a usermode session (as it is on my M1 Mac). This page explains the difference: https://wiki.libvirt.org/page/FAQ#What_is_the_difference_between_qemu:.2F.2F.2Fsystem_and_qemu:.2F.2F.2Fsession.3F_Which_one_should_I_use.3F
What command are you using to invoke virt-manager?

This is the command i use to run the virt-manager

virt-manager -c 'qemu+ssh://[email protected]/system?socket=/var/run/libvirt/libvirt-sock' --debug --no-fork

What I did is replace the user@libvirthost with [email protected] from the guide

I also try virt-viewer

virt-viewer -c 'qemu+ssh://[email protected]/system?socket=/var/run/libvirt/libvirt-sock' --debug

And this is the error after select the vm to connect:

(virt-viewer:30929): virt-viewer-DEBUG: 21:09:25.596: connecting ...
(virt-viewer:30929): virt-viewer-DEBUG: 21:09:25.596: Opening connection to libvirt with URI qemu+ssh://[email protected]/system?socket=/var/run/libvirt/libvirt-sock
(virt-viewer:30929): virt-viewer-DEBUG: 21:09:26.063: initial connect
(virt-viewer:30929): virt-viewer-DEBUG: 21:09:26.064: notebook show status 0x12a022390
(virt-viewer:30929): virt-viewer-DEBUG: 21:09:28.110: virt_viewer_app_set_uuid_string: UUID changed to 340c5aba-1415-490a-8ec4-21e1f8b1b1a0
(virt-viewer:30929): virt-viewer-DEBUG: 21:09:28.116: notebook show status 0x12a022390
(virt-viewer:30929): virt-viewer-DEBUG: 21:09:28.122: Guest Win_7_64 is running, determining display
(virt-viewer:30929): virt-viewer-DEBUG: 21:09:28.129: Set connect info: (null),(null),-1,-1,(null),(null),(null),0
(virt-viewer:30929): virt-viewer-DEBUG: 21:09:28.130: Guest Win_7_64 has a vnc display
(virt-viewer:30929): virt-viewer-DEBUG: 21:09:28.132: Guest graphics address is 127.0.0.1:5902
(virt-viewer:30929): virt-viewer-DEBUG: 21:09:28.132: Set connect info: 192.168.0.100,127.0.0.1,5902,-1,ssh,(null),joes,0
(virt-viewer:30929): virt-viewer-DEBUG: 21:09:28.133: Error operation forbidden: read only access prevents virDomainOpenGraphicsFD
(virt-viewer:30929): virt-viewer-DEBUG: 21:09:28.133: After open connection callback fd=-1
(virt-viewer:30929): virt-viewer-DEBUG: 21:09:28.133: Opening indirect TCP connection to display at 127.0.0.1:5902
(virt-viewer:30929): virt-viewer-DEBUG: 21:09:28.133: Setting up SSH tunnel via [email protected]
(virt-viewer:30929): virt-viewer-DEBUG: 21:09:28.137: notebook show status 0x12a022390
(virt-viewer:30929): virt-viewer-DEBUG: 21:09:28.144: reconnect_poll: 0
(virt-viewer:30929): virt-viewer-DEBUG: 21:09:28.189: notebook show status 0x12a022390
(virt-viewer:30929): virt-viewer-DEBUG: 21:09:28.189: Insert display 0 0x10700eda0
(virt-viewer:30929): virt-viewer-DEBUG: 21:09:28.190: notebook show status 0x12a022390
(virt-viewer:30929): virt-viewer-DEBUG: 21:09:28.203: Allocated 1024x744
(virt-viewer:30929): virt-viewer-DEBUG: 21:09:28.203: Child allocate 1024x640
Co-routine is yielding to no one
Abort trap: 6

Hi. I have same issue.

I've made some research, and found bug appears when you try to open virtual machine with VNC display. If virtual machine configured to Spice display virt-manager works fine.
This issue Co-routine is yielding to no one caused by gtk-vnc, which is use deprecated(?) ucontext for manage user thread.
I don't know why it works before and stops work after, may be because of macos bug or something else. However spice-gtk, that uses ucontext too, works good.

I rebuild gtk-vnc with with-coroutine=gthread, and get virt-manager works again!
However this is more workaround than full fix.

Run
brew edit gtk-vnc

and replace all content with:

class GtkVnc < Formula
  desc "VNC viewer widget for GTK"
  homepage "https://wiki.gnome.org/Projects/gtk-vnc"
  url "https://download.gnome.org/sources/gtk-vnc/1.3/gtk-vnc-1.3.0.tar.xz"
  sha256 "5faaa5823b8cbe8c0b0ba1e456c4e70c4b1ae6685c9fe81a4282d98cf00a211d"
  license "LGPL-2.1-or-later"

  depends_on "gettext" => :build
  depends_on "gobject-introspection" => :build
  depends_on "meson" => :build
  depends_on "ninja" => :build
  depends_on "pkg-config" => :build
  depends_on "gnutls"
  depends_on "gtk+3"
  depends_on "libgcrypt"

  def install
    mkdir "build" do
      # This is workaround. MacOS has deprecate coroutine ucontext.
      # It needs to be fixed in gtk-vnc - use gthread coroutines.
      on_macos do
        system "meson", *std_meson_args, "-Dwith-coroutine=gthread", ".."
      end
      on_linux do
        system "meson", *std_meson_args, ".."
      end
      system "ninja", "-v"
      system "ninja", "install", "-v"
    end
  end

  test do
    system "#{bin}/gvnccapture", "--help"
  end
end

PS. I use gtk-vnc-1.3.0 and removed all patches for previous version.

Then build/install with:

brew reinstall --build-from-source gtk-vnc

@Damenly, I want to say thank you for virt-manager formula with virt-manager for version 3.2.0.

@Menci
Copy link

Menci commented Feb 5, 2022

Now you can use my tap: https://github.com/Menci/homebrew-libvirt-m1

I included the gtk-vnc patch by @angryhamsterx and my libvirtd patch to resolve @m-bers's issue of running VMs locally on Apple Silicon.

I'am trying to submit my patch of libvirtd to upstream or homebrew. And @angryhamsterx would you please submit your patched gtk-vnc formulae to homebrew?

@Menci
Copy link

Menci commented Feb 10, 2022

With my follow up, libvirt added support for Apple Silicon in this patch. I'll try to get in touch with Homebrew to backport it to v7.10.0.

@andreabolognani
Copy link

andreabolognani commented Feb 14, 2022

With my follow up, libvirt added support for Apple Silicon in this patch. I'll try to get in touch with Homebrew to backport it to v7.10.0.

@Menci libvirt 8.1.0, which contains the CPU frequency detection fix that we worked on as well as proper hvf support, will be released in a couple of weeks. When that happens, I'll submit an update to Homebrew. So I think it's okay to just wait it out :)

@andreabolognani
Copy link

On the other hand, it would be great if the QEMU driver configuration tweaks you mention in your repo would be integrated in the Homebrew package or, even better, in upstream libvirt so that things work out of the box.

@stonerxs
Copy link

stonerxs commented Mar 5, 2022


macos x86 10.15.7

any suggestions to try out?

I have the same problem,

fork didn't help

==> Installing virt-manager from krish-sysadmin/virt-manager
==> Patching
==> python3 -m venv --system-site-packages /usr/local/Cellar/virt-manager/2.2.1_3/libexec
==> /usr/local/Cellar/virt-manager/2.2.1_3/libexec/bin/pip install -v --no-deps --no-binary :all: --ignore-installed /private/tmp/virt-manager--libvirt-python-20211004-53387-wai36j/libvirt-python-7.6.0
Last 15 lines from /Users/slam/Library/Logs/Homebrew/virt-manager/02.pip:
    Running setup.py install for libvirt-python: started
    Running command /usr/local/Cellar/virt-manager/2.2.1_3/libexec/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/pip-req-build-vftfff4u/setup.py'"'"'; __file__='"'"'/private/tmp/pip-req-build-vftfff4u/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/tmp/pip-record-rv8_d26z/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/Cellar/virt-manager/2.2.1_3/libexec/include/site/python3.9/libvirt-python
    running install
    running build
    /usr/local/Homebrew/Library/Homebrew/shims/mac/super/pkg-config --print-errors --atleast-version=0.9.11 libvirt
    /usr/local/Cellar/virt-manager/2.2.1_3/libexec/bin/python3.9 generator.py libvirt /usr/local/Cellar/libvirt/7.8.0/share/libvirt/api/libvirt-api.xml
    Found 492 functions in /usr/local/Cellar/libvirt/7.8.0/share/libvirt/api/libvirt-api.xml
    Found 0 functions in libvirt-override-api.xml
    Generated 402 wrapper functions
    Missing type converters:
    int *:1
    ERROR: failed virNodeDeviceGetAutostart
    error: command '/usr/local/Cellar/virt-manager/2.2.1_3/libexec/bin/python3.9' failed with exit code 1
    Running setup.py install for libvirt-python: finished with status 'error'
ERROR: Command errored out with exit status 1: /usr/local/Cellar/virt-manager/2.2.1_3/libexec/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/pip-req-build-vftfff4u/setup.py'"'"'; __file__='"'"'/private/tmp/pip-req-build-vftfff4u/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/tmp/pip-record-rv8_d26z/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/Cellar/virt-manager/2.2.1_3/libexec/include/site/python3.9/libvirt-python Check the logs for full command output.

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
  https://github.com/krish-sysadmin/homebrew-virt-manager/issues

macos x86 10.15.7

any suggestions to try out?

I have the same problem. Have you solved it?

@vadim015
Copy link

vadim015 commented Mar 24, 2022

Same here:

==> Installing virt-manager from jeffreywildman/virt-manager
==> Patching
==> python3 -m venv --system-site-packages /usr/local/Cellar/virt-manager/2.2.1_3/libexec
==> /usr/local/Cellar/virt-manager/2.2.1_3/libexec/bin/pip install -v --no-deps --no-binary :all: --ignore-installed /private/
Last 15 lines from /Users/vivlev/Library/Logs/Homebrew/virt-manager/02.pip:
Found 493 functions in /usr/local/Cellar/libvirt/8.1.0/share/libvirt/api/libvirt-api.xml
Found 0 functions in libvirt-override-api.xml
Generated 401 wrapper functions
Missing type converters:
char ***:1
virTypedParameterPtr:1
int *:1
ERROR: failed virDomainGetMessages
ERROR: failed virDomainSetLaunchSecurityState
ERROR: failed virNodeDeviceGetAutostart
error: command '/usr/local/Cellar/virt-manager/2.2.1_3/libexec/bin/python3.9' failed with exit code 1
Running setup.py install for libvirt-python: finished with status 'error'
ERROR: Command errored out with exit status 1: /usr/local/Cellar/virt-manager/2.2.1_3/libexec/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/virt-manager--libvirt-python-20220324-93226-1aucrka/libvirt-python-6.10.0/setup.py'"'"'; file='"'"'/private/tmp/virt-manager--libvirt-python-20220324-93226-1aucrka/libvirt-python-6.10.0/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/tmp/pip-record-x_4hvub6/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/Cellar/virt-manager/2.2.1_3/libexec/include/site/python3.9/libvirt-python Check the logs for full command output.
WARNING: You are using pip version 21.3.1; however, version 22.0.4 is available.
You should consider upgrading via the '/usr/local/Cellar/virt-manager/2.2.1_3/libexec/bin/python3.9 -m pip install --upgrade pip' command.

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
https://github.com/jeffreywildman/homebrew-virt-manager/issues

These open issues may also help:
virt-manager installation error #184
bump virt-manager/view-viewer and deps #166
Error installing virt-manager #145
virt-manager: command not found #177
virt-manager: command not found #169
virt-manager crashed when opening a VM on remote host #180
osx virt-manager console screen is black #113
virt-manager broken on Big Sur after minor update #170
Assertion Error When Running Virt-Manager on MacOS BigSur #174
Virt-manager wont build. Update to libvirt-python #171
cannot install virt-manager, error with python version despite having python 3.9 installed #172
virt-manager crashing with Python quit unexpectedly while using the libgdk-3.0.dylib #62
➜ ~ python3 --version
Python 3.9.10
➜ ~ sw_vers
ProductName: macOS
ProductVersion: 11.6.5
BuildVersion: 20G527
➜ ~ brew --version
Homebrew 3.4.3
Homebrew/homebrew-core (git revision b778aca14d2; last commit 2022-03-24)
Homebrew/homebrew-cask (git revision a7fb38b1e1; last commit 2022-03-24)

Also tried "arthurk/homebrew-virt-manager" and "Krish-sysadmin/homebrew-virt-manager" with the same result.

@Damenly
Copy link

Damenly commented Mar 25, 2022

Same here:

==> Installing virt-manager from jeffreywildman/virt-manager ==> Patching ==> python3 -m venv --system-site-packages /usr/local/Cellar/virt-manager/2.2.1_3/libexec ==> /usr/local/Cellar/virt-manager/2.2.1_3/libexec/bin/pip install -v --no-deps --no-binary :all: --ignore-installed /private/ Last 15 lines from /Users/vivlev/Library/Logs/Homebrew/virt-manager/02.pip: Found 493 functions in /usr/local/Cellar/libvirt/8.1.0/share/libvirt/api/libvirt-api.xml Found 0 functions in libvirt-override-api.xml Generated 401 wrapper functions Missing type converters: char ***:1 virTypedParameterPtr:1 int *:1 ERROR: failed virDomainGetMessages ERROR: failed virDomainSetLaunchSecurityState ERROR: failed virNodeDeviceGetAutostart error: command '/usr/local/Cellar/virt-manager/2.2.1_3/libexec/bin/python3.9' failed with exit code 1 Running setup.py install for libvirt-python: finished with status 'error' ERROR: Command errored out with exit status 1: /usr/local/Cellar/virt-manager/2.2.1_3/libexec/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/virt-manager--libvirt-python-20220324-93226-1aucrka/libvirt-python-6.10.0/setup.py'"'"'; file='"'"'/private/tmp/virt-manager--libvirt-python-20220324-93226-1aucrka/libvirt-python-6.10.0/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/tmp/pip-record-x_4hvub6/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/Cellar/virt-manager/2.2.1_3/libexec/include/site/python3.9/libvirt-python Check the logs for full command output. WARNING: You are using pip version 21.3.1; however, version 22.0.4 is available. You should consider upgrading via the '/usr/local/Cellar/virt-manager/2.2.1_3/libexec/bin/python3.9 -m pip install --upgrade pip' command.

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core): https://github.com/jeffreywildman/homebrew-virt-manager/issues

These open issues may also help: virt-manager installation error #184 bump virt-manager/view-viewer and deps #166 Error installing virt-manager #145 virt-manager: command not found #177 virt-manager: command not found #169 virt-manager crashed when opening a VM on remote host #180 osx virt-manager console screen is black #113 virt-manager broken on Big Sur after minor update #170 Assertion Error When Running Virt-Manager on MacOS BigSur #174 Virt-manager wont build. Update to libvirt-python #171 cannot install virt-manager, error with python version despite having python 3.9 installed #172 virt-manager crashing with Python quit unexpectedly while using the libgdk-3.0.dylib #62 ➜ ~ python3 --version Python 3.9.10 ➜ ~ sw_vers ProductName: macOS ProductVersion: 11.6.5 BuildVersion: 20G527 ➜ ~ brew --version Homebrew 3.4.3 Homebrew/homebrew-core (git revision b778aca14d2; last commit 2022-03-24) Homebrew/homebrew-cask (git revision a7fb38b1e1; last commit 2022-03-24)

Also tried "arthurk/homebrew-virt-manager" and "Krish-sysadmin/homebrew-virt-manager" with the same result.

Could you please try my repo https://github.com/Damenly/homebrew-virt-manager?
The tap jeffreywildman hasn't been updated since 2 years ago.

@vadim015
Copy link

vadim015 commented Mar 25, 2022

Same here:
==> Installing virt-manager from jeffreywildman/virt-manager ==> Patching ==> python3 -m venv --system-site-packages /usr/local/Cellar/virt-manager/2.2.1_3/libexec ==> /usr/local/Cellar/virt-manager/2.2.1_3/libexec/bin/pip install -v --no-deps --no-binary :all: --ignore-installed /private/ Last 15 lines from /Users/vivlev/Library/Logs/Homebrew/virt-manager/02.pip: Found 493 functions in /usr/local/Cellar/libvirt/8.1.0/share/libvirt/api/libvirt-api.xml Found 0 functions in libvirt-override-api.xml Generated 401 wrapper functions Missing type converters: char ***:1 virTypedParameterPtr:1 int *:1 ERROR: failed virDomainGetMessages ERROR: failed virDomainSetLaunchSecurityState ERROR: failed virNodeDeviceGetAutostart error: command '/usr/local/Cellar/virt-manager/2.2.1_3/libexec/bin/python3.9' failed with exit code 1 Running setup.py install for libvirt-python: finished with status 'error' ERROR: Command errored out with exit status 1: /usr/local/Cellar/virt-manager/2.2.1_3/libexec/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/virt-manager--libvirt-python-20220324-93226-1aucrka/libvirt-python-6.10.0/setup.py'"'"'; file='"'"'/private/tmp/virt-manager--libvirt-python-20220324-93226-1aucrka/libvirt-python-6.10.0/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/tmp/pip-record-x_4hvub6/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/Cellar/virt-manager/2.2.1_3/libexec/include/site/python3.9/libvirt-python Check the logs for full command output. WARNING: You are using pip version 21.3.1; however, version 22.0.4 is available. You should consider upgrading via the '/usr/local/Cellar/virt-manager/2.2.1_3/libexec/bin/python3.9 -m pip install --upgrade pip' command.
If reporting this issue please do so at (not Homebrew/brew or Homebrew/core): https://github.com/jeffreywildman/homebrew-virt-manager/issues
These open issues may also help: virt-manager installation error #184 bump virt-manager/view-viewer and deps #166 Error installing virt-manager #145 virt-manager: command not found #177 virt-manager: command not found #169 virt-manager crashed when opening a VM on remote host #180 osx virt-manager console screen is black #113 virt-manager broken on Big Sur after minor update #170 Assertion Error When Running Virt-Manager on MacOS BigSur #174 Virt-manager wont build. Update to libvirt-python #171 cannot install virt-manager, error with python version despite having python 3.9 installed #172 virt-manager crashing with Python quit unexpectedly while using the libgdk-3.0.dylib #62 ➜ ~ python3 --version Python 3.9.10 ➜ ~ sw_vers ProductName: macOS ProductVersion: 11.6.5 BuildVersion: 20G527 ➜ ~ brew --version Homebrew 3.4.3 Homebrew/homebrew-core (git revision b778aca14d2; last commit 2022-03-24) Homebrew/homebrew-cask (git revision a7fb38b1e1; last commit 2022-03-24)
Also tried "arthurk/homebrew-virt-manager" and "Krish-sysadmin/homebrew-virt-manager" with the same result.

Could you please try my repo https://github.com/Damenly/homebrew-virt-manager? The tap jeffreywildman hasn't been updated since 2 years ago.

Thank you, @Damenly!

It looks better, but still fails, eventually, with a different error:

➜ brew install virt-manager virt-viewer
==> Downloading https://files.pythonhosted.org/packages/6d/78/f8db8d57f520a54f0b8a438319c342c61c22759d8f9a1cd2e2180b5e5ea9/cer
######################################################################## 100.0%
==> Downloading https://files.pythonhosted.org/packages/eb/7f/a6c278746ddbd7094b019b08d1b2187101b1f596f35f81dc27f57d8fcf7c/cha
######################################################################## 100.0%
==> Downloading https://files.pythonhosted.org/packages/cb/38/4c4d00ddfa48abe616d7e572e02a04273603db446975ab46bbcd36552005/idn
######################################################################## 100.0%
==> Downloading https://files.pythonhosted.org/packages/2a/74/919462bed158ccc2a8061f31d82c157740c2e597ff50490526336e8aa688/lib
######################################################################## 100.0%
==> Downloading https://files.pythonhosted.org/packages/bc/3f/64e6e066d163fbcf13213f9eeda0fc83376243335ea46a66cefd70d62e8f/pyc
######################################################################## 100.0%
==> Downloading https://files.pythonhosted.org/packages/e7/01/3569e0b535fb2e4a6c384bdbed00c55b9d78b5084e0fb7f4d0bf523d7670/req
######################################################################## 100.0%
==> Downloading https://files.pythonhosted.org/packages/80/be/3ee43b6c5757cabea19e75b8f46eaf05a2f5144107d7db48c7cf3a864f73/url
######################################################################## 100.0%
==> Downloading https://virt-manager.org/download/sources/virt-manager/virt-manager-3.2.0.tar.gz
Already downloaded: /Users/vivlev/Library/Caches/Homebrew/downloads/076c9cd7ebc326805adadb4c0525544e05ef6183614a8937cd21a39364835fe6--virt-manager-3.2.0.tar.gz
==> Downloading https://virt-manager.org/download/sources/virt-viewer/virt-viewer-9.0.tar.gz
==> Downloading from https://releases.pagure.org/virt-viewer/virt-viewer-9.0.tar.gz
######################################################################## 100.0%
==> Installing virt-manager from damenly/virt-manager
==> Patching
==> python3 -m venv --system-site-packages /usr/local/Cellar/virt-manager/3.2.0_7/libexec
==> python3 -m venv --upgrade-deps /usr/local/Cellar/virt-manager/3.2.0_7/libexec
==> /usr/local/Cellar/virt-manager/3.2.0_7/libexec/bin/pip install -v --no-deps --no-binary :all: --ignore-installed /private/
==> /usr/local/Cellar/virt-manager/3.2.0_7/libexec/bin/pip install -v --no-deps --no-binary :all: --ignore-installed /private/
==> /usr/local/Cellar/virt-manager/3.2.0_7/libexec/bin/pip install -v --no-deps --no-binary :all: --ignore-installed /private/
==> /usr/local/Cellar/virt-manager/3.2.0_7/libexec/bin/pip install -v --no-deps --no-binary :all: --ignore-installed /private/
==> /usr/local/Cellar/virt-manager/3.2.0_7/libexec/bin/pip install -v --no-deps --no-binary :all: --ignore-installed /private/
==> /usr/local/Cellar/virt-manager/3.2.0_7/libexec/bin/pip install -v --no-deps --no-binary :all: --ignore-installed /private/
==> /usr/local/Cellar/virt-manager/3.2.0_7/libexec/bin/pip install -v --no-deps --no-binary :all: --ignore-installed /private/
==> /usr/local/Cellar/virt-manager/3.2.0_7/libexec/bin/python setup.py configure --prefix=/usr/local/Cellar/virt-manager/3.2.0
Last 15 lines from /Users/vivlev/Library/Logs/Homebrew/virt-manager/10.python:

error: Multiple top-level packages discovered in a flat-layout: ['ui', 'po', 'man', 'data', 'virtinst', 'virtManager'].

To avoid accidental inclusion of unwanted files or directories,
setuptools will not proceed with this build.

If you are trying to create a single distribution with multiple packages
on purpose, you should not rely on automatic discovery.
Instead, consider the following options:

  1. set up custom discovery (find directive with include or exclude)
  2. use a src-layout
  3. explicitly set py_modules or packages with a list of names

To find more information, look for "package discovery" on setuptools docs.

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
https://github.com/damenly/homebrew-virt-manager/issues

Btw, this is on Intel-based 2019 MacBook Pro with Big Sur Version: 11.6.5 (20G527).

@fragrant10
Copy link

I have the same problem.
There is a bug of python3.9. python3.9 setuptools - bug

So I just change my python version of virt-manager.rb file. itis ok now!

like this:

venv = virtualenv_create(libexec, "/opt/homebrew/Caskroom/miniconda/base/bin/python3.8")

image

@vadim015

@Damenly
Copy link

Damenly commented Apr 7, 2022

Same here:
==> Installing virt-manager from jeffreywildman/virt-manager ==> Patching ==> python3 -m venv --system-site-packages /usr/local/Cellar/virt-manager/2.2.1_3/libexec ==> /usr/local/Cellar/virt-manager/2.2.1_3/libexec/bin/pip install -v --no-deps --no-binary :all: --ignore-installed /private/ Last 15 lines from /Users/vivlev/Library/Logs/Homebrew/virt-manager/02.pip: Found 493 functions in /usr/local/Cellar/libvirt/8.1.0/share/libvirt/api/libvirt-api.xml Found 0 functions in libvirt-override-api.xml Generated 401 wrapper functions Missing type converters: char ***:1 virTypedParameterPtr:1 int *:1 ERROR: failed virDomainGetMessages ERROR: failed virDomainSetLaunchSecurityState ERROR: failed virNodeDeviceGetAutostart error: command '/usr/local/Cellar/virt-manager/2.2.1_3/libexec/bin/python3.9' failed with exit code 1 Running setup.py install for libvirt-python: finished with status 'error' ERROR: Command errored out with exit status 1: /usr/local/Cellar/virt-manager/2.2.1_3/libexec/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/virt-manager--libvirt-python-20220324-93226-1aucrka/libvirt-python-6.10.0/setup.py'"'"'; file='"'"'/private/tmp/virt-manager--libvirt-python-20220324-93226-1aucrka/libvirt-python-6.10.0/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/tmp/pip-record-x_4hvub6/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/Cellar/virt-manager/2.2.1_3/libexec/include/site/python3.9/libvirt-python Check the logs for full command output. WARNING: You are using pip version 21.3.1; however, version 22.0.4 is available. You should consider upgrading via the '/usr/local/Cellar/virt-manager/2.2.1_3/libexec/bin/python3.9 -m pip install --upgrade pip' command.
If reporting this issue please do so at (not Homebrew/brew or Homebrew/core): https://github.com/jeffreywildman/homebrew-virt-manager/issues
These open issues may also help: virt-manager installation error #184 bump virt-manager/view-viewer and deps #166 Error installing virt-manager #145 virt-manager: command not found #177 virt-manager: command not found #169 virt-manager crashed when opening a VM on remote host #180 osx virt-manager console screen is black #113 virt-manager broken on Big Sur after minor update #170 Assertion Error When Running Virt-Manager on MacOS BigSur #174 Virt-manager wont build. Update to libvirt-python #171 cannot install virt-manager, error with python version despite having python 3.9 installed #172 virt-manager crashing with Python quit unexpectedly while using the libgdk-3.0.dylib #62 ➜ ~ python3 --version Python 3.9.10 ➜ ~ sw_vers ProductName: macOS ProductVersion: 11.6.5 BuildVersion: 20G527 ➜ ~ brew --version Homebrew 3.4.3 Homebrew/homebrew-core (git revision b778aca14d2; last commit 2022-03-24) Homebrew/homebrew-cask (git revision a7fb38b1e1; last commit 2022-03-24)
Also tried "arthurk/homebrew-virt-manager" and "Krish-sysadmin/homebrew-virt-manager" with the same result.

Could you please try my repo https://github.com/Damenly/homebrew-virt-manager? The tap jeffreywildman hasn't been updated since 2 years ago.

Thank you, @Damenly!

It looks better, but still fails, eventually, with a different error:

➜ brew install virt-manager virt-viewer ==> Downloading https://files.pythonhosted.org/packages/6d/78/f8db8d57f520a54f0b8a438319c342c61c22759d8f9a1cd2e2180b5e5ea9/cer ######################################################################## 100.0% ==> Downloading https://files.pythonhosted.org/packages/eb/7f/a6c278746ddbd7094b019b08d1b2187101b1f596f35f81dc27f57d8fcf7c/cha ######################################################################## 100.0% ==> Downloading https://files.pythonhosted.org/packages/cb/38/4c4d00ddfa48abe616d7e572e02a04273603db446975ab46bbcd36552005/idn ######################################################################## 100.0% ==> Downloading https://files.pythonhosted.org/packages/2a/74/919462bed158ccc2a8061f31d82c157740c2e597ff50490526336e8aa688/lib ######################################################################## 100.0% ==> Downloading https://files.pythonhosted.org/packages/bc/3f/64e6e066d163fbcf13213f9eeda0fc83376243335ea46a66cefd70d62e8f/pyc ######################################################################## 100.0% ==> Downloading https://files.pythonhosted.org/packages/e7/01/3569e0b535fb2e4a6c384bdbed00c55b9d78b5084e0fb7f4d0bf523d7670/req ######################################################################## 100.0% ==> Downloading https://files.pythonhosted.org/packages/80/be/3ee43b6c5757cabea19e75b8f46eaf05a2f5144107d7db48c7cf3a864f73/url ######################################################################## 100.0% ==> Downloading https://virt-manager.org/download/sources/virt-manager/virt-manager-3.2.0.tar.gz Already downloaded: /Users/vivlev/Library/Caches/Homebrew/downloads/076c9cd7ebc326805adadb4c0525544e05ef6183614a8937cd21a39364835fe6--virt-manager-3.2.0.tar.gz ==> Downloading https://virt-manager.org/download/sources/virt-viewer/virt-viewer-9.0.tar.gz ==> Downloading from https://releases.pagure.org/virt-viewer/virt-viewer-9.0.tar.gz ######################################################################## 100.0% ==> Installing virt-manager from damenly/virt-manager ==> Patching ==> python3 -m venv --system-site-packages /usr/local/Cellar/virt-manager/3.2.0_7/libexec ==> python3 -m venv --upgrade-deps /usr/local/Cellar/virt-manager/3.2.0_7/libexec ==> /usr/local/Cellar/virt-manager/3.2.0_7/libexec/bin/pip install -v --no-deps --no-binary :all: --ignore-installed /private/ ==> /usr/local/Cellar/virt-manager/3.2.0_7/libexec/bin/pip install -v --no-deps --no-binary :all: --ignore-installed /private/ ==> /usr/local/Cellar/virt-manager/3.2.0_7/libexec/bin/pip install -v --no-deps --no-binary :all: --ignore-installed /private/ ==> /usr/local/Cellar/virt-manager/3.2.0_7/libexec/bin/pip install -v --no-deps --no-binary :all: --ignore-installed /private/ ==> /usr/local/Cellar/virt-manager/3.2.0_7/libexec/bin/pip install -v --no-deps --no-binary :all: --ignore-installed /private/ ==> /usr/local/Cellar/virt-manager/3.2.0_7/libexec/bin/pip install -v --no-deps --no-binary :all: --ignore-installed /private/ ==> /usr/local/Cellar/virt-manager/3.2.0_7/libexec/bin/pip install -v --no-deps --no-binary :all: --ignore-installed /private/ ==> /usr/local/Cellar/virt-manager/3.2.0_7/libexec/bin/python setup.py configure --prefix=/usr/local/Cellar/virt-manager/3.2.0 Last 15 lines from /Users/vivlev/Library/Logs/Homebrew/virt-manager/10.python:

error: Multiple top-level packages discovered in a flat-layout: ['ui', 'po', 'man', 'data', 'virtinst', 'virtManager'].

To avoid accidental inclusion of unwanted files or directories, setuptools will not proceed with this build.

If you are trying to create a single distribution with multiple packages on purpose, you should not rely on automatic discovery. Instead, consider the following options:

  1. set up custom discovery (find directive with include or exclude)
  2. use a src-layout
  3. explicitly set py_modules or packages with a list of names

To find more information, look for "package discovery" on setuptools docs.

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core): https://github.com/damenly/homebrew-virt-manager/issues

Btw, this is on Intel-based 2019 MacBook Pro with Big Sur Version: 11.6.5 (20G527).

Sorry for the late reply. Fixed in my repo. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests