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.

 

xorg on Toshiba Satellite L40 14B with Intel GM965 video hangs up after boot and the worst fix ever / How to reinstall Ubuntu by keeping the old personal data and programs

Wednesday, April 27th, 2011

black screen ubuntu troubles

I have updated Ubuntu version 9.04 (Jaunty) to 9.10 and followed the my previous post update ubuntu from 9.04 to Latest Ubuntu

I expected that a step by step upgrade from a release to release will work like a charm and though it does on many notebooks it doesn't on Toshiba Satellite L40

The update itself went fine, whether I used the update-manager -d and followed the above pointed tutorial, however after a system restart the PC failed to boot the X server properly, a completely blank screen with blinking cursor appeared and that was all.

I restarted the system into the 2.6.35-28-generic kernel rescue-mode recovery kernel in order to be able to enter into physical console.

Logically the first thing I did is to check /var/log/messages and /var/log/Xorg.0.log but I couldn't find nothing unusual or wrong there.

I suspected something might be wrong with /etc/X11/xorg.conf so I deleted it:

ubuntu:~# rm -f /etc/X11/xorg.conf

and attempted to re-create the xorg.conf X configuration with command:

ubuntu:~# dpkg-reconfigure xserver-xorg

This command was reported to be the usual way to reconfigure the X server settings from console, but in my case (for unknown reasons) it did nothing.

Next the command which was able to re-generate the xorg.conf file was:

ubuntu:~# X -configure

The command generates a xorg.conf sample file in /root/xorg.conf.* so I used the conf to put it in /etc/X11/xorg.conf X's default location and restarted in hope that this would fix the non-booting issue.

Very sadly again the black screen of death appeared on the notebook toshiba screen.
I further thought of completely wipe out the xorg.conf in hope that at least it might boot without the conf file but this worked out neither.

I attempted to run the Xserver with a xorg.conf configured to work with vesa as it's well known vesa X server driver is supposed to work on 99% of the video cards, as almost all of them nowdays are compatible with the vesa standard, but guess what in my case vesa worked not!

The only version of X I can boot in was the failsafe X screen mode which is available through the grub's boot menu recovery mode.

Further on I decided to try few xorg.conf which I found online and were reported to work fine with Intel GM965 internal video , and yes this was also unsucessful.

Some of my other futile attempts were: to re-install the xorg server with apt-get, reinstall the xserver-xorg-video-intel driver e.g.:

ubuntu:~# apt-get install --reinstall xserver-xorg xserver-xorg-video-intel

As nothing worked out I was completely pissed off and decided to take an alternative approach which will take a lot of time but at least will probably be succesful, I decided to completely re-install the Ubuntu from a CD after backing up the /home directory and making a list of available packages on the system, so I can further easily run a tiny bash one-liner script to install all the packages which were previously existing on the laptop before the re-install:

Here is how I did it:

First I archived the /home directory:

ubuntu:/# tar -czvf home.tar.gz home/
....

For 12GB of data with some few thousands of files archiving it took about 40 minutes.

The tar spit archive became like 9GB and I hence used sftp to upload it to a remote FTP server as I was missing a flash drive or an external HDD where I can place the just archived data.

Uploading with sftp can be achieved with a command similar to:

sftp user@yourhost.com
Password:
Connected to yourhost.com.
sftp> put home.tar.gz

As a next step to backup in a file the list of all current installed packages, before I can further proceed to boot-up with the Ubuntu Maverich 10.10 CD and prooceed with the fresh install I used command:

for i in $(dpkg -l| awk '{ print $2 }'); do
echo $i; done >> my_current_ubuntu_packages.txt

Once again I used sftp as in above example to upload my_current_update_packages.txt file to my FTP host.

After backing up all the stuff necessery, I restarted the system and booted from the CD-rom with Ubuntu.
The Ubuntu installation as usual is more than a piece of cake and even if you don't have a brain you can succeed with it, so I wouldn't comment on it 😉

Right after the installation I used the sftp client once again to fetch the home.tar.gz and my_current_ubuntu_packages.txt

I placed the home.tar.gz in /home/ and untarred it inside the fresh /home dir:

ubuntu:/home# tar -zxvf home.tar.gz

Eventually the old home directory was located in /home/home so thereon I used Midnight Commander ( the good old mc text file explorer and manager ) to restore the important user files to their respective places.

As a last step I used the my_current_ubuntu_packages.txt in combination with a tiny shell script to install all the listed packages inside the file with command:

ubuntu:~# for i in $(cat my_current_ubuntu_packagespackages.txt); do
apt-get install --yes $i; sleep 1;
done

You will have to stay in front of the computer and manually answer a ncurses interface questions concerning some packages configuration and to be honest this is really annoying and time consuming.

Summing up the overall time I spend with this stupid Toshiba Satellite L40 with the shitty Intel GM965 was 4 days, where each day I tried numerous ways to fix up the X and did my best to get through the blank screen xserver non-bootable issue, without a complete re-install of the old Ubuntu system.
This is a lesson for me that if I stumble such a shitty issues I will straight proceed to the re-install option and not loose my time with non-sense fixes which would never work.

Hope the article might be helpful to somebody else who experience some problems with Linux similar to mine.

After all at least the Ubuntu Maverick 10.10 is really good looking in general from a design perspective.
What really striked me was the placement of the close, minimize and maximize window buttons , it seems in newer Ubuntus the ubuntu guys decided to place the buttons on the left, here is a screenshot:

Left button positioning of navigation Buttons in Ubuntu 10.10

