Hello, i have created some VM with virt-install, now I have the situation that one VM needs more Harddisk space. How can i resize these images. I created 2 partition on this images and insstalled grub, so when I try to add them to a loopback device and mount them I get an error about the fs not found. please help me out. thx Rupert _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Todd Deshane
2008-May-07 14:57 UTC
Re: [Xen-users] reseize image that was created with virt-install
Hi Rupert, On Wed, May 7, 2008 at 7:32 AM, Heiko <rupertt@gmail.com> wrote:> Hello, > i have created some VM with virt-install, now I have the situation > that one VM needs > more Harddisk space. How can i resize these images. > I created 2 partition on this images and insstalled grub, so when I > try to add them to a loopback device and mount them I get an error > about the fs not found. > > please help me out. >There are a lot of good resources here: http://xen.markmail.org/search/?q=resize+image&x=0&y=0 Give some more details on what commands you run, where you get stuck etc. and we can more easily help you. Cheers, Todd> thx > > Rupert > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Tiago Cruz
2008-May-07 15:16 UTC
Re: [Xen-users] reseize image that was created with virt-install
On Wed, 2008-05-07 at 16:32 +0200, Heiko wrote:> i have created some VM with virt-install, now I have the situation > that one VM needs more Harddisk space. How can i resize these images.Are you using LVM or a "raw" file on filesystem? If was not a LVM, maybe you can create one file bigger than the another and migrate the VM. dd if=/dev/zero of=/data/new_vm bs=1M count=20000 mkfs.ext3 /data/new_vm ... mount, rsync and start the "new" VM on new device... Or, please, always use LVM. -- Tiago Cruz http://everlinux.com Linux User #282636 _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Todd Deshane
2008-May-07 15:34 UTC
Re: [Xen-users] reseize image that was created with virt-install
On Wed, May 7, 2008 at 8:25 AM, Heiko <rupertt@gmail.com> wrote:> On Wed, May 7, 2008 at 4:57 PM, Todd Deshane <deshantm@gmail.com> wrote: > > Hi Rupert, > > > > On Wed, May 7, 2008 at 7:32 AM, Heiko <rupertt@gmail.com> wrote: > >> Hello, > >> i have created some VM with virt-install, now I have the situation > >> that one VM needs > >> more Harddisk space. How can i resize these images. > >> I created 2 partition on this images and insstalled grub, so when I > >> try to add them to a loopback device and mount them I get an error > >> about the fs not found. > >> > i am running centos5.1, i created a 5GB image with dd and appended it > to the original with cat more >> old_image.img > when i now do a parted /dev/loop7 i can see the extra 5GB, when i try > a resize it tells me "Error: File system has an incompatible feature > enabled." > THe problem is that I cant mount the original image, because it > contains a partition table. >use losetup and kpartx to make the partition mountable. here is an older, but useful reference: http://fedoraproject.org/wiki/FedoraXenQuickstartFC6#head-9c5408e750e8184aece3efe822be0ef6dd1871cd Also see: http://runningxen.com/chapters/chapter8/ that chapter has a lot of good LVM and disk image references. Cheers, Todd> .r > > > > > >> please help me out. > >> > > > > There are a lot of good resources here: > > http://xen.markmail.org/search/?q=resize+image&x=0&y=0 > > > > Give some more details on what commands you run, where you get stuck etc. > > and we can more easily help you. > > > > Cheers, > > Todd > > > > > >> thx > >> > >> Rupert > >> > >> _______________________________________________ > >> Xen-users mailing list > >> Xen-users@lists.xensource.com > >> http://lists.xensource.com/xen-users > >> > > > > _______________________________________________ > > Xen-users mailing list > > Xen-users@lists.xensource.com > > http://lists.xensource.com/xen-users > > >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Todd Deshane
2008-May-09 02:39 UTC
Re: [Xen-users] reseize image that was created with virt-install
Hi Rupert, It is much better to keep the conversation on the xen-users, that way there are more people that can help out and benefit. > Hello, > > great links. Now I can mount my images ;). > But I still cant resize them: > > Disk /dev/loop7: 16.2GB > Sector size (logical/physical): 512B/512B > Partition Table: msdos > > Number Start End Size Type File system Flags > 1 32.3kB 10.7GB 10.7GB primary ext3 boot > > (parted) resize > Partition number? 1 > Start? [32.3kB]? 10.7GB > End? [10.7GB]? 16.2GB > (parted) print > > Model: Unknown (unknown) > Disk /dev/loop7: 16.2GB > Sector size (logical/physical): 512B/512B > Partition Table: msdos > > Number Start End Size Type File system Flags > 1 32.3kB 10.7GB 10.7GB primary ext3 boot > > > this somehow doenst work, but gives me no errors. > When i try parted on the mapper device it doesnt see the extra space: > Disk /dev/mapper/loop7p1: 10.7GB > > > i could copy all the files to a new image, but I would prefer resizing > the original one. > There is a tricky dd command that can handle this one Look here for advice: http://xen.markmail.org/search/?q=dd+resize+image#query:dd%20resize%20image+page:1+mid:z72mlicnm526un4n+state:results > i just tried to copy the filesystem to a new image, this gave me a kernel panic. > Now I cant even do a xm list, > xm list > Error: Boot loader didn''t return any data! > Usage: xm list [options] [Domain, ...] > List information about all/some domains. > -l, --long Output all VM details in SXP > --label Include security labels > how can I fix this? There are still running 3 other VM on the machine > that I need to work with, > I can reach them with ssh, but my monitoring complains about that (i > use the xm command to check the VM) I am not sure why xm list is giving that error. Are you running it from the dom0? What did you copy over that made xm list not work? Regards, Todd _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users