[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Xen-users] Replicating a live server on a domU


  • To: <xen-users@xxxxxxxxxxxxxxxxxxx>
  • From: "Alexandru Florescu" <alex@xxxxxxxx>
  • Date: Mon, 2 Nov 2009 12:57:44 +0200
  • Delivery-date: Mon, 02 Nov 2009 02:59:33 -0800
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=acasa.ro; h=from:to:references :in-reply-to:subject:date:message-id:mime-version:content-type: content-transfer-encoding; q=dns; s=default; b=tp1QcoB+JWRwmM+xl 0BYloE2QO1iri+2S17pYjhK/o7br+0GFmJTXAh7aD9JyAQsY3LRFlDz6ieufBvDb 730tb1gqNwEL2WqSoK0MkZ/JD0+W/u7YV+My9iNCNtfVnOt
  • List-id: Xen user discussion <xen-users.lists.xensource.com>
  • Thread-index: AcpYcHouSddSBiF1RUu1iikHRnb3hgBB0XPgAItu3AA=

>Yes, I've done it several times - all Debian GNU/Linux systems of 
>various vintages.
>
>If you are prepared to modify the system, then install a Xen-ified 
>kernel environment first - it makes things simpler. I just install a 
>-xen kernel and let that take care of things like modules etc, but I 
>dare say there are more efficient ways to do it if you aren't using 
>pygrub.
>
>Create new device files/volumes/whatever on the Dom0, mount them on 
>Dom0 (eg you might have /mnt /mnt/var /mnt/home etc), and copy the 
>filesystem across. Personally I normally use Rsync for this - but 
>don't forget to use the "--numeric-ids" option to avoid ownerships 
>getting mangled.
>
>Before you unmount the volumes, go in and change things like fstab 
>and network settings. Also, if you didn't do it earlier, chroot to 
>the mountpoint (/mnt in the above example) and install the Xen-ified 
>environment.
>
>Unmount the volumes, setup the guest config file, boot guest (use -c 
>option to attqch to console) and see what's broken.
>
>-- 
>Simon Hobson

Hello.
Nice one Simon, that's the exact thing that I've done so far.
I went to stacklet.com and grabbed a xen-ready image for centos 5.3,
unpacked it, mounted it and then
"rsync -e ssh -avz --exclude=/proc --exclude=/lost+found --exclude=/boot /
xenserver:/mnt/centosimg" from the live server.
It copied pretty much everything but it also errored some stuff.
Now I can boot the machine, I can login, pretty much everything looks ok,
but it doesn't load any modules, and lsmod is empty.

The config file includes the following:
kernel = "/boot/vmlinuz-2.6.18.8-xenU"
memory = 256
name = "centos.5-3.x86"
vif = [ '' ]
disk = ['file:/vserver/images/centos/centos.5-3.x86.img,sda1,w']
root = "/dev/sda1"
extra ="fastboot"

My rsyncd centos was 2.6.18-164.el5.
The xen-ready centos, on stacklet it says that it's 2.6.18.8, but when I
boot it up it says that it's 2.6.18-128.1.6.el5xen. Anyway, the error is: 
FATAL: Could not open
'/lib/modules/2.6.18-128.1.6.el5xen/kernel/drivers/block/aoe/aoe.ko': No
such file or directory

A ls /lib/modules reveals that I only have 2.6.18.8.xenU in there.
so I just rename the original 2.6.18.8.xenU to 2.6.18-128.1.6.el5xen and do
another modprobe aoe and I get:
FATAL: Error inserting aoe
(/lib/modules/2.6.18-128.1.6.el5xen/kernel/drivers/block/aoe/aoe.ko):
Invalid module format

I also rename the original 2.6.18-164.el5 to 2.6.18-128.1.6.el5xen and get
the same Invalid module format.

How did you get around this problem?
Thanks.









_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.