Import Red Hat vdi to KVM under Ubuntu

All of us knows VMware and VirtualBox solutions, and they do their job quite good.. But there is an open-source product, supported by Red Hat and IBM and other vendors, which is named every time they give their speeches — KVM. This software is quite adult, and Red Hat company bought it a few years ago for more than $100 million, and IBM made their own copy of this product in search of best productivity with their new processor power 8..

But all I want is to work it on my laptop and not to consume too much energy or processor time, and I hope it won’t hung as VirtualBox does — actually, every time I run VB, I have to do some magic — like restoring config file or reimport VDI. It’s weird for me, since it worked perfectly under Windows. And VMware made my laptop to have natural fever. I’m not going to say their products are bad — the reason is I have non-standard laptop configuration, and I don’t want to spend time inventing workarounds for each software item that doesn’t run properly, if I can replace it with software than can run as desired.

So, let’s bury our VirtualBox recollections and move our VDI’s to QEMU.

Check if your system supports KVM:

In my case I got

Then install libraries

Notice: the last package in the list is optional, it’s a graphic interface for KVM. I used it, anyway.

The next thing you should do is to convert your vdi to qcow2. Since it’s linux, there is an useful utility for it.

The next step is to import your new VM to your hypervisor. And again there is an useful utility

I had problems for the first time I imported  VM, bumping into warning no bootable device , then, to my shame, I found out that there were spaces in a directory name (as I use used the same HDD under linux and windows).

Then run your virtual machine manager (I used graphical interface, it was easy to find it in the menu). When I ran it for the first time, it refused to connect to qemu, gaving warning  libvirt-sock': Permission denied  . Strange, but rebooting my machine resolved the issue.

Now I have natively supported VM.