Add ova file as VM on Linux with libvirt (Qemu)

2018-02-12 1 min read Vurtualization

Although the commands are very simple and just 2-3 steps but I keep forgetting them and hence wrote the following script:

The script takes input as “ova” filename and then creates the qcow2 image and finally a VM for you.

#!/bin/bash - 
#===============================================================================
#
#          FILE: ova2vm.sh
# 
#         USAGE: ./ova2vm.sh 
# 
#   DESCRIPTION: 
# 
#       OPTIONS: ---
#  REQUIREMENTS: ---
#          BUGS: ---
#         NOTES: ---
#        AUTHOR: Amit Agarwal (aka), 
#  ORGANIZATION: Mobileum
#       CREATED: 12/28/2017 13:59
# Last modified: Thu Dec 28, 2017  02:17PM
#      REVISION:  ---
#===============================================================================

set -o nounset                              # Treat unset variables as an error

if [[ $# == 0 ]]
then
    echo "You need to provide ova/vmdk filename"
    exit
fi
if [[ $1 == *ova ]]
then
    tmp=$(mktemp -d /tmp/amitXXXXXXX)
    cd  $tmp
    tar xvf $1
    file=$(echo $PWD/*vmdk)
else
    file=$1
    echo "Not a OVA file"
fi
dfile="$dest/$(basename $file)"

read -p "Enter the name for VM" vmname
qemu-img convert $file $dfile -p -c -O qcow2
virt-install --disk $dfile --ram 512 \
    --virt-type kvm --vcpus 1 --name "$vmname" --import

Trunk-based Development vs. Git Flow

2017-12-18 12 min read C Programs

In order to develop quality software, we need to be able to track all changes and reverse them if necessary. Version control systems fill that role by tracking project history and helping to merge changes made by multiple people. They greatly speed up work and give us the ability to find bugs more easily.

Moreover, working in distributed teams is possible mainly thanks to these tools. They enable several people to work on different parts of a project at the same time and later join their results into a single product. Let’s take a closer look at version control systems and explain how trunk-based development and Git flow came to being.

Continue reading

asciinema – video for your terminal session

2017-10-16 1 min read Fedora Uncategorized

Info about asciinema:

Name         : asciinema
Version      : 1.4.0
Release      : 1.fc26
Arch         : noarch
Size         : 144 k
Source       : asciinema-1.4.0-1.fc26.src.rpm
Repo         : @System
From repo    : fedora
Summary      : Command line client (terminal recorder) for asciinema.org service
URL          : http://asciinema.org
License      : GPLv3
Description  : Asciinema is a free and open source solution for recording the terminal sessions
and sharing them on the web.

To install, you can do:

Continue reading

remind – set and manager reminders the easy way

2017-10-09 1 min read Fedora

remind – is a calendar and alarm program. Its simple to use from CLI. To install:

dnf install remind

and some details about it:

Name : remind
Version : 03.01.15
Release : 3.fc26
Arch : x86_64
Size : 440 k
Source : remind-03.01.15-3.fc26.src.rpm
Repo : @System
From repo : fedora
Summary : A sophisticated calendar and alarm program
URL : http://www.roaringpenguin.com/en/penguin/openSourceProducts/remind
License : GPLv2
Description : Remind is a sophisticated calendar and alarm program. It includes the following
features:
  • A sophisticated scripting language
  • Plain-text, PostScript and HTML output
  • Timed reminders and pop-up alarms
Older posts Newer posts