You are viewing dougsland

Previous 10

Jun. 12th, 2014

Generating oVirt node iso with modified packages

This post is about generate an oVirt Node image with updated packages, in
the below example we will update VDSM (node agent) and oVirt Node Plugin VDSM (TUI plugin for node registration).

Iso that will be updated: ovirt-node-iso-3.0.4-1.0.201401291204.vdsm34.el6.iso

Packages versions that will be updated in the above iso:

Note: CentOS 6.5 (CentOS-6.5-x86_64-minimal.iso) will be used in this demo as specific virtual machine to build oVirt Node iso.

Required tool to edit the node:
edit-node is the tool used to edit the node image and include a new package.
Please note that it must be run on the same OS which is used within the image.
So an CentOS image must be edited on a CentOS host.

Repos for edit-node:

Step by step:
# cat /etc/centos-release
CentOS release 6.5 (Final)

# yum install wget createrepo
# wget -O /etc/yum.repos.d/edit-node-el6.repo

# yum install ovirt-node-tools (download stable edit-node and pre-requirements)

Install required packages for build:
# yum install make autoconf automake pyflakes logrotate gcc python-pep8 libvirt-python python-devel python-nose rpm-build sanlock-python genisoimage python-ordereddict python-pthreading libselinux-python python-ethtool m2crypto python-dmidecode python-netaddr python-inotify python-argparse git python-cpopen bridge-utils libguestfs-tools-c pyparted openssl libnl libtool gettext-devel

Update pep8:
# yum install

Install Apache to be your local repo
# yum install httpd
# chkconfig --levels 235 httpd on
# mkdir -p /var/www/html/nodebuild

Build vdsm and ovirt-node-plugin-vdsm:
# git clone git:// && cd vdsm
# git checkout remotes/origin/ovirt-3.4 -b 3.4 (3.4 is current stable branch)
make your changes
# ./ --system && make && make rpm && cd ..
* To ignore tests and other tips:

# git clone git:// && cd ovirt-node-plugin-vdsm
# git checkout remotes/origin/node-3.0 -b 3.0 (3.0 is the current stable branch)
make your changes
# ./ && make && make rpms && cd ..

Copy rpms generated to /var/www/html/nodebuild/ and create a local repo
# cp ~/rpmbuild/RPMS/noarch/* ~/rpmbuild/RPMS/x86_64/* /var/www/html/nodebuild/
# createrepo /var/www/html/nodebuild/

Add the additional repo:
# vi /etc/yum.repos.d/edit-node-el6.repo
name=Local node build

Download the iso that will be changed:
# wget

Download the last edit-node and execute it:
# git clone git://
# ovirt-node/tools/edit-node --repo /etc/yum.repos.d/edit-node-el6.repo --update vdsm,ovirt-node-plugin-vdsm* ovirt-node-iso-3.0.4-1.0.201401291204.vdsm34.el6.iso --name mynewovirtbuild

Note: It's not required to store edit-node repo into /etc/yum.repos.d. You can use it in any directory to avoid cluttering up normal system operation.

Others related links:

Jun. 8th, 2014

Setting up a TFTP server, PXE boot server with libvirt and virt-manager for ovirt-node

This post is about setup virt-manager to autoinstall oVirt Node as virtual machine via libvirt/PXE. Additionaly, TFTP server will be installed in the host machine which runs the virt-manager.

I have created the post based on Fedora 20, fell free to post comments about your experience in others versions or distros.

Installing and Setting packages
# yum install virt-manager tftp tftp-server libvirt livecd-tools -y

Reload libvirtd to create virbr0
# /bin/systemctl restart libvirtd.service

Notice that now you will have the virbr0 interface:
# ip addr
3: virbr0: NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
link/ether 56:14:04:78:c4:f7 brd ff:ff:ff:ff:ff:ff
inet brd scope global virbr0
valid_lft forever preferred_lft forever

1) Configure the XML of the default libvirt network to include the PXE settings:
bootp file='pxelinux.0' server=''

# virsh net-destroy default
# virsh net-edit default
# virsh net-start default

2) Enable tftp-server
# vi /etc/xinet.d/tftp
disable = yes
disable = no

# /bin/systemctl restart xinetd.service

3) Download ovirt-node image and setup tftpboot
Download the last oVirt Node stable available:
# wget

Convert livecd to pxeboot image:
# livecd-iso-to-pxeboot ./ovirt-node-iso-3.0.4-1.0.201401291204.vdsm34.el6.iso

Copy the files generated to tftp directory:
# cp -Rpv tftpboot/* /var/lib/tftpboot/

Edit default file and include ovirt node settings
# vi /var/lib/tftpboot/pxelinux.cfg/default

DEFAULT pxeboot
LABEL pxeboot
    KERNEL vmlinuz0
    APPEND rootflags=loop initrd=initrd0.img root=live:/ovirt-node-iso-3.0.4-1.0.201401291204.vdsm34.el6.iso rootfstype=auto ro liveimg check RD_NO_LVM rd_NO_MULTIPATH rootflags=ro crashkernel=128M elevator=deadline install quiet max_loop=256 rhgb rd_NO_LUKS rd_NO_MD rd_NO_DM firstboot storage_init=/dev/vda ssh_pwauth=1 adminpw=ovonFQQPIAM9o management_server= BOOTIF=link

- firstboot: first boot
- adminpw: Sets an encrypted, temporary password for admin (ovonFQQPIAM9o is ovirt encrypted)
- management_server: Specifies - the management server to be used.
- storage_init: Initialize a local storage device. (Depending can be vda/sda)
- ssh_pwauth: Enable ssh
- BOOTIF: specify network for bridge (link = autodetect)

Setting Firewalld
firewall-cmd --permanent --add-service=tftp
firewall-cmd --reload

First, check if your host has enabled the nested-kvm, if not, enable it and via virt-manager interface copy the Processor flags to the virtual-machine. After that, create your new virtual machine for oVirt Node based on PXE boot.

Links related to this topic

May. 12th, 2014

FISL15 - oVirt report

Last week I participated of FISL conference from 7th to 10th May in Porto
Alegre/Brazil with Red Hat team and Fedora community to promote oVirt
and cloud technologies, below my view of these days.

For those who never heard about FISL, it is the largest FOSS events in
LATAM and one of the largest in the world, this year they had 6.017
participants according with official report. The registered audience
includes community, developers, companies,
students, colleges and government institutions.

oVirt Community update

This year we had a special guest Brian Proffitt, the Technical
Community Manager of oVirt. He joined our troop which contained
Amador Pahim (Red Hat), Marcelo Barbosa (Community member) and myself
(Red Hat) to demostrate and talk about oVirt.

Below the talks during our community update:

- oVirt Overview - Amador Pahim

- The Road Ahead for the oVirt Community - Brian Proffitt

- Installation Process - Marcelo Barbosa

- Hot Features in current version - Amador Pahim

- v2v Migrating virtual machines to oVirt - Douglas Landgraf

The feedback was very positive, people often raised hands to make
questions during all presentations. As expected, we knew some
faces in the crowd from previous years of community update and
we are glad to have such people year after year sharing
their thoughts and needs.

Some highlights that I would like to point are:

- New users from VMWare want to migrate to oVirt. Year after year we
always have people asking how to migrate from VMWare environment to oVirt.
Two special cases this time, one from Brazilian government and other from private
company which are looking for a open source solution to a
possible migration of 400 VMware guests.

- Questions about ipv6 support

- A developer from community want to make oVirt run in Slackware and
will join forces to us.

- A teacher from Brazillian Computer Science college shared that he
has a student doing his Conclusion work about oVirt and asked if
we are interested about it. I replied instantly that we are and can
help him with any information that he needs.

- User reporting that he has oVirt and RHEV running in their
environment. RHEV as main platform to their customers and oVirt
for the development phase of their product.

To close the oVirt participation in the event with the gold key we had
Brian Proffitt in: oVirt: How to Connect with a Really Mature Open Source Project.

A brillant talk showing the history of oVirt and RHEV from the early days as commercial and closed
solution to acquisition of Qumranet by Red hat. For me it was very cool to remember these
early days which I was part of it.

All slides will be available here:

Thanks again to all oVirt troop guys which spend 3 full days sharing
the knowledge to oVirt users and to Leonardo Vaz to make the booth happen.
See you there next year!

Jul. 9th, 2013

