Jump to content
  • 0

KVM CentOS7 migrate to XenServer 7.2


Keith Woodworth

Question

One of our techs has an old standalone KVM server that he has been running a CentOS 7 VM

on and have talked about migrating over to our XenServer cluster.

 

He did a qemu-img and sent me two .img files.


One is 300GB and is a mounted file system on a separate drive and another one that is about 8GB

and is a CentOS7 image that is the OS portion of the VM.

 

So he sent to .img files, one is the mounted external drive and the other is the OS 'internal' drive.

 

I converted the .img files to .VHD files using StarWind V2V Image Converter which worked it appears as

it seemed to convert the two .IMG files to .VHD files.

 

I was able to import both of them into XenServer using XenCenter and Xen did not throw any errors.

 

Problem is the CentOS7 file does not boot and get a console error Boot Device: Hard Disk - Failure - disk not bootable.

Both disk images are stored on the SR in Xen and appear ok.

 

There has to be something I missed or this conversion needs to be done differently.

 

Has anyone done this type of conversion before and what steps did you take to make this work?

 

Thanks,

Keith

 

 

 

 

 

Link to comment

10 answers to this question

Recommended Posts

Hi.

 

Alan: I did export the VM to an OVF with a VHD file and was able to do that but did not try to import

that file.

 

Tobias, I did not try that.

 

Had to put this aside for a few hours and just finally got back to it a bit ago.

 

What I ended up doing was finding a windows QEMU-IMG.EXE util that I was able to convert the .IMG

file to VMDK file which imported fine but booted into a dracut system as it could not find the file systems.

 

But the boot sequence also had a linux rescue image and I could boot into and issued dracut -f and that fixed

up the proper loader files. Once that was done the system booted up and appears to be ok at this point.

 

Now I have to figure out a way to attach the 300GB file to this VM. I will turn that .IMG file into a VMDK as well

but I'm not sure how to load that file onto the SR and attach it to the VM.

 

Any pointers on how that might be done? Can I just import it without it being seen as a possible VM?

 

Thanks,

Keith

Link to comment

Hi. Final update on this I think.

 

I detached the 300GB vdi from the VM I had and attached it to the  CentOS VM but had some errors mounting

it that I could not fix.

 

I went back to the original 300GB raw .img file and converted it into a VMDK and imported

that into Xen. Detached that VDI from the VM that was created during the import and attached it to the CentOS VM.

Booted the VM and was able to mount it manually. Changed the fstab settings to point to /dev/xvdb1,

rebooted the VM, and everything came up properly.

 

All in all it would have been easier to just spin up a brand new VM with a good chunk of disk space and import

what is needed over to a new machine. But it was a good learning experience in the end.

 

Thanks for your help guys.

Keith

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...