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 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: Thu, 3 Apr 2008 11:30:27 +0300
Cc: Xen List <xen-users@xxxxxxxxxxxxxxxxxxx>
Delivery-date: 2008年4月03日 01:30:42 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <1207185593.5035.21.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: <20080402170005.GD4561@xxxxxxx> <1207157714.8297.75.camel@xxxxxxxxxxxxxxxxxxxxxxxx> <20080402181120.GE4561@xxxxxxx> <1207160833.8297.82.camel@xxxxxxxxxxxxxxxxxxxxxxxx> <1207161210.27447.24.camel@xxxxxxxxxxxxxxxxxxx> <1207162751.8297.93.camel@xxxxxxxxxxxxxxxxxxxxxxxx> <20080402230041.GF4561@xxxxxxx> <1207178978.5035.16.camel@xxxxxxxxxxxxxxxxxxxxxxxx> <20080403005657.GJ4561@xxxxxxx> <1207185593.5035.21.camel@xxxxxxxxxxxxxxxxxxxxxxxx>
Reply-to: Igor Chubin <igor@xxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.17+20080114 (2008年01月14日)
On Mi, Apr 02, 2008 at 09:19:53 -0400, James Pifer wrote:
> > Can you run 
> > 
> > file -s /dev/ida/c0d0
> > 
> > on the host where from
> > you have copied the image?
> > 
>
> # file -s /dev/ida/c0d0
> /dev/ida/c0d0: x86 boot sector
>
>
> > Size=4G <- is it ok?
> > You have said that your HDD is 8GB size
>
>
> No, actually the used space is a little over 8GB. The LV is about 18GB.
fdisk output shat you have showed before
says, that your image is about 4G.
It means that you haven't copied entire disk.
When you do raw data copying (using cat or dd),
result file will have size of the source disk (18G in your case,
or even more if your disk has greater size; and 18G is LV, but not
the disk, size).
So, it's better, may be, to do not raw copying in your case, 
but files copying.
If you have LVM installed on target system, you may create
new LV, format it and mount.
E.g.:
lvcreate -L 8G -n centos /dev/VG
mkfs.ext3 /dev/VG/centos
mount /dev/VG/centos /mnt/
If you have not, than you regular files:
dd if=/dev/zero of=centos-new.img count=$[8*1024*1024] bs=1k
mkfs.ext3 centos-new.img # (press y here)
mount -o loop centos-new.img /mnt/
After that
you may start to copy files:
target# rsync -a --exclude=/sys --exclude=/proc --exclude=/dev source:/ /mnt/
When copying will be finished:
target# mkdir -p /mnt/{sys,proc,dev}
target# cp -a /lib/modules/VERSION_OF_THE_PV_KERNEL_HERE /mnt/lib/
target# cat <<EOF > /mnt/etc/fstab
proc /proc proc defaults 0 0
/dev/hda1 / ext3 defaults 0 0
EOF
After that 
umount /mnt
And create config file for new domain.
This is a PV domain, not an HVM!
So you need new config file.
>
> James
>
>
> _______________________________________________
> Xen-users mailing list
> Xen-users@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-users 
-- 
WBR, i.m.chubin
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
<Prev in Thread] Current Thread [Next in Thread>
Previous by Date: Re: [Xen-users] Sup guys, I'm a Xen noob, I have plenty of questions... , bbmailing
Next by Date: [Xen-users] Question about XenAPI , pine_tan
Previous by Thread: Re: [Xen-users] Convert CentOS system to Xen image? , James Pifer
Next by Thread: Re: [Xen-users] Convert CentOS system to Xen image? , Tiago Cruz
Indexes: [Date] [Thread] [Top] [All Lists]

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

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