Comments (15)
from docker-virt-manager.
Same here. I'm running this docker image on Ubuntu 18.04. Did you find how to fix it?
from docker-virt-manager.
Also seeing this on Ubuntu 20.04
from docker-virt-manager.
Same thing is happening for me. I am on Ubuntu 21.04, all on same host as virsh.
This is a great project, would be good to be able to use it.
from docker-virt-manager.
Try building your own image from the source, and I also published a new image about a week ago that seems to be working for me with qemu:///system.
What URI(s) was everyone connecting to?
from docker-virt-manager.
I just re-installed using:
git clone https://github.com/m-bers/docker-virt-manager.git
cd docker-virt-manager
docker build -t docker-virt-manager . && docker-compose up -d
Both are on same host. Im going to http://192.168.1.100:8185, all loads fine, but when I try and open a running VM, I get the same 'error connecting, permission denied' as above.
Is there something else, some other setting, change I need to make?
from docker-virt-manager.
I also just tried building and also the latest published image. Same error. Ubuntu 20.04.
from docker-virt-manager.
I can't figure out how to replicate this issue but it's obvious that I'm doing something differently than all of you.
I just built a completely fresh arch install, installed qemu, libvirt, and edk2-ovmf, then ran
git clone https://github.com/m-bers/docker-virt-manager.git
cd docker-virt-manager
docker-compose up -d
I downloaded an ubuntu server iso and copied it to /var/lib/libvirt/images and created a new VM. I got to the graphical console immediately with no errors. Maybe this is specific to ubuntu hosts? I will test this on an ubuntu host when I get the chance.
from docker-virt-manager.
It may be Ubuntu host. For guests, I've tried Win10 and Ubuntu 16.04 and gotten the error. Using Ubuntu 20.04 host.
from docker-virt-manager.
Weirdly enough, I can reproduce the issue as well. I haven't figured it out yet too, but I can confirm that this happens (dunno if "only") under Ubuntu 18.04.6 LTS.
@m-bers Is there anything you'd like me to check I'm happy to help.
from docker-virt-manager.
@sevospl I am about to wipe arch and install ubuntu instead to test this out, but I'm really puzzled if this is broken specifically in ubuntu since this container runs in an ubuntu 20.04 image (so the volume mounts for libvirt should be the same)
from docker-virt-manager.
Alright, y'all are absolutely not crazy. I was able to replicate this issue on an ubuntu host and I will try to figure this out now.
from docker-virt-manager.
Thanks m-bers, we all really appreciate this work.
from docker-virt-manager.
For a hacky fix, make the container privileged:
services:
virt-manager:
image: mber5/virt-manager:latest
restart: always
ports:
- 8185:80
environment:
HOSTS: "['qemu:///system']"
privileged: true
volumes:
- "/var/run/libvirt/libvirt-sock:/var/run/libvirt/libvirt-sock"
- "/var/lib/libvirt/images:/var/lib/libvirt/images"
devices:
- "/dev/kvm:/dev/kvm"
EDIT: Another potentially less problematic (but still hacky) fix would be to just use the ssh method and connect to localhost.
It looks like this is related to AppArmor settings on Ubuntu. Docker does let you set custom AppArmor profiles , so I will look into this next.
This was the corresponding error to Error connecting to graphical console: Failed to recv file descriptor: permission denied
in my dmesg log:
[ 690.890536] audit: type=1400 audit(1635108398.301:57): apparmor="DENIED" operation="ptrace" profile="libvirtd" pid=1310 comm="libvirtd" requested_mask="read" denied_mask="read" peer="docker-default"
from docker-virt-manager.
Gonna close this since I documented the workarounds for Ubuntu in the README.md
from docker-virt-manager.
Related Issues (11)
- Auto restart virt-manager if accidentally closed
- Keyboard Layout HOT 1
- Device Panel opens for a second then closes and disconnects - Permission denied
- Permission denied during VM installation HOT 6
- localhost kvm without libvirt
- Unable to connect HOT 2
- Unable to use custom ssh port HOT 3
- empty screen via https reverse proxy - websocket problem HOT 6
- unable connect to remote server HOT 4
- Error connecting to graphical console HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-virt-manager.