This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


Re: [Xen-users] Convert CentOS system to Xen image?

To: James Pifer <jep@xxxxxxxxxxxxxxxx>
Subject: Re: [Xen-users] Convert CentOS system to Xen image?
From: Igor Chubin <igor@xxxxxxx>
Date: Tue, 1 Apr 2008 22:18:09 +0300
Cc: Xen List <xen-users@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Tue, 01 Apr 2008 12:17:29 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <1207075783.8297.22.camel@xxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <1207075783.8297.22.camel@xxxxxxxxxxxxxxxxxxxxxxxx>
Reply-to: Igor Chubin <igor@xxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.17+20080114 (2008-01-14)
On Di, Apr 01, 2008 at 02:49:43 -0400, James Pifer wrote:
> I have a CentOS server that I started to rebuild using Xen. It's turning
> out to have lot more configuring than I thought. So instead of building
> a new server and setting everything up again, is there any way to
> convert a running, stand alone linux system into a xen image?

Yes, of course you can.

First of all, you must know, do you want to convert it
to a PV or an HVM Xen domain.


1) Just copy image of your server to a logical volume of 
the Xen server LVM or to any other block device.

Xen uses plain raw images for vm images storing.

To do this you can boot your Cent OS to single user mode (and bring
network up manually) or use Knoppix or any live cd.

2) Create config for new domain.

3) Run it.


Like HVM, but after that (and before domain start),
you also should do:

1) Copy into domain file system kernel modules 
   (/lib/modules/`uname -r`)

2) Modify /etc/fstab (if needed)

3) Modify /etc/udev/rules.d (if needed)

It's better to start from converting into HVM
and the convert it into PV if needed.

> Googling I see people converting xen to parallels, vmware to xen, and
> even Windows to Xen, but I could not find converting a linux system. 
> Thanks,
> James
> _______________________________________________
> Xen-users mailing list
> Xen-users@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-users

WBR, i.m.chubin

Xen-users mailing list