On Mon, Jul 24, 2006 at 10:22:32AM +0200, Jonathan Ervine wrote:
> >>> On 22/07/2006 at 03:25, in message <20060722022539.GI24689@xxxxxxxxxxx>,
> Matthew Palmer <mpalmer@xxxxxxxxxxx> wrote:
> > On Fri, Jul 21, 2006 at 02:02:35PM +0200, Per Jensen wrote:
> >> 1a. File to partition ?
> >> The guest is stored in a file and not on a partition. Can that be changed
> >> at a later point, perhaps just migrating ?, or do I have to created a new
> >> guest from scratch.
> >
> > Just create the block device, mkfs it, mount it somewhere, mount your file
> > somewhere else over loop, copy from one to the other, unmount it all, change
> > your Xen config, and all will be well.
> >
> >> 1b. File resizing
> >> As far as I understand it is not possible to extend the size of a
> >> filebased guest OS, is that correct ?
> >
> > No.
>
> I think this is possible. I've been able to 'expand' a 4GB disk file (file1)
> hosting Windows 2003 up to 8GB as I was
> running out of space. By creating a 'blank' second 4GB disk file (file2) I
> was able to cat file2 >> file1 so that the
> resulting file1 was now 8GB in size. Obviously, I still had my partition of
> size 4GB inside an 8GB file. By using
> gparted-livecd I was then able to resize the partition in the 8GB file to use
> more of the space I'd just added.
Easier than that -- dd if=/dev/zero of=diskfile count=0 bs=1G seek=8
Huzzah for sparse files!
If you've partitioned the disk image, you can then wield parted over it to
resize the partitions, otherwise just use your filesystem's resizing tool.
> It's a few steps, and it's not exactly pretty, but it does work. I'd also
> suggest backing up your original disk file so
> that you're not working on the only copy :-)
That's not a bad idea.
- Matt
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
|