Git Product home page Git Product logo

Comments (15)

adelpozoman avatar adelpozoman commented on September 15, 2024

image

from docker-virt-manager.

masipcat avatar masipcat commented on September 15, 2024

Same here. I'm running this docker image on Ubuntu 18.04. Did you find how to fix it?

from docker-virt-manager.

dsully avatar dsully commented on September 15, 2024

Also seeing this on Ubuntu 20.04

from docker-virt-manager.

kevinwells22 avatar kevinwells22 commented on September 15, 2024

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.

m-bers avatar m-bers commented on September 15, 2024

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.

kevinwells22 avatar kevinwells22 commented on September 15, 2024

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.

gitterspec avatar gitterspec commented on September 15, 2024

I also just tried building and also the latest published image. Same error. Ubuntu 20.04.

from docker-virt-manager.

m-bers avatar m-bers commented on September 15, 2024

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.

Screen Shot 2021-10-24 at 11 31 46 AM

from docker-virt-manager.

gitterspec avatar gitterspec commented on September 15, 2024

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.

sevospl avatar sevospl commented on September 15, 2024

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.

m-bers avatar m-bers commented on September 15, 2024

@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.

m-bers avatar m-bers commented on September 15, 2024

Screen Shot 2021-10-24 at 1 11 30 PM

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.

kevinwells22 avatar kevinwells22 commented on September 15, 2024

Thanks m-bers, we all really appreciate this work.

from docker-virt-manager.

m-bers avatar m-bers commented on September 15, 2024

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"

Works for me now:
Screen Shot 2021-10-24 at 1 38 15 PM

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.

m-bers avatar m-bers commented on September 15, 2024

Gonna close this since I documented the workarounds for Ubuntu in the README.md

from docker-virt-manager.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.