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 
 
Home Products Support Community News
 
   
 

xen-users

[Xen-users] Resize a VM disk image

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-users] Resize a VM disk image
From: kieran JOYEUX <kjoyeux@xxxxxxxxxxxx>
Date: Tue, 22 Jan 2008 15:46:18 +0100
Delivery-date: Tue, 22 Jan 2008 06:46:54 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 1.5.0.5 (X11/20060812)
Hi guys,

I have Xen 3.0.3 installed with yum on Centos 5.1.
I'am facing an issue trying to resize the disk image of a centos 4.5 VM. The VM disk size is 50Go and i need to add 150Go.

I tried two methods so far :

-------------1st method-----------------------
dd if=/dev/zero of=<image file> bs=1M conv=notrunc count=1 seek=2500
*
losetup /dev/loop0 <image file>
*
e2fsck -f /dev/loop0
*
resize2fs /dev/loop0
*
e2fsck -f /dev/loop0
*
losetup -d /dev/loop0
------------- End 1st method-----------------------


-------------2nd method-----------------------
dd if=/dev/zero of=/tmp/temp_expand bs=1024k count=1000
cp -a /xen-images/youki.img /xen-images/youki.img.back
cat /tmp/temp_expand >> /xen-images/youki.img
resize2fs -f /xen-images/youki.img

-------------End 2nd method-----------------------

None of these are actually working. Is there a simplest way or just another way to extend a vm disk or i have to reinstall a new os from scratch?

Thanks in advance for the help :)

Kin

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

<Prev in Thread] Current Thread [Next in Thread>