WARNING - OLD ARCHIVES

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/
Xen

xen-users

[Top] [All Lists]

Re: [Xen-users] Convert physical server to VM

To: "Chiu, PCM (Peter)" <P.C.M.Chiu@xxxxxxxx>
Subject: Re: [Xen-users] Convert physical server to VM
From: Marc Patino Gómez <mpatino@xxxxxxxxxxxx>
Date: 2007年8月23日 16:25:20 +0200
Cc: Simon Gao <gao@xxxxxxxxxxxxxxx>, xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: 2007年8月23日 07:24:28 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <EB861CD59F6DAA4BBC25EAE9987C5BC9031E9FCD@xxxxxxxxxxxxxxxxxxxxxxxxxx>
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>
Organization: CLARANET SAU
References: <46CCB07E.3000003@xxxxxxxxxxxxxxx> <46CD69DE.1020702@xxxxxxxxxxxx> <EB861CD59F6DAA4BBC25EAE9987C5BC9031E9FCC@xxxxxxxxxxxxxxxxxxxxxxxxxx> <46CD8A60.1020105@xxxxxxxxxxxx> <EB861CD59F6DAA4BBC25EAE9987C5BC9031E9FCD@xxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 1.5.0.12 (X11/20070604)
Hi,
the problem is that you only copy the filesystem with tar command. You must copy the FULL disc, to do this follow use dd, as I post before
dd if=/dev/hda | ssh root@xxxxxxxxxxxxxxxxx "/bin/dd of=/xen/images/myimage.img"
so the process will be:
1- dd if=/dev/zero of=image.img bs=1M count=4096 (if you have a 4GB HD, if your 
physical HD is 4GB)
 remember, the image must be at least the same size than your original HD)
2- stop old box, and boot with a LiveCD
3- Copy the disc to your XEN server
 dd if=/dev/hda | ssh root@xxxxxxxxxxxxxxxxx "/bin/dd 
of=/xen/images/myimage.img"
Good luck,
Marc
Chiu, PCM (Peter) wrote:
Thanks, Marc, for your speedy response.
I was hoping to set up a guest VM on existing Suse9/10 and Redhat4/5 systems.
Still, I use tar to copy the whole of the root directory tree on a running 
Linux system
into the loop mounted image.
Here are the steps I took:
dd if=/dev/zero of=image bs=1k seek=10240k count=1
mkfs -t ext3 image
mount -o loop image /mnt/temp
cd /mnt/temp
ssh remote "tar -zaxHS -f - /" | tar -zxpf -
cd
umount /mnt/temp
I then use Yast2 xen to create a guest VM configuration
and start it. But it fails with the "Boot loader didn't return any data" error.
I also tried to re-create a vm configuration file by copying a working Suse 
10.2 one,
but still hit the same fault.
So I suspect something is missing to make the above image to be bootable.
Any idea?
Peter
-----Original Message-----
From: Marc Patino Gómez [mailto:mpatino@xxxxxxxxxxxx] Sent: 23 August 2007 14:24
To: Chiu, PCM (Peter)
Cc: Simon Gao; xen-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-users] Convert physical server to VM
Hi,
Chiu, PCM (Peter) wrote:
Hi, there,
I am watching this thread with interest.
Marc, can you repeat the actual steps you do to set up Linux guest VMs, especially the ones using 2.4 kernels. I have tried similar steps you mentioned, apart from the cp -pr /lib/modules into the guest OS disk, but when I start up the guest VM, it complains
If you are going to "full virtualitzed" a linux box you don't need to copy the 
kernel's modules, you will use the unmodified old OS kernel ones, and the old kernel (of 
course).
"boot loader didn't return any data!"
Have you copy the full HD? or only the partition?
It looks like something is missing to turn the root copied file system to be bootable as a guest VM.
Thanks.
Peter
Good luck Peter,
Marc
-----Original Message-----
From: xen-users-bounces@xxxxxxxxxxxxxxxxxxx [mailto:xen-users-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Marc Patino Gómez
Sent: 23 August 2007 12:05
To: Simon Gao
Cc: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-users] Convert physical server to VM
Hi,
rsync works great on production enviroments, I had paravirtualized some servers 
with these method:
rsync -ave ssh --exclude=/proc --exclude=/sys --exclude=/dev (if you are using udev) root@runingserver:/ /mnt/newserverimage/
after this:
mkdir /mnt/newserverimages/proc
mkdir /mnt/newserverimages/sys
mkdir /mnt/newserverimages/dev
review your fstab, and copy the kernel modules:
cp -pr /lib/modules/2.6.16-xenU /mnt/newserverimages/lib/modules/
more or less .... this is the way
Also I have full virtualitzed some old GNU/Linux boxes with kernels 2.4, I used 
GNU/Linux live CD on the old box and dd utility:
dd if=/dev/hda | ssh root@xxxxxxxxxxxxxxxxx "/bin/dd of=/dev/vg00/newvserver"
I hope it will be helpfull
Marc
Simon Gao wrote:
Hi,
Anyone has any suggestions on programs, utility or instructions on how to convert a physical server to domU VM?
Thanks,
Simon
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
<Prev in Thread] Current Thread [Next in Thread>
Previous by Date: [Xen-users] Fedora Core 7 HVM installation , shacky
Next by Date: Re: [Xen-users] Fedora Core 7 HVM installation , Dylan Martin
Previous by Thread: Re: [Xen-users] Convert physical server to VM , Marc Patino Gómez
Next by Thread: Re: [Xen-users] Convert physical server to VM , Marc Patino Gómez
Indexes: [Date] [Thread] [Top] [All Lists]

Copyright ©, Citrix Systems Inc. All rights reserved. Legal and Privacy
Citrix This site is hosted by Citrix

AltStyle によって変換されたページ (->オリジナル) /