How to use kpartx to edit VM images to migrate new dom0 in data center

Linux VM disk can be edited and modify configuration files without booting it or when it is unable to boot. Using kpartx you can migrate Vms to new dom0 or new data centres by modifying configuration files like /etc/sysconfig/network, etc. We will see by complete kpartx example.
Kpartx demo :
How kpartx can be used to manipulate XEN VM?

    Modify configuration files like /etc/ config files. you can edit any file as VM disk image disk will be mounted as a loop device.
    You can modify network files and rsync to other Dom0 or DC to bring up VM there. Kpartx can handle LVM also.

Let’s see how to use kpartx to migrated VM from one Dom0 to other by kpartx example.

Kpartx Example :
Let us migrate from dom0 name A to dom0 in other data centre B with a different network.

1.losetup -vf abc.img
above will set up local loop device related to boot disk of vm.img.
After executing the above command, it will provide a loop device number associated with the above boot image.
2.kpartx -va /dev/loop67
It will show the mounted VG name.
4.vgchange -ay vgname
5.mkdir /mnt/test1
6. lvs
7.mount /dev/vgname/lv_root /mnt/test1/
8.In /mnt/test1 will show all files related to boot image so that you can edit using VM
Now you can modify /etc/, network etc related new data centre or dom0.
9. unmount kpartx mounted local loops as below
vgchange -an VGname
kpartx -d /dev/loop7
losetup -d /dev/loop7

How to decode or convert UUID of VM under OVM

Oracle PVM assigns UUID code to VMS running under its control. When you log in to DOM 0 and issue xm list command, it will display UUID instead of the real hostname. If less number of hosts then we can go to the mount location and check VM.cfg but for a large pool, some kind of automation is required. The following solution will retrieve the VM simple name based on the UUID of the VM.

Here is the way to show the real VM name from UUID without OVM GUI login. It won’t decode or convert anything from UUID but, it will simply loop to all VMs VM.cfg and grep for a simple name.

During patching time, you can retrieve all dom u names hosted on that dom0 in one shot. Here is the UUID decoder for OVM.