I believe the solution I explain, though very radical and slow is a solution that would always work and hence worthy 😉
Let me hear from you if the article was helpful.

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

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 Treasures of Hermitage, Saint Peterburg Russia and its imitation Hermitage in Amsterdam

Thursday, January 17th, 2013

Sankt-Peterburg-Hermitage

Since some time, I'm very interested in Russia culture as it is so inter-related to our culture in Bulgaria. .It is sad that nowadays Bulgaria is not with Russia, we share much more cultural and heritage roots with Russia than any Western European county or even generally Europe. Thus I believe for every Bulgarian and generally for anyone interested in art, maybe the most remarkable place to visit if you're in Russia is the city of Saint Peterburg. There is found the Russian National State museum. The Hermitage is a museum which historically used to be Winster Palace (Residency) for the Russian Tsar / King. What is unique about this museum is it is one of the oldest and largest museums in the world. The musem was founded in 1764 and since 1852 is in open for public visits. The museum consists of 3 000 000 unique items. Only a small number of those 3 million are exposed for public visitors. The museum contains artifacts from all around the world including very rare things like Mummy sarcophagus. The amount of gold in mostly everywhere is remarkable the ornaments and everything is amazing. For people who value art it is a must see. I still did not have the opportunity to see it with my own eyes. But even seeing it on a video is very  worthy.


 

The Treasures of Hermitage, Saint Petersburg, Russia (State Hermitage Musem of Russia)

As I'm currently in Holland, it was very interesting to find out one of the worthy things to see in Holland is an imitation of st. Peterburg's Hermitage in Amsterdam. There is plenty of beautiful and unique works in it too, as you can check in below video.


 

Hermitage Museum Amsterdam Tour an imitation of Hermitage State Museum of Russia

Enjoy ! 🙂

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

 

Belarusian Good Night song ( Kids Lullaby )- Беларуская Калыханка

Tuesday, December 4th, 2012

Here is a beatiful Good Night song (Lullaby) popular in Russia and Belarus.

Беларуская Калыханка Доўгі дзень (БТ) Качественнее.mp4 –  Колыбельная

There is also a newer remake of the song from 2010, in the video one can see how they "smartly" heavily embedded the spiral, as well as plenty of twisting and cycling objects as a mean to hypnotize the poor unknowing kid 😉
I don't believe in hypnosis as I'm Christian and I think hypnosis works only if you believe it, but the guys who made this video definitely believed in hypnosis methodologies 😉 I never saw a video with so many twistings. Of course as always I'm a bit over critical, however I cannot stand without admitting the video animation is really high quality. I get the impression in Belarus they have a high quaite painters and animators.

Here is one other performance of this so beautiful and calming song – (Doctors should start prescribing this song as a song for healing people with nerveous disorders ;))


 

Белорусская колыбельная – Калыханка

The positivism below song emits along with the drawings joy is something totally missing nowadays in Western Civilizzation.

As an ex-metal, punk, rock person it was interesting for me to see Kalyhanka, has a Neo-Metal / Alternative Rock version.


 

Сьцяна – Калыханка

Here is also a piano version of the song – i don't like that so much but the video clip is really high quality of modern art – This gives me the idea in belarus modern art is quite advanced.

Biełaruskaja kałychanka / Беларуская калыханка / Belarusian lullaby

Below is the lyrics:

Доугі дзень
Цеплы дзень
Адплывае за аблокі
Сіні цень
Соны цень
Адпаўзае у кут далекі
Збеглі зайкі усе у лясы
Змоуклі птушак галасы
І буслы у гняздо схавалі
Свае доугія насы
Баю бай
Баю бай
Вачаняты закрывай (2 разы)
Пакрысе на расе
Патухаюць зоркі-сплюшкі
Гульні усе
Казкі усе
Пахаваны пад падушкі
Спяць і мышкі і стрыжы
Спяць машыны у гаражы
Ты таксама каля мамы
Ціха ціхенька ляжы
Баю бай
Баю бай
Вачаняты закрывай
Баю бай
Баю бай
Разам з намі засыпай (2 разы)

I found few other interesting Russian GoodNight kids songs are below:


 

Спят усталые игрушки


 

Спокойной ночи, малыши! (Заставка конца 90-х)

The animation is quite good, besides that it is rather interesting how the video is made to overflow the mind, so after the mind is "buffer overflowed" it turns into the Sleepe State generating Beta Waves 😉

As I'm Bulgarian and Slavonic it makes me wonder, why modern Bulgarians have not seen this, after all our Languages and Culture is so close to each other.

Here is one more which is great for kids, before going to bed 🙂

The Nativity in Christ Evangelical story of the birth of the saviour Jesus Christ in Russian language

Wednesday, December 26th, 2012

Rojdestvo Hristovo romanska ikona - Romanian Holy mosaic of the Nativity of the Lord Jesus Christ
I Wish Happy Christmas, to my dear readers. I wish to anyone who reads around. The Lord Jesus Christ to give good faith, peace, joy, health and heavenly blessings.

While checking various Church troparions on Nativity of Christ (including some Troparions) of the Russian Church I come across a short story, retelling the glorious events occuring around the birth of the Saviour of the world Jesus Christ! I'm currently having as a guest a girl from Belarus which and Belarusians speak Russian as their mother language. Thus I have the opportunity to learn a lot of Russian. In that relation finding such a video re-telling the story of Messiah (Christ's) birth was great opportunity to both improve my Russian language comprehension and enrich and strengthen my faith. The video is enjoyful so I hope it might help others in situation similar to mine. Enjoy!

Рождество Христово – Short Movie re-telling the Glorious story of Christ's video in Russian language