And also i found this one when running the following command:

tools/virsh -c xen:///
error: failed to connect to the hypervisor
error: internal error: libxenlight state driver is not active

any suggestion to solve this.

regards,
cooldharma06.


On Mon, Oct 14, 2013 at 11:40 AM, cooldharma06 <cooldharma06@gmail.com> wrote:
hi,

i cleared all the stuffs(everything) related to xen and libvirt.

i installed freshly xen-4.2.1 from the source.

Installation steps are as follows:

apt-get build-dep xen

apt-get install libc6-dev libglib2.0-dev libyajl-dev yajl-tools libbz2-dev bison flex zlib1g-dev git-core texinfo debhelper debconf-utils debootstrap fakeroot

OR

apt-get install bcc bin86 gawk bridge-utils iproute libcurl3 libcurl4-openssl-dev bzip2 module-init-tools transfig tgif tgif texinfo texlive-latex-base gcc-multilib texlive-fonts-extra texlive-fonts-recommended pciutils-dev mercurial libncurses5-dev patch libvncserver-dev libsdl-dev libjpeg62-dev iasl libbz2-dev git-core uuid-dev python python-dev python-twisted build-essential make gcc libc6-dev zlib1g-dev texlive-latex-recommended e2fslibs-dev

Download and build the source

wget http://bits.xensource.com/oss-xen/release/4.2.1/xen-4.2.1.tar.gz

tar zxvf xen-4.2.1.tar.gz

cd xen-4.2.1

  • vi Config.mk

edit the XSM_ENABLE = n --------> XSM_ENABLE= y

  • ./configure –enable-githttp --libdir=/usr/lib64 ( if it is 64 bit machine )

  • vi ./.config

#

write this line -------- > PYTHON_PREFIX_ARG=--install-layout=deb

#

  • make world

  • make deb

  • cd ./dist

  • ./install.sh

  • # Important

  • update-grub

  • ls -al /boot/xen*

  • update-rc.d xencommons defaults 19 18

  • update-rc.d xendomains defaults 21 20

  • update-rc.d xen-watchdog defaults 22 23

  • update-grub

Configuration

ln -s /etc/init.d/xendomains /etc/rc0.d/S10xendomains

ln -s /etc/init.d/xendomains /etc/rc6.d/S10xendomains

ln -s /etc/init.d/xencommons /etc/rc3.d/S98xencommons

ln -s /etc/init.d/xendomains /etc/rc3.d/S98xendomains

ln -s /root/xendom0caps /etc/rc3.d/S98xendom0caps

ln -s /root/iptables-enable /etc/rc3.d/S99iptables-enable (not required)

vi /root/xendom0caps (add xl sched-credit -d Domain-0 -w 512)

chmod +x /root/xendom0caps

vi /etc/rc.local (add /usr/bin/setterm -powersave off -blank 0

vi /etc/xen/xend-config.sxp

comment it --- > #network-script network-bridge

vi /etc/network/interfaces

auto xenbr0
iface xenbr0 inet dhcp
bridge_ports eth0 

reboot

* then i enter into the xen.

root@boss[/]#xl list

Name                                        ID   Mem VCPUs State Time(s)

Domain-0                                     0  3476     8     r-----     614.7

_______________________

then i installed libvirt form the source and the installtion steps are as follows:

* ./autogen.sh --system --with-xen=yes --with-libxl=yes

* make

* make install

and then i runned daemon/libvirtd -d

then i runned

tools/virsh 

virsh # version

Compiled against library: libvirt 1.1.3

Using library: libvirt 1.1.3

Using API: QEMU 1.1.3

error: failed to get the hypervisor version

error: internal error: Cannot find suitable emulator for x86_64

- - - - - - - - - - - -

then i started the xend by following command: 

/etc/init.d/xend start

then i checked libvirt(virsh)

virsh # version

Compiled against library: libvirt 1.1.3

Using library: libvirt 1.1.3

Using API: Xen 1.1.3

Running hypervisor: Xen 4.2.0

*******

i dont know how to enable the xl with libvirt.
Anyone guide me..


regards,
cooldharma06.