for i in `xm list |awk '{print $1}' |grep -v "Domain-0\|Name"`; do egrep OVM_simple_name `df -h |grep OVS |awk '{print $5}'`/VirtualMachines/*/*.cfg |grep $i |awk -F"'" '{print $2}'; done

How to convert legacy Sysadmin to modern SRE

The ever-changing IT industry related to infrastructure management now following the new trend. Shifting of System administrator jobs to SRE. You may say SRE is nothing but 50:50 which means SA with coding skills. The concern is the gradual elimination of separate lines between coders and Sysadmins.

Although SRE in the market for a long time used to be the private skill of tech giant Google. But now the desire to automate every thong caused widespread of this SRE.

Senior System admins now thinking about shifting from legacy System Admin profile to SRE. But can a System Admin become SRE? System admins in general know about shell scripts or some kind of programming SA related tasks. But SRE demands more and Python reevaluation and killing Perl. Modern frameworks and builds tools forcing Sys admin to become developers. But is it possible?

Due to Cloud computing, most of the deployment tasks are built-in or automated. Who can user internet deploy virtual server within mins? Coders already enjoying their place. Now SA will go?

System Administrators now grinding between automation and coding. The market already saying no support jobs, only migration projects. Ok, suppose you want to learn new tools to become SRE, which one. So many fancy names and disappearing overnight.
Who going to understand the pain of a System Administrator who doesn’t want to lose the job in this RAT race economy.

I may sound negative but truth does not always cause pleasure. Ansible, Chef, Python are these three skills now I want to master. Thease may not yield wonders but I am sure they protect in this SA vs SRE war. I will share about them in our portal. You can see lot of info about them online but will share here a learner experience.

How to configure Apache with less memory httpd configuration

Apache2 can be configured to handle a decent load of web traffic with a server or VM that has less memory. We can configure Apache on servers less than 1 GB to handle websites like WordPress to handle traffic like 150 requests per min. But this requires tuning of httpd configuration as well as WordPress also.

Apache2 or httpd install on Linux with proper httpd. conf settings we can achieve this.

configure apache web server in Linux for less than 1 GB with decent load handling capability
Default httpd or Apache2 config file is httpd.conf. You can append the following entries.

KeepAlive Off
StartServers 6
MinSpareServers 5
MaxSpareServers 15
ServerLimit 100
MaxClients 100
MaxRequestsPerChild 1000

Next enable gzip compression for Apache webserver. Deflate is the Apache module that handles this compression. In most Linux installations, it is enabled by default.
Append following in httpd config file.

AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
ServerSignature Off
ServerTokens Prod

Here I am talking about httpd-2.4.6-97.

At WordPress,cache plugin and CDN usage will help you. WordPress theme with less number of DB connections is also a good contributor for our task.

Categorized as Linux

Warning: WarpDrive is running in a slot without sufficient power

Here is the solution for Solaris 10  boot up message.

WarpDrive Warning: WarpDrive is running in a slot without sufficient power, the performance will be throttled. Check WarpDrive documentation for additional details

My Senior who is Solari’s pro fixed it by upgrading the firmware of WrapDrive. I will update detailed steps once I got notes from him.

NOTICE: unsupported 64-bit prefetch memory on pci-pci bridge

NOTICE: mcxnex0: driver failed to attach: UAR BAR mapping
kstat_create('unix', 0, 'mcxnex_rsrc_cache00000000'): namespace

Fix for above messages :

due to BIOS PCI 64 bit Resources being enabled, not supported on S10, I disabled it per

Categorized as random

Linux Simple filters for Linux SRE MCSL-045

Linux or Unix simple filters are basic commands to learn by any Linux SRE. These simple filters include awk, sort, grep, tr, sed and regular expressions.

These simple filters are from the MCSl-45 subject so I am sharing them in one presentation. These are mostly used building blocks for shell script logics while manipulation of text or command redirections methods.

Simple filters fro Linux SRE consists of command name with possible parameters along with examples.

MCSL-045 which is free to download from egyankosh is a basic book for all Linux SRES. You can download it fro from egyankosh

MCSL-045 Simple filters Unix lab


A ghost which is alternative to Focus Writer

Focus Writer Best text editor to improve writing skills and write even novels not only normal notes. The best thing is an open-source one without any ads or nasty popups. Any alternate for Focuswriter which is also open source and free?

Here is the alternative to Focuswriter named Ghostwriter or Ghost Writer. It is cross-platform and no installation is required for Windows.

When I observe – it has more addons than  FocusWriter like autosave, HTML preview, mark up language etc.

Still, I need to check the support for Large documents. . You can also give it a try.



How to install Focus Writer on Oracle Linux 7

Focus Writer

Focus writer RPM is not available for Linux 7  but other Linux distributions like Ubuntu has built-in support. So tried to compile Focus Writer from the source but failed with QT dependency hell. Focus Writer needs QT 5 and Oracle Linux 7 comes with QT4.

Installed QT5  but still failing.

make: /usr/lib64/qt5/bin/lrelease: Command not found

When I try to run make – failing due to the above error. Upon search release found in qt4 folder. Even after install QT5 using built-in repos release not installed for QT5. Even tried the Fedora package to implement but failing with dependency hell.

So I am struck but don’t want to miss the good text editor. After much trial and error able to do a clean compilation of Focus Writer on Oracle / RHEL 7.

How to compile Focus Writer

1. Download QT 5.11 from the QT website


2. Execute and follow the wizard guidelines

3. Set the path

export PATH=”/opt/Qt5.12.11/5.12.11/gcc_64/bin:$PATH”

4. qmake

5. make

6. make install

Bingo!  your Focus Writer is ready for use on Redhat/Oracle Linux 7.

In this way, we can compile Focus writer from the source for Oracle Linux 7.



Simply Static fix Uncaught Runtime Exception: Not valid HTML fragment!

Simply Static is a nice  WordPress plugin which converts your site to a static version where you can use it without Php and DB support. It generates a static version of your site or blog on-demand without doing any modification to the existing setup in the format of the zip file.

Host your blog in pen drive without any Web server requirement. Amazing! right. Yes, it is. The recent version is now under new ownership it seems. When I tried to fetch the static version  I am getting the following debug error.

Uncaught RuntimeException: Not valid HTML fragment! .wp-block-button__link%7Bcolor%3A%23fff%3Bbackground

Tried many options like changing the theme etc. At last found issue. Gutenberg!. Disable Gutenburg and Simply Static started working.

Categorized as random

Ultimate guide to Focus Writer editor for SRE and Non-Techies

Killer tool for improving writing skills that are Open source-based and cross-platform compatible. It is the Focus Writer. Let’s see how it helps Techies and Non-Techies alike.

Free and Cross-platform compatible

Focus Writer is open source and tiny memory footprint Text editing software. It will work on Windows, Linux and Mac. The best thing is Free and you can donate if you want.

So many editors what’s special in Focus Writer?

So Many tools in this domain but the interface and performance is impressive without any clutter. Standalone program without any installation is one added advantage ( normal Windows install also available)


Each theme is completely customizable without touching any code. Text width, Text editing area width etc.. you can customize with the click of a button.

Focus Mode:

It will allow you to dim down other text in the editor by high lighting current line/no lines/para.

Focus Mode Demo
Focus mode demo of Focus Writer

Multi-tab & Chapter menu

You can work on multiple notes at a time. You can divide notes into chapters by adding ## to the start of the Chapter. on a large file, you can navigate to Chapter with a demand chapter menu which will show on the left side of the editor.

It supports plain text, open office doc and RTF.

Download Focus Writer