FISL14 - oVirt and Cloud EcoSystem

Last week I participated of FISL conference from 3th to 6th July in Porto
Alegre/Brazil with Red Hat team and Fedora community to promote oVirt
and cloud technologies, below my view of these days.

For those who never heard about FISL, it is the largest FOSS events in LATAM and one of the largest in the world, having around 8.000
participants. The registered audience includes community, developers, companies,
students, universities and government institutions.

oVirt activities during FISL

This year we had a lot of people interested about oVirt (yes, the
project is growing pretty fast here in LATAM) visiting our booth and
we learning about the project, the features and hearing what they can
expect in the upcoming releases.

We also had talks about oVirt and Virtualization ecosystem in
conference program:

oVirt Community update

Speakers: Amador Pahim (left), Marcelo Barbosa (Fedora Ambassador and local oVirt community), Douglas Landgraf (right)

At the beggining we had only Red Hatters involved in this talk, but we
invited Marcelo since he is a oVirt/Fedora passionated contributor
which has been promoting and testing it in his free time.

The audience was a mixed between people that want to learn about oVirt
and people that already uses oVirt, some of attending includes
computer science students, HP Brazil, Brazilian govern institute,
Brazilian Colleges and so on.

We started the talk introducing oVirt, telling what is it about,
explaining the architecture, features, supported components (storage,
domain controllers, etc.) etc. We also described supported
installation process and we used the remaining time for a demo and to
answer audience questions.

In the end, people started asking how to migrate from a Vmware/Vshere
scenario (Yes, we do. See v2v tool). Mental note for upcoming events:
Work in a talk to explain this tools in depth.

Ovirt + Gluster
Speaker: Theron Conrey (Red Hat)

One of the greatest talks in our opinion, because Theron provived an
excellent overview of Cloud Computing and explained how to build one
using oVirt/Gluster.

Spacewalk & oVirt

Speakers: Marcelo Mello and Amador Pahim (from Red Hat)

Another great talk, where Marcelo and Amador made Spacewalk/oVirt work
together in a demo for provisioning a environment capable to scale
based on the demand.

KVM - Ademar Reis

Ademar provided an excellent report about KVM/libvirt/qemu recent
enhancements and what the can be expected in Virtualization field for
upcoming years.

Additionally, Theron (left), Ademar (center) and John Mark Walker talked about virtualization in a booth.

oVirt Features 3.1 -> 3.2

Speakers: Douglas, Amador Pahim (from Red Hat), Marcelo Barbosa
(Fedora Ambassador and local oVirt community)

We used this talk to present a list of features from oVirt to 3.1 to
3.2, including some demos.


Fabiano Franz talked about OpenShift in the main track/booth a lot of people interested about openshift. Diane Mueller provided a demo in our booth.

Besides the talks above, we also presented small quick version of the
talks at the booth for those ones which were interested on attending
it. There were also many other talks about virtualization projects
sponsored by Red Hat in main conference program, presented by other
people and companies.

I'd like to thank all people involved on it (too many names to list here) but specially Leonardo Menezes Vaz and Leslie Hawthorn which worked hard to have our space/booth and all stuff ready for this event.

See you there next year!

Mar. 14th, 2012

liveusb-creator: Create bootable USB with any ISO

Burn any bootable ISO to USB:


$ yum install liveusb-creator

Really useful tool! :)

Oct. 9th, 2011

Howto: Setting PXE server to install RHEV-H

There is nothing in special to setup the PXE server for RHEV. However, if you are wondering how to create one, please follow the steps below.

First, let's identify which subnet we are going to use. In my case, the subnet will be 192.168.1.X.

Checking the subnet

# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:1E:C9:20:3F:6B
inet addr: Bcast: Mask:
inet6 addr: fe80::21e:c9ff:fe20:3f6b/64 Scope:Link
RX packets:4453951 errors:0 dropped:0 overruns:0 frame:0
TX packets:3350991 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3216624601 (2.9 GiB) TX bytes:1188936874 (1.1 GiB)
Interrupt:21 Memory:febe0000-fec00000

Installing DHCP

dhcp - is required because the client machine will boot from PXE and adquire an IP address from the DHCP server available at the subnet.

1) # yum install dhcp -y

Setting DHCP

2) vi /etc/dhcp/dhcpd.conf

ddns-update-style none;

subnet netmask {
range dynamic-bootp;
option domain-name-servers; # DHCP Server
#option domain-name "";
option routers; # DHCP Server
option broadcast-address;
default-lease-time 600;
max-lease-time 7200;

host rhev-server1 {
hardware ethernet 00:15:C5:E0:D3:27; # MAC from machine that will boot via PXE
fixed-address; # Fixed IP address
filename "pxelinux.0"; # File that will be downloaded by the client
next-server; # DHCP Server

# vi /etc/sysconfig/dhcpd
# Command line options here

# chkconfig dhcpd on

# service dhcpd start
Starting dhcpd: [ OK ]

Installing TFTP

tftp - will be used to transfer the image to be installed into the clients from the server.

# yum install tftp tftp-server -y

# chkconfig xinetd on
# chkconfig tftp on

# service xinetd start
Starting xinetd: [ OK ]

Preparing pxeboot

Extract files available inside the rpm or install it.
Below RPM available only via Red Hat Channel.

# rpm2cpio rhev-hypervisor-6.2-0.17.2.el6.noarch.rpm | cpio -div
241719 blocks

Converting the iso image to a PXE boot

note: you can use livecd-iso-to-pxeboot tool as well.
# bin/rhevh-iso-to-pxeboot share/rhev-hypervisor/rhev-hypervisor.iso
Your pxeboot image is complete.

Copy tftpboot/ subdirectory to /tftpboot or a subdirectory of /tftpboot.
Set up your DHCP, TFTP and PXE server to serve /tftpboot/.../pxeboot.0

Note: The initrd image contains the whole CD ISO and is consequently
very large. You will notice when pxebooting that initrd can take a
long time to download. This is normal behaviour.

Copying the generated files

The directory tftpboot/ was generated with the files to create the PXE boot.

Before copying, let's find which directory tftpboot service is setup.

# cat /etc/xinetd.d/tftp | grep -v ^#
service tftp
disable = no
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /var/lib/tftpboot
per_source = 11
cps = 100 2
flags = IPv4

In this case, the directory is /var/lib/tftpboot as showed in the server_args parameter.

# cp -Rpv tftpboot/* /var/lib/tftpboot/
`tftpboot/initrd0.img' -> `/var/lib/tftpboot/initrd0.img'
`tftpboot/pxelinux.0' -> `/var/lib/tftpboot/pxelinux.0'
`tftpboot/pxelinux.cfg' -> `/var/lib/tftpboot/pxelinux.cfg'
`tftpboot/pxelinux.cfg/default' -> `/var/lib/tftpboot/pxelinux.cfg/default'
`tftpboot/vmlinuz0' -> `/var/lib/tftpboot/vmlinuz0'

Now it's time to setup the pxelinux.cfg/, this directory holds the files that the pxeboot will look during the boot. Each file be named as the fixed IP address of client converted to hexadecimal, for example (

# cd /var/lib/tftpboot/pxelinux.cfg

# gethostip -x

Copying the default settings of RHEV PXE boot
# cp default C0A801F0

Preparing Firewall

Allow the MAC from the client machine.

# iptables -I INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
# iptables -I INPUT 1 -m mac --mac-source 00:15:C5:E0:D3:27 -j ACCEPT
# service iptables save

Ok, everything done, it's time to boot your client machine via PXE (please note that this can take some time)

References about PXE and kickstart

Instalação Automatizada de Servidores com Kickstarts – Parte II – Integrando com Servidores PXE

Sep. 27th, 2011

restapi: urllib2 + auth + put + xml

restapi: urllib2 + auth + delete + xml

restapi: urllib2 + auth + post + xml

Sep. 25th, 2011

yum: prevent a package to be updated in your system

1) Enable the yum-plugin-versionlock

$ vi /etc/yum/pluginconf.d/versionlock.conf
enabled = 1
locklist = /etc/yum/pluginconf.d/versionlock.list
# Uncomment this to lock out "upgrade via. obsoletes" etc. (slower)
# follow_obsoletes = 1

2) Add the list of packages to be protected:


Additional info:

Previous 10

June 2014




RSS Atom
Powered by