kimchi-project / kimchi

An HTML5 management interface for KVM guests
https://github.com/kimchi-project/kimchi/releases/latest
Other
3.08k stars 365 forks source link

Kimchi for Ubuntu 20 #1318

Closed Alterjerof closed 3 years ago

Alterjerof commented 4 years ago

I am testing the installation of kimchi 3.0 on Ubuntu 20 but I cannot install it with python-m2crypto (automatic installation in the .deb)

so one update for Ubuntu 20 ?

thx in advance

davystrong commented 4 years ago

I have just successfully managed to install it from source. I had to build wok from source, changing the dependencies.yaml to include python3-m2crypto instead (there may be a way of modifying the .deb directly but it's easy enough to build). Then I got an error in cherrypy related (I think) to the recent Python 3.8 change to using ast Constant. I installed it from source, changing the build function of _Builder in reprconf.py to simply return o.value (this may have unintended consequences, I don't know). Finally, I had to rebuild Kimchi from source too, because of the ipaddr module (#1298), then everything worked. Sorry for the lengthy explanation, I know it's a workaround but you may find it useful.

Alterjerof commented 4 years ago

ok thx for help

i think I would wait one update with kimchi because I'm not sure can do it :)

MariuCh007 commented 4 years ago

changing the build function of _Builder in reprconf.py to simply return o.value (this may have unintended consequences, I don't know).

Can I ask you for the details of the changes in the script "/usr/lib/python3/dist-packages/cherrypy/lib/reprconf.py"? What and how exactly do I need to change?

davystrong commented 4 years ago

It really is as simple as I said, however I downloaded the source and modified the method there, then installed it. Whether this makes any difference, I don't know. All you need to do is open "/cherrypy/lib/reprconf.py", find the build method (line 216), and replace

    def build(self, o):
        m = getattr(self, 'build_' + o.__class__.__name__, None)
        if m is None:
            raise TypeError('unrepr does not recognize %s' %
                            repr(o.__class__.__name__))
        return m(o)

with

    def build(self, o):
        return o.value

Then I think you can install it with the standard pip install . in the repo root, however I'm not sure about that last step because it was quite a while ago. Hope this helps!

MariuCh007 commented 4 years ago

Thank you. Just edit the already installed reprconf.py file from the cherrypy package. No need to reinstall. After this, kimchi begins to work. But unfortunately not everything works. In my case "View console" doesn't work. The page displays "Something went wrong, connection is closed".

The /var/log/nginx/error.log log repeats errors: [error] 95088 # 95088: * 1339 connect () failed (111: Connection refused) while connecting to upstream, client: <clientIP>, server:, request: "GET / websockify? token = V2luZG93czEw HTTP / 1.1", upstream: "http: // <serverIP>: 64667 / websockify? token = V2luZG93czEw", host: "<serverNAME>: 8001"

The /var/log/wok/wok-error.log log repeats errors: WOKAUTH0002E: You are not authorized to access Wok. Please, login first.

Plugin configuration file /etc/wok/plugins.d/__pycache__.conf doesn't exist.

Do you have any idea what's going on?

davystrong commented 4 years ago

That was mentioned on the wok thread too. Weirdly, when I first installed this (with this workaround) it all worked, including noVNC, however it has since failed. I haven't had time to look into it much but I don't think the login message is related, that is more likely to be a result of you trying to access the dashboard after your session had expired, the error from nginx seems to be linked. The other pycache message may just be internal python stuff. On my setup I'm getting a "upstream prematurely closed connection" in the nginx log. Also, in the browser web console I'm getting a 502 error, which seems to make sense with this. Unfortunately I haven't found any more information than this.

MariuCh007 commented 4 years ago

In summary kimchi for Ubuntu 20.04 does not work.

NZLostboy commented 4 years ago

Well it does if you build from source and change stuff, but noVNC is not working yet.

If I can get noVNC going, I will branch it and update the bits required to make it easier.

davystrong commented 4 years ago

I installed Ubuntu 20.04 in the last beta and it may have been the upgrade to stable that broke something, if that helps. Because it was working initially. Though I'm not sure exactly when it failed

4ley commented 3 years ago

Any updates on this?

alinefm commented 3 years ago

I will work on this in the next days and update you as soon as I get something up

alinefm commented 3 years ago

I've just pushed a fix for the cherrypy Parser issue. I will release a 3.0.1 version soon that will have fully Ubuntu 20.04 support

villain commented 3 years ago

is there an update to this? maybe an ETA on a build that works on Ubuntu 20?

Alterjerof commented 3 years ago

Radio silence since October 18, 2020 about Kimchi 3.0.1 (The update for Ubuntu 20). https://github.com/kimchi-project/kimchi/issues/1335

villain commented 3 years ago

i ended up moving to cockpit + cockpit-machines. seems to do the job