Adam Gold
2011-Nov-05 14:52 UTC
[Xen-users] create LVM-based domU using more than one volume group
Is it possible to create a guest installation which sources its partitions using more than one volume group. For example, let''s saying there are two VGs on dom0, vgxen1 and vgxen2, could I define the guest creation paramters such that root and swap are LVs within vgxen1 and home is an LV within vgxen2? Is there an additional flag I can add to xen-create-image maybe? Any guidance as to whether this is possible and if so, how to do it, would be most appreciated. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Simon Hobson
2011-Nov-14 17:59 UTC
Re: [Xen-users] create LVM-based domU using more than one volume group
Adam Gold wrote:>Is it possible to create a guest installation which sources its >partitions using more than one volume group. For example, let''s >saying there are two VGs on dom0, vgxen1 and vgxen2, could I define >the guest creation paramters such that root and swap are LVs within >vgxen1 and home is an LV within vgxen2?Xen doesn''t care - you just need to specify the right block device for each virtual disk.>Is there an additional flag I can add to xen-create-image maybe?Ah, now that''s a different matter. I don''t use tools any more for creating images - I just manually create block devices and either copy a template blank guest onto them, or us debootstrap to install a fresh install (all my hosts and guests are Debian). Worst case is that you could create the guest using just one (or a small number of) devices, then once it''s installed you can mount the disks in Dom0 and move stuff about - eg make a new filesystem for /home, mount it as (say) /mnt2, move everything from /mnt/home/ to /mnt2/ (assuming the guest root is mounted at /mnt), and then edit the guest fstab. -- Simon Hobson Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed author Gladys Hobson. Novels - poetry - short stories - ideal as Christmas stocking fillers. Some available as e-books. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Adam Gold
2011-Nov-14 22:28 UTC
Re: [Xen-users] create LVM-based domU using more than one volume group
> Date: Mon, 14 Nov 2011 18:59:24 +0100 > From: Simon Hobson <linux@thehobsons.co.uk> > Subject: Re: [Xen-users] create LVM-based domU using more than one > volume group > To: xen-users@lists.xensource.com > Message-ID: <p06240879cae7067cedd3@simon.thehobsons.co.uk> > Content-Type: text/plain; charset="us-ascii" ; format="flowed" > > Adam Gold wrote: > >Is it possible to create a guest installation which sources its > >partitions using more than one volume group. For example, let''s > >saying there are two VGs on dom0, vgxen1 and vgxen2, could I define > >the guest creation paramters such that root and swap are LVs within > >vgxen1 and home is an LV within vgxen2? > > Xen doesn''t care - you just need to specify the right block device > for each virtual disk. > > >Is there an additional flag I can add to xen-create-image maybe? > > Ah, now that''s a different matter. I don''t use tools any more for > creating images - I just manually create block devices and either > copy a template blank guest onto them, or us debootstrap to install a > fresh install (all my hosts and guests are Debian). > > Worst case is that you could create the guest using just one (or a > small number of) devices, then once it''s installed you can mount the > disks in Dom0 and move stuff about - eg make a new filesystem for > /home, mount it as (say) /mnt2, move everything from /mnt/home/ to > /mnt2/ (assuming the guest root is mounted at /mnt), and then edit > the guest fstab. > > -- > Simon Hobson > > Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed > author Gladys Hobson. Novels - poetry - short stories - ideal as > Christmas stocking fillers. Some available as e-books.Thanks Simon. I find I, too, am moving towards a more manual approach in guest creation. I''ve also been using the ''xm block-attach'' command to attach additional block devices post-creation. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
David Della Vecchia
2011-Nov-15 21:38 UTC
Re: [Xen-users] create LVM-based domU using more than one volume group
I''ve accomplished quite a bit with xen-tools but it requires you to delve into the perl scripts and make whatever changes you see fit. I have modified mine to do simple things like put the swap volume second instead of first, and to name the disks xvda and xvdb instead of xvda1 and xvda2 so as to be more compatible when users try to re-install the OS (partitions inside of partitions don''t work). Instead of forsaking the tools i bend them to do what i want, i have many wrapper scripts that allow me to install any number of operating systems, from debian to redhat, mandriva, gentoo, arch, netbsd, etc all via xen-tools. It''s easy once you learn how it all works. -DDV On Mon, Nov 14, 2011 at 5:28 PM, Adam Gold <adamgold@hotmail.com> wrote:> > Date: Mon, 14 Nov 2011 18:59:24 +0100 > > From: Simon Hobson <linux@thehobsons.co.uk> > > Subject: Re: [Xen-users] create LVM-based domU using more than one > > volume group > > To: xen-users@lists.xensource.com > > Message-ID: <p06240879cae7067cedd3@simon.thehobsons.co.uk> > > Content-Type: text/plain; charset="us-ascii" ; format="flowed" > > > > > Adam Gold wrote: > > >Is it possible to create a guest installation which sources its > > >partitions using more than one volume group. For example, let''s > > >saying there are two VGs on dom0, vgxen1 and vgxen2, could I define > > >the guest creation paramters such that root and swap are LVs within > > >vgxen1 and home is an LV within vgxen2? > > > > Xen doesn''t care - you just need to specify the right block device > > for each virtual disk. > > > > >Is there an additional flag I can add to xen-create-image maybe? > > > > Ah, now that''s a different matter. I don''t use tools any more for > > creating images - I just manually create block devices and either > > copy a template blank guest onto them, or us debootstrap to install a > > fresh install (all my hosts and guests are Debian). > > > > Worst case is that you could create the guest using just one (or a > > small number of) devices, then once it''s installed you can mount the > > disks in Dom0 and move stuff about - eg make a new filesystem for > > /home, mount it as (say) /mnt2, move everything from /mnt/home/ to > > /mnt2/ (assuming the guest root is mounted at /mnt), and then edit > > the guest fstab. > > > > -- > > Simon Hobson > > > > Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed > > author Gladys Hobson. Novels - poetry - short stories - ideal as > > Christmas stocking fillers. Some available as e-books. > > Thanks Simon. I find I, too, am moving towards a more manual approach in > guest creation. I''ve also been using the ''xm block-attach'' command to > attach additional block devices post-creation. > > _______________________________________________ > 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