Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've recently been appointed to create some VMs for production use, and went gung ho into making a KVM based VM instead of finding out what our production server uses.

I've only recently found out though that our own servers use Xensource OS, and don't look like they're going to be upgraded in the near future. So for the moment, I'm stuck with either two choices- attempting to convert the KVM VM into a Xen VM, or rebuilding what I have into a new Xen VM.

Being the lazy person I am, I would rather not have to rebuild the VM. I've looked for some documentation on a procedure to do this, but the only thing I can come up with is an ancient article with some vague instructions.

So this is my question, Server Fault- can one migrate a KVM running on a KVM kernel to a Xen kernel? And if so, how?

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

The short answer is that it is definitely possible.

The longer answer of how depends on how you created you KVM guest. The VM will likely run with little or no modification on Xen.

Can you update to add some more details on how you created the KVM guest and whether it is Windows or Linux etc.?

Also posting the configuration of the KVM guest (for example if it is libvirt) or the command line that you used to start the VM.

It is likely just a matter of making a Xen configuration file that points to the guest disk or image file. It would be helpful for you to also post an example of the domU configuration file that is being used by your Xen install. For example, these configurations are typically stored in /etc/xen/

Can you also clarify which distro you are working with (both for KVM and Xen). Since there are lots of options of how things might be set up. Xen, in particular, has many ways to deploy it (see for example Deploy Xen)

(By the way this is also a great question for the xen-users mailing list - http://lists.xensource.com/mailman/listinfo/xen-users - especially with the clarifications as asked for above)

share|improve this answer
add comment

Basically this is pretty easy. If converting to XEN I would recommend going straight into PV-mode. In the VM:

  1. Install the XEN-kernel
  2. Change hda or sda to xvda
  3. Boot in in PV mode using pygrub.

If everything works, remove the KVM-kernel.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.