retspen / webvirtcloud

WebVirtCloud is virtualization web interface for admins and users
1.68k stars 370 forks source link

[Ubuntu] kvm #202

Open iambenmitchell opened 5 years ago

iambenmitchell commented 5 years ago

Package kvm is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source

iambenmitchell commented 5 years ago

Downgraded from 18.04 to 16.04 and fixed the issue.

Looks like kvm got dropped in 18.04

catborise commented 5 years ago

there is not any problem with install on 18.04.

which statement causes problem?

i installed webvirtcloud panel to 18.04 without any glitch may be you should check and enable the universe repo.

sudo add-apt-repository universe

iambenmitchell commented 5 years ago

18.10*

garrettcorn commented 5 years ago

This issue is happening for me on 18.04.

$ lsb_release -a

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.1 LTS
Release:    18.04
Codename:   bionic

$ wget -O - https://clck.ru/9V9fH | sudo sh

Package kvm is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'kvm' has no installation candidate
 * ERROR: Failed to run install_ubuntu()!!!

$ sudo add-apt-repository universe 'universe' distribution component is already enabled for all sources.

catborise commented 5 years ago

Yes this script is old. It has to be updated. The problem related with kvm package new installation like that . There is no kvm package.

sudo apt install qemu qemu-kvm libvirt-bin bridge-utils virt-manager

############################################################################ #

Ubuntu Install Functions

# install_ubuntu() { apt-get update || return 1 apt-get -y install kvm libvirt-bin bridge-utils sasl2-bin python-guestfs supervisor || return 1 return 0 }

install_ubuntu_post() { if [ -f /etc/default/libvirt-bin ]; then sed -i 's/libvirtd_opts="-d"/libvirtd_opts="-d -l"/g' /etc/default/libvirt-bin else echoerror "/etc/default/libvirt-bin 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 if [ -f /etc/libvirt/qemu.conf ]; then if ([ $DISTRO_MAJOR_VERSION -eq 12 ] && [ $DISTRO_MINOR_VERSION -eq 04 ]); then sed -i 's/# vnc_listen/vnc_listen/g' /etc/libvirt/qemu.conf else sed -i 's/#vnc_listen/vnc_listen/g' /etc/libvirt/qemu.conf fi else echoerror "/etc/libvirt/qemu.conf not found. Exiting..." exit 1 fi if [ -f /etc/supervisor/supervisord.conf ]; then wget -O /usr/local/bin/gstfsd https://raw.githubusercontent.com/retspen/webvirtcloud/master/conf/daemon/gstfsd chmod +x /usr/local/bin/gstfsd wget -O /etc/supervisor/conf.d/gstfsd.conf https://raw.githubusercontent.com/retspen/webvirtcloud/master/conf/supervisor/gstfsd.conf else echoerror "Supervisor not found. Exiting..." exit 1 fi return 0 }

daemons_running_ubuntu() { if [ -f /etc/init.d/libvirt-bin ]; then

Still in SysV init!?

    service libvirt-bin stop > /dev/null 2>&1
    service libvirt-bin start
fi
if [ -f /etc/init.d/supervisor ]; then
    # Still in SysV init!?
    service supervisor stop > /dev/null 2>&1
    service supervisor start
fi
return 0

} #

Ended Ubuntu Install Functions

#

catborise commented 5 years ago

https://clck.ru/9V9fH --> that script is "webvirtcloud/dev/libvirt-bootstrap.sh" i add support for 18.04+ and create a pull request. after merge you can use it.

thanks