Saturday 28 September 2013

Migrating VMs from Redhat to Ubuntu

Recently I have installed Kubuntu onto my PC and had some Virtual Machines that I had used on a Centos machine under Virt-Manager/KVM that I needed to use on the Kubuntu system. I thought this would be a simple enough process but ran into some problems.

When trying to start up VMs in Virt-Manager on Ubuntu I got the following message:-

 error: Failed to start domain blackhat.example.net supported
 machines are 
...

To fix this I initially created a new VM to see what types it supported it does support Redhat VMs. Once this was created I viewed the XML for the image with the following command:-

 virsh dumpxml test

test being the name of the new VM I had created. The following line was relevant:-

 <type arch='x86_64' machine='pc-1.0'>hvm</type>  

In my other VM I saw the following:-

 <type arch='x86_64' machine='rhel6.2.0'>hvm</type>  

So the problem is machine='rhel6.2.0' to change this run the following command:-

 virsh edit blackhat.example.net  

Then change 'rhel6.2.0' to 'pc-1.0' it should then boot