Difference: BuildingoVirtNodeWithVDSM ( vs. 1)

Revision 119 Feb 2015 - IvoVanGeel

Line: 1 to 1
Added:
>
>
META TOPICPARENT name="WebHome"

Building oVirt Node with VDSM plugin

Introduction

This document explains how to build oVirt Node 3.5 with the VDSM (Virtual Desktop and Server Manager) plugin. This plugin is needed to be able to manage the node from oVirt Engine. The image will be built on CentOS7.

Preparation

Perform a clean, minimal install of CentOS7. Install the latest updates, using: yum upgrade. Install the following extra packages:

yum install -y https://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm # (or a later version)
yum install -y http://resources.ovirt.org/pub/ovirt-3.5/rpm/el7/noarch/ovirt-release35-002-1.noarch.rpm # (or a later version)
yum install -y git python-devel createrepo selinux-policy-doc checkpolicy selinux-policy-devel autoconf ltrace automake \
python-mock pykickstart python-lockfile bzip2  gcc gcc-c++ patch redhat-rpm-config rpm-build unzip
yum install -y ovirt-node-plugin-vdsm-recipe

The livecd-tools and appliance-tools packages, which are needed for building the ISO file, are not provided in the default CentOS7 repositories, but they can be installed from other places:

yum install -y http://people.centos.org/arrfab/CentOS7/LiveMedia/RPMS/python-imgcreate-20.1-2.el7.x86_64.rpm
yum install -y http://people.centos.org/arrfab/CentOS7/LiveMedia/RPMS/hfsplus-tools-540.1.linux3-4.el7.x86_64.rpm
yum install -y http://people.centos.org/arrfab/CentOS7/LiveMedia/RPMS/livecd-tools-20.1-2.el7.x86_64.rpm
yum install -y https://kojipkgs.fedoraproject.org//packages/appliance-tools/007.7/1.fc21/noarch/appliance-tools-minimizer-007.7-1.fc21.noarch.rpm

Build oVirt Node packages

Download the ovirt-node source code via git:

git clone http://gerrit.ovirt.org/p/ovirt-node.git

I have created a script to easily build the oVirt node packages (please note I am building in /root):

build-node.sh:

#!/bin/bash

export OVIRT_NODE_BASE=/root

export OVIRT_CACHE_DIR=~/ovirt-cache
export OVIRT_LOCAL_REPO=file://${OVIRT_CACHE_DIR}/ovirt 
export EXTRA_RELEASE=.$USER$(date +%s)

cd $OVIRT_NODE_BASE
cd ovirt-node

make distclean
./autogen.sh --with-image-minimizer
make publish

Make the file executable using: chmod a+rx build-node.sh and build the packages using: ./build-node.sh

Build oVirt Node ISO file

Download the source code for building an ovirt-node ISO file via git:

git clone http://gerrit.ovirt.org/p/ovirt-node-iso.git ovirt-node-iso-vdsm

Before building a few extra packages need to be installed from the ovirt-node directory:

yum -y install /root/ovirt-node/tmp.repos/RPMS/noarch/ovirt-node-recipe-3.2.3-0.0.master.el7.centos.noarch.rpm

To build the oVirt Node ISO with the VDSM plugin, 2 files need to be changed:

ovirt-node-iso-vdsm/configure.ac:

MAIN_KS=vdsm-plugin-iso.ks

ovirt-node-iso-vdsm/Makefile.am:

NAME0             = vdsm-plugin-iso

For the hardware I am using to run oVirt, I need to have the Realtek network firmware installed. I made the following change to /usr/share/ovirt-node-recipe/common-minimizer.ks:

keep /lib/firmware/rtl_nic

I have used the following script to build the ISO file: build-node-vdsm.sh:

#!/bin/bash

export OVIRT_NODE_BASE=/root

export OVIRT_CACHE_DIR=~/ovirt-cache
export OVIRT_LOCAL_REPO=file://${OVIRT_CACHE_DIR}/ovirt 
export EXTRA_RELEASE=.$USER$(date +%s)

cd $OVIRT_NODE_BASE
cd ovirt-node-iso-vdsm

rm -f *.iso
make distclean
./autogen.sh --with-recipe=/usr/share/ovirt-node-recipe --with-build-number=01
make iso publish

Set the script to be executable and build the ISO:

chmod a+rx build-node-vdsm.sh
./build-node-vdsm.sh

Install oVirt Node

Use dd to create a bootable USB stick, which can be used to install oVirt Node:

dd if=ovirt-node-iso-vdsm/ of=/dev/<USB stick> bs=1M

Boot from the USB stick to start the installer. After the installer has completed, reboot the machine. Next configure the network, go to the oVirt Engine section and set the root password here. This will also enable the SSH daemon. You will need the password you enter here, to add the node to the oVirt Engine.

-- Ivo van Geel - 19 Feb 2015

 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2010-2019 by LANIS