Posts Tagged ‘video’

Howto convert KVM QCOW2 format Virtual Machine to Vmdk to migrate to VMware ESXi

Thursday, November 17th, 2022

qcow2-to-vmdkvk-convert-to-complete-linux-kvm-to-vmware-esxi-migration

Why you would want to convert qcow2 to vmdk?

When managing the heterogeneous virtual environment or changing the virtualization solutions that become so common nowadays, you might need to migrate qcow2 from a Linux based KVM virtualization solution to VMWare's proprietary  vmdk – the file format in which a VMWare does keep stored it's VMs, especially if you have a small business or work in a small start-up company where you cannot afford to buy something professional as VMware vCenter Converter Standalone or Microsoft virtual machine converter (MVMC)- usually used to to migrate VMware hosts to Hyper-V hosts, but also capable to migrate .qcow2 to .vmdk. The reason is that your old datacenter based on Linux OS custom KVM virtual machines might be moved to VMWare ESX to guarantee better and more systemized management (which though is very questionable, since most of my experiences with VMWare was that though the software was a great one, the people who manage it was not very much specialists in managing it).

Another common reason is that running a separate Linux virtual machine, costs you more than a well organized VMWare farm because you need more qualified Linux specialists to manage the KVMs thus KVM to VMWare management as in most big corporations nowadays’s main target is to cut the costs.
Even with successful migrations like that, though you might often expect a drop in the quality of the service when your VM ends in the VMWare farm.

Nomatter what’s the reason to migrate qcow2 to VMDK So lets proceed with how the .QCOW2 to .VMDK can be easily done.


1. Get information about the VM you would like to migrate to VMDK

In QEMU-KVM environment, the popular image format is qcow2, which outperforms the first generation of qcow format and raw format. You can find the files of virtual disks by checking the information of virtual machine by virsh command:

[root@hypervisor-machine ~]# virsh dominfo virtual-machine-name

INFO
ID: {e59ae416-9314-4e4b-af07-21c31d91b3fb}
EnvID: 1704649750
Name: CentOS7minimal
Description:
Type: VM
State: stopped
OS: centos7
Template: no
Uptime: 00:00:00 (since 2019-04-25 13:04:11)
Home: /vz/vmprivate/e39ae416-9314-4e4b-af05-21c31d91b3fb/
Owner: root@.
GuestTools: state=not_installed
GuestTools autoupdate: on
Autostart: off
Autostop: shutdown
Autocompact: off
Boot order: hdd0 cdrom0
EFI boot: off
Allow select boot device: off
External boot device:
On guest crash: restart
Remote display: mode=manual port=6903 address=0.0.0.0
Remote display state: stopped
Hardware:
  cpu sockets=1 cpus=2 cores=2 VT-x accl=high mode=64 ioprio=4 iolimit='0'
  memory 2048Mb
  video 32Mb 3d acceleration=off vertical sync=yes
  memory_guarantee auto
  hdd0 (+) scsi:0 image='/vz/vmprivate/e59ae415-9314-4e4b-af05-21c31d91b3fb/harddisk.hdd' type='expanded' 5120Mb subtype=virtio-scsi
  cdrom0 (+) scsi:1 image='/home/CentOS-7-x86_64-Minimal-1611.iso' state=disconnected subtype=virtio-scsi
  usb (+)
  net0 (+) dev='vme42bef5f3' network='Bridged' mac=001C42BEF5F3 card=virtio ips='10.50.50.27/255.255.255.192 ' gw='10.50.50.1'
SmartMount: (-)
Disabled Windows logo: on
Nested virtualization: off
Offline management: (-)
Hostname: kvmhost.fqdn.com


2. Convert the harddrive to VMDK

[root@hypervisor-machine e59ae415-9314-4e4b-af05-21c31d91b3fb]# ls -lsah

1.3G -rw-r—– 1 root root 1.3G Apr 25 14:43 harddisk.hdd

a. Converstion with qemu:

You can use qemu-img tool that is installable via cmds:

yum install quemu-img / apt install qemu-img / zipper install qemu-img (depending on the distribution RedHat / Debian / SuSE Linux)

-f: format of the source image

-O: format of the target image

[root@hypervisor-machine ~]# qemu-img convert -f qcow2 -O vmdk \-o adapter_type=lsilogic,subformat=streamOptimized,compat6 harddisk.hdd harddisklsilogic.vmdk

 

[root@ hypervisor-machine e59ae415-9314-4e4b-af05-21c31d91b3fb]# ls -lsah

1.3G -rw-r—– 1 root root 1.3G Apr 25 14:43 harddisk.hdd

536M -rw-r–r– 1 root root 536M Apr 26 14:52 harddisklsilogic.vmdk

3. Upload the new harddrive to the ESXi Hypervisor and adapt it to ESX

This vmdk might not be able to used on ESXi, but you can use it on VMware Workstation. To let it work on ESXi, you need to use vmkfstools to convert it again.

 

a. Adapt the filesystem to ESXi

[root@hypervisor-machine ~]# vmkfstools -i harddisklsilogic.vmdk  -d thin harddisk.vmdk

 

4. Create a VM and add the converted harddrive to the machine. 

Futher

Recreate the initramfs

But of course this won’t work directly as it often happens with Linux 🙂 !!. 
We need to make adjustments to the virtual machine as well with few manual interventions:

1. Start the machine from the VMWare interface

2. Grub CentOS Linux rescue will appear from the prompt

3. Run command

dracut –regenerate-all –force


to Recreate the initramfs.
 

Note that You might also have to edit your network configuration since your network device usually get’s a different name.
 

Finally reboot the host:

[root@hypervisor-machine ~]# reboot


And voila you’re ready to play the VM inside the ESX after some testing, you might switch off the KVM Hypervisor hosted VM and reroute the network to point to the ESX Cluster.

 

Man alone Opens or Closes the Door to Heaven – Bulgarian Priest ( Elder ) Atanas Arolski passed to Christ aged 95

Tuesday, March 31st, 2015


father-Spiritual-Elder-Atanas-Arolski-true-Christian-faith-confessor-passed-away-aged-95-year-Bulgarian_Orthodox-Church
 

Father Atanas Arolski A Notable Priest and Spiritual Father Elder of Bulgarian Lands and Bulgarian Orthodox Church passed away to Christ aged 95. fr. Atanas was born in a small Bulgarian mountain village Hvoyna located in Middle Rodopis Mountain. The priest is famous because he was among the few priests of our  faithless times that walked by Rodopi Muntain villages all their life to preach the Gospel of Christ. 70 years of his earthly life was dedicated to God's word and priesty service.

Fr. Atanas Arolski is born (by God's providence) on 1st of November on the day of Bulgarian Christian enlightener saints St. St. Kiril and Methodius who preached the Holy Gospel Good news of Salvation on Bulgarian lands in the 9th century. And just like the two Thesaloniki brother saints Cyril and Methodius fr. Atanas was enlightener of the Bulgarian nation during all his life. fr. Atanas completed his church studies succesfully in the Seminary of Cherepish "St. John of Rila" in year 1939. Though a lot of the Seminary students choose to become deacons in the Church to escape the mobilization and army service in Second Wolrd War the fr. decided not to cheat and went for a military service. He was ordained priest in 1943. During the last years of his life even when 90+ years old he walked to Malevo village (3km away) from his village and Orehovo village (7km! away from Hvoyna).

otec_Atanas_Arolski_living-saint-elder-of-new-times-from-Bulgaria-who-suffered-a-lot-from-communist-authorities-atheistic-regimes

Its interesting that the father walks to the 3 village Churches where he was assigned to be serving Holy Liturgy and do his many Church duties daiy even though he has a driving license since 1961, however he alone says until this very date he failed to find money to buy a car (because of his humbleness) in order to hide the spiritual reason behind that. 
The most notable father saying is "Man alone Opens or Closes the Door to Heaven" and his life is an example on how one can open the door to heaven and open when the Lord Jesus Christ knocks on the door of our heart.

This priest was torutred severely by the Atheist authorities during the Communist rule in Bulgaria in their attempt to convert him to atheism but fr. Atanas stand firm being a true confessor of Christ as he explains in the short video below, on many times they bring him in police and he was beaten badly with the purpose to show them there is no God and convince them to decline his faith in Christ and the Church but he refused.
Many times to make him stop going to Church and serving Holy Liturgy the authorities threatened him that he will be sent as a political Prisoner to Belene and he was imprison for a time and beaten to death but with God's help he survived. 

In his standing firm for the Church and faith even in times where this was not possible fr. Atanas resembles very much the confessor and God's word preaching of (Saintly) Elder Father Georgi of Jiglarci who recently also passed away 10th of January this year.

fr. Atanas alone used to say that God left him to survive until the fall of Communism in Bulgaria in order to show those who mocked him and tortured him that their regime prooved false demising (nowdays even hated by most of Bulgarian)  but God's Church triumpths victoriously even though the severe trials and persecutions standing according to Christ's word that promised us that the Gates of Hell will not get over his Church.

Below is a nice 15 minutes video made earlier by one of our Bulgarian Televisions (BTV) about this unique confessor priest.
The Holy Scriptures says "Great are the miracles of God in his holies" and movie prooves the Bible verse another time.

One True Story of Rodopi Mountains – A movie about fr. Atanas Arolsky

Ft. Atanas Arolsky the Christian Englightener 91 continues to serve to God  
God forgive and remember fr. Atanas in his Eternal Kingdom and let the father pray the Lord Jesus Christ to have mercy on us the sinners. Amen.

All great empires in the world (short video showing ) the biggest empires that existed in the world

Thursday, March 19th, 2015

All great empires in the world (short video showing ) the biggest empires that existed in the world

Create video from linux console / terminal – Record ssh terminal session as video with asciinema, showterm, termrecord

Thursday, August 21st, 2014

/var/www/images/asciinema-create-and-upload-ascii-terminal-console-videos-debian-gnu-linux-screenshot
You probably already know of existence of two Linux commands available by default across all Linux distributions scriptwhich makes a text based save of all commands executed on console and scriptreplay – which playbacks saved script command typescripts. Using this two you can save terminal sessions without problem, but in order to play them you need to have a Linux / UNIX computer at hand.
However If you want to make a short video record displaying what you have done on Linux console / terminal, you have few other options with which you can share your Linux terminal sessions on the web. In this short article I will go through 3 popular tools to do that – asciinema, showterm and termrecord.

1. Asciinema Current most popular tool to create video from Linux terminal

Here is how ASCIINEMA's website describes it:

"Asciinema is a free and open source solution for recording the terminal sessions and sharing them on the web."

apt-get –yes install python-pip

To install it with pip python package installer

pip install asciinema

Or if the machine is in DMZ secured zone and have access to the internet over a Proxy:

pip install –proxy=http://internet-proxy-host.com:8080 asciinema

It will get installed in /usr/local/bin/asciinema to make a terminal screen video capture just launch it (nomatter if it is privileged or non-privileged user):

asciinema

To finalize and upload the recorded terminal session, just type exit (to exit the shell), hopefully it will get you an upload link.

exit

You can claim authorship on video you issue:

asciinema auth

Use can then embed the new Linux terminal session video to your website.
 

2. ShowTerm – "It's showtime in a terminal near you!"

ShowTerm have same features as AsciiNema. Just like AsciiNema, what it does is it creates a record of your terminal session and then uploads it to showterm.io website, providing you a link over which you can share your terminal lesson / ascii art video / whatever with your friends. ShowTerm is written in, the world famous Ruby on Railsruby web development framework, so you will need to have ruby programming language installed before use. As showterm uses the Internet to upload video, so it is not really an option to create videos from remote terminal session on servers which are in DMZ with no access to the internet, I will explain in a little while how to create video of your terminal / console for private purpose on local server and then share it online on your own site.

a) To install ShowTerm:

– First be sure to have ruby installed:

On Debian / Ubuntu and derives deb Linux, as supersuser:

apt-get install –yes ruby curl

On CentOS / RHEL / Fedora Linux

yum -y install ruby curl

NB! curl is real requirement but as showterm.io website recommends downloading the script with it and later same curl tool is used to upload the created showterm file to http://showterm.io .

– Then to finalize install, download showterm script and make it executable

curl showterm.io/showterm > ~/bin/showterm

% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                       Dload  Upload   Total   Spent    Left  Speed
100  2007  100  2007    0     0   2908      0 –:–:– –:–:– –:–:–  8468

mkdir ~/bin
chmod +x ~/bin/showterm

This will save the script into your home folder ~/bin/showterm

b) Using showterm

To run it to create video from your terminal simply start it and do whatver you will in terminal.

~/bin/showterm

After you're done with the video you like type exit

exit

create-video-from-your-linux-console-terminal-with-showterm-screenshot

Note that if your server is behind a proxy curl will not understand proxy set inside Linux shell variable with http_proxy var, to upload the file if you're behind a proxy you will have to pass to curl –proxy setting, once you get the curl line invoked after failure to upload use something like:

curl –proxy $(echo $http_proxy)  https://showterm.herokuapp.com/scripts –data-urlencode cols=80 –data-urlencode lines=24 –data-urlencode scriptfile@/tmp/yCudk.script –data-urlencode timingfile@/tmp/lkiXP.timing

Where assuming proxy is defined already inside http_proxy shell variable.

 

3. Creating video from your terminal / console on Linux for local (private) use with TermRecord

In my humble view TermRecord is the most awesome of all the 3, as it allows you to make records with an own generated Javascript based video player and allows you to keep the videos on your own side, guaranteeing you independence of external services. Its
 

pip install TermRecord

TermRecord -o /tmp/session.html

 

You can further access the video in a local browser in Firefox / Chrome / Epiphany type in URL address bar:

/tmp/session.html to play the video

create-video-from-terminal-console-on-gnu-linux-howto-screenshot-with-termrecord

TermRecord uses term.js javascript to create the video web player and play the video which is directly encoded inside session.html.
If you want to share the video online, place it on your webserver and you're done 🙂
Check out my TermRecord generated video terminal sample session here.
 

SL Animated console train for your Linux – useless commans to cheer you up when you mistype ls

Tuesday, February 18th, 2014

sl-cool-program-to-cheer-you-up-when-you-make-a-mistake-on-linux-console

Some time ago I blogged about how to make your sysadmin more enjoyable with figlet and toilet console ASCII art text generators
Besides toilet and figlet another cool entertainment proggie is cowsay. On my home Linux router I use cowsay together with a tiny shell script to generate me a random Cow Ascii Art fun picture each time I login to my Linux. cowrand is set to run for my user through ~/.bashrc.

cowsay print cheerful pictures on your linux console / terminal login how to

In the spirit of ascii art fun arts today I've stumbled on another cool  and uselesss few kilobytes program called "SL". SL is very simple all it does is it cheers up you by displaying a an animated train going through the screen once you type by mistake "sl" instead of ls (list command).
To enjoy it on debian based distributions install it with apt:

# apt-get install --yes sl

SL 's name is a playful joke itself as well it stands for Steam Locomotive.

To get some more ASCII art fun, try telnetting to  towel.blinkenlights.nl – There is a synthesised ASCII Art text version video of Star Wars – Episode IV

# telnet towel.blinkenlights.nl

watch all star_wars episode 1 in ascii art video

If you know other cool ASCII art animation scripts / ASCII art games or anything related to ASCII art for Linux / Windows, please drop me a comment.
 

The history of Climate change in 83 seconds – The ridiculous climate protection negotiations and actions of world governments

Friday, June 14th, 2013

The last 15 years, we've been accustomed to listen about the Climate Change and the Global Warming problem. I remember for a first time heard about this possible problem from my Grandfather in late 1990's. Since then there is plenty of initiatives like Kyoto (Protocol) Convict for reduce of unwanted emissions. While browsing I found interesting video which is short overview of History of Climate Change. I think it is worthy to see it and get idea on the pure mess and lack of interest of governments to work well for solving the is issue…

There are plenty of youth organizations who claim to suggest how to solve global warming. But most of it is just talks. The fact is to stop it, the only way is by individual change of each of us. It is impossible for a consumer society to keep going. From time of creation of human, God created us not as consumers but as creator beings. Now most of us are dumb consumers hanging in front of Computer in Youtube and Facebook all day, watching post after post video after video, then you go to shop and you buy a lot of food. Because we're depressed of the unhuman way of living most of us eat plenty of food to somehow mitigate our awareness of unhappy reality (Americans are best in that). With overeating there is the increased number of health issues in us. We produce too much and consume too much, if we don't stop this parasite behavior soon it is more than clear, humans and our planet as ecosystem will not survive.

Sermon on how the Christian can live without Fear – Repent ! Pope Shenouda II Coptic Patriarch

Tuesday, April 9th, 2013

I'm a Christian and even though I'm trying to live as a Christian it is not always working. I'm a human and as all of us I have my fears. Thus by God's grace today by looking on Youtube on what the Coptic Christian say on Fear. I've ended in Sermon from his Holiness Pope Shenoda II. He explains very well the connection of Fear and the lack of Christian repentance. Below is the video I hope some Christian out there can earn by watching this video.
 

HH pope Shenouda Sermon Old ''A Life Without Fear''

Who were our ancestors – Genetic history of Europe – DNA – Truth or Machination from IGENEA

Tuesday, March 5th, 2013

genetic-history-of-europe-Percentage_of_major_Y-DNA_haplogroups_in_Europe

As I've said earlier in my blog posts, I keep deep interest into the origin of things. Thus I'm quite interested into the origin of Bulgarian nation and rest of European nations. I've stumbled across a project called IGENEA which aims at researching into DNA of nations and determining to what kind of ancestry nation is most likely to be. The data provided by IGENEA is put into question by a lot of Historians for the reason the method of IGENEA is based merely on scientific logic and scientifical data which can't be 100% proven and there is also hypothesis as part of it. One other thing is IGENEA project has commercial side, as they offer DNA tests that can be done at home and later analyzed in iGENEA laboratory and tell you individually who are your most likely ancestors and where you're most likely to find your relatives. Igenea claism they can tell you if your DNA somehow links to famous people like Napoleon Bonapart, Michael Jackson, Nicole Kidman or even the Popoe 😉

Though of course as everything in this life the results one gets from igenea are finally based on faith, as mostly all in life is based on faith.

Though below video data might be incorrect, some general data provided for some Northern Europe nations looks trustworthy. For those interested to know exactly how IGENEA testing and analysis is done check here
As I'm a Christian and I firmly believe God Created all I support the Creationism theory, I look in the data a bit sceptical for the reason many of the results and conclusions driven from IGENEA project lay on believes in Darwin's theory credibility. Everyone who seriously considered to know where we come from has already questioned the credibility of Evolution. Anyone who digged deep already knows there are a lot of problems with Darwin's theory which are unsolvable by modern archeology 'little' species findings. Also it is big problem with the idea that man came from Africa, that credibiliy of such claims is and will probably forever stay one big Hypothesis.
Enjoy, the highly specular findings of IGENEA in below video
 


 

Who were our ancestors- Genetic history of Europe – DNA – Truth or Machination from IGENEA.

The Great Escape video – Why Money-less Visa, Mastercard etc. electronic transfers impose risk for our freedom

Sunday, January 27th, 2013

A friend of mine send me a video in skype. It is a representation of one sad reality. A pigs are living in a farm, being wake up with electronic signal. The pig start eating, playing, f*cking etc. It is a lot of fun happiness and freedom. Some of them which are more initiative possess the typical characteristics of middle age times explorer and the spirit of researchers and scientists who tend to explore the universe, research new things, learn and get to the limit of things. The poor animals comes up to electric fence with VISA Electroin. Though the video is intending to be anti-propaganda of use of VISA debit cards, same is more or like true for travel VISAs. Nowadays within the European Union everyone is free to travel freely, everywhere inside the EU, it seems so fun you can learn new cultures, earn money, enjoy yourself and dissolve yourself in happiness and joys forgetting your own culture language and nationality. You become part of one "happy farm" not knowing your once free land though being stretched is limited by electric powered "no escape" fence.
 

 The Great Visa Escape – The deception that moneless transfers makes you free – money-less transfers pose future risk to human freedom