|
|
|
|
|
|
|
|
|
|
xen-users
RE: [Xen-users] Replicating a live server on a domU
Alexandru Florescu wrote:
I went to stacklet.com and grabbed a xen-ready image for centos 5.3,
Why ?
You've grabbed a Xen ready image, then the first thing you've done is
overwrite it with your live server config.
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.
You might not have any modules to match the kernel - note below the
mismatch between kernel versions.
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.
You've got a mismatch between the kernel image you are booting from,
and what's in your image.
I'm no expert, but I'd suggest your method is far from ideal.
Essentially your system is now a hybrid made by overwriting parts of
the filesystem, while leaving other bits intact. I'd suggest you
would be better making an EXACT clone of your live server into a
blank volume, and then adding a Xen kernel.
When using rsync, you've missed off two important switches. Firstly,
you've missed -H (--hard-links) so you'll have copied any hard linked
files as separate files. Secondly, you've missed --numeric-ids which
is essential when copying between systems (unless you are 100%
certain they both have the same users and groups) - without it,
you'll find your file ownerships mangled.
Once you've done it a few times, you tend not to forget :-/
--
Simon Hobson
Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed
author Gladys Hobson. Novels - poetry - short stories - ideal as
Christmas stocking fillers. Some available as e-books.
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
|
|
|
|
|