Re: how to use libvirt

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 01/08/2013 11:22 PM, tianwei zhang wrote:
> Hi Eric:

[please don't top-post on technical lists]

> 
> Yes, I mean sudo make install.
> 
> What I installed the libvirt on ubuntu is as below:
> 
> ./configure --prefix=/usr --localstatedir=/var --sysconfdir=/etc
> make
> sudo make install.
> 
> after installation, I try to start the libvirtd and the error is:
> 
> service libvirtd start
> libvirtd: unrecognized service

Merely running 'make install' does NOT register libvirtd as a system
service.  For that, you need additional steps, such as those encoded in
libvirt.spec.in:

%if %{with_systemd}
%if %{with_systemd_macros}
%systemd_post libvirtd.service
%else
if [ $1 -eq 1 ] ; then
    # Initial installation
    /bin/systemctl enable virtlockd.socket >/dev/null 2>&1 || :
    /bin/systemctl enable libvirtd.service >/dev/null 2>&1 || :
fi
%endif
%else
%if %{with_cgconfig}
# Starting with Fedora 16/RHEL-7, systemd automounts all cgroups,
# and cgconfig is no longer a necessary service.
%if (0%{?rhel} && 0%{?rhel} < 7) || (0%{?fedora} && 0%{?fedora} < 16)
if [ "$1" -eq "1" ]; then
/sbin/chkconfig cgconfig on
fi
%endif
%endif

/sbin/chkconfig --add libvirtd
if [ "$1" -ge "1" ]; then
    /sbin/service libvirtd condrestart > /dev/null 2>&1
fi
%endif

That is why we suggest that you install the pre-built libvirt from your
distro, before then trying to self-install, if you want to take
advantage of all the work your distro has done in hooking up libvirtd
into your system's normal scheme of services.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
libvirt-users mailing list
libvirt-users@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvirt-users

[Index of Archives]     [Virt Tools]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux