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

dont run the https://clck.ru/9V9fH in the node #593

Open
alian001 opened this issue Aug 15, 2023 · 1 comment
Open

dont run the https://clck.ru/9V9fH in the node #593

alian001 opened this issue Aug 15, 2023 · 1 comment

Comments

@alian001
Copy link

hi,my kvm services have used in prod env。

this shell script is must to run?because i can the scirtpt modify more args for the kvm configure,if i run it,i afraid my procduct env have some problem, how can i reduce the problem, but i want to use the webvirtcloud to manage my kvm machine, i have more physical machine,

install final required packages for libvirtd and others on Host Server
wget -O - https://clck.ru/9V9fH | sudo sh

if i not run the shell script https://clck.ru/9V9fH,
i use the ssh configure , this can replace the shelll https://clck.ru/9V9fH, ???

https://github.com/retspen/webvirtmgr/wiki/Setup-SSH-Authorization

Create file /etc/polkit-1/localauthority/50-local.d/50-libvirt-remote-access.pkla (permissions for user webvirtmgr):#
[Remote libvirt SSH access]
Identity=unix-user:webvirtmgr
Action=org.libvirt.unix.manage
ResultAny=yes
ResultInactive=yes
ResultActive=yes

@catborise
Copy link
Collaborator

it does not have to be run. it is a script for easiness. webvirtcloud needs some conf but you can change it manually.
for example libvirt need this changes for centos

    if [ "$DISTRO_MAJOR_VERSION" -lt 8 ]; then 
        if [ -f /etc/sysconfig/libvirtd ]; then
            sed -i 's/#LIBVIRTD_ARGS/LIBVIRTD_ARGS/g' /etc/sysconfig/libvirtd
        else
            echoerror "/etc/sysconfig/libvirtd not found. Exiting..."
            exit 1
        fi
        if [ -f /etc/libvirt/libvirtd.conf ]; then
            sed -i 's/#listen_tls/listen_tls/g' /etc/libvirt/libvirtd.conf
            sed -i 's/#listen_tcp/listen_tcp/g' /etc/libvirt/libvirtd.conf
            sed -i 's/#auth_tcp/auth_tcp/g' /etc/libvirt/libvirtd.conf
        else
            echoerror "/etc/libvirt/libvirtd.conf not found. Exiting..."
            exit 1
        fi
    fi
    if [ -f /etc/libvirt/qemu.conf ]; then
        sed -i 's/#[ ]*vnc_listen.*/vnc_listen = "0.0.0.0"/g' /etc/libvirt/qemu.conf
        sed -i 's/#[ ]*spice_listen.*/spice_listen = "0.0.0.0"/g' /etc/libvirt/qemu.conf
    else
        echoerror "/etc/libvirt/qemu.conf not found. Exiting..."
        exit 1
    fi
    if [ -f /etc/sasl2/libvirt.conf ]; then
        sed -i 's/: gssapi/: digest-md5/g' /etc/sasl2/libvirt.conf
        sed -i 's/#sasldb_path/sasldb_path/g' /etc/sasl2/libvirt.conf
    else
        echoerror "/etc/sasl2/libvirt.conf not found. Exiting..."
        exit 1
    fi
    if [ "$DISTRO_MAJOR_VERSION" -lt 7 ]; then
        if [ -f /etc/supervisord.conf ]; then
            curl https://raw.githubusercontent.com/retspen/webvirtcloud/master/conf/daemon/gstfsd > /usr/local/bin/gstfsd
            chmod +x /usr/local/bin/gstfsd
            curl https://raw.githubusercontent.com/retspen/webvirtcloud/master/conf/supervisor/gstfsd.conf >> /etc/supervisor.conf
        else
            echoerror "Supervisor not found. Exiting..."
            exit 1
        fi
    else
        if [ -f /etc/supervisord.conf ]; then
            curl https://raw.githubusercontent.com/retspen/webvirtcloud/master/conf/daemon/gstfsd > /usr/local/bin/gstfsd
            chmod +x /usr/local/bin/gstfsd
            curl https://raw.githubusercontent.com/retspen/webvirtcloud/master/conf/supervisor/gstfsd.conf > /etc/supervisord.d/gstfsd.ini
        else
            echoerror "Supervisor not found. Exiting..."
            exit 1
        fi
    fi
    return 0
}```
1. make libvirt daemon network accessible.
2. edit libvirtd.conf and enable listen_tls, listen_tcp, auth_tcp
3. edit qemu.conf enable vnc_listen, spice_listen
4. edit /etc/sasl2/libvirt.conf make digest type md5 (for easiness)
this is it. you dont have to install gstfsd if you do not need.

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

2 participants