[CentOS-virt] LVM + kickstart -> dom0 && domUs

Tue Dec 18 22:25:18 UTC 2007
Karl Erisman <karl.erisman at gmail.com>

centos-virt,

I'm trying to create/install domU guests all in "one" step, following
Daniel's wiki page (I've found these pages really helpful, BTW):
    http://wiki.centos.org/HowTos/Xen/InstallingCentOSDomU

I have a few questions about this process:
(1) How would it be modified (w/respect to defining the disk in the
domain configuration file) to use a disk layout where dom0 has N
logical volumes, one for each of N domU guests?
(2) Using this method (where dom0 has an LV for each domU disk), I
would avoid the entire "Creating an image" step, correct?

(3) I'm setting up a dom0 kickstart.  If I proceed as described, doing
this (where domU_i is the ith guest):
####### in dom0 kickstart... #######
# logical volume for guest domU_i
logvol /var/lib/xen/images/domU_i_disk  --fstype ext3
--name=LV_domU_i_disk --vgname=vg00 --size=5120
# ...[other guest disk LVs]...
#######
...I'd need to unmount those logical volumes before trying to
kickstart the guest domUs, right?

(4) Additionally, how would domU "see" its disk during the install
process?  Assume I specify a backend LV_domU_i_disk logical volume (an
LV in dom0 that I just described) as the disk and map it to a frontend
device called 'xvda'.  Again using kickstart, I expect it would look
like this:
####### in domU kickstart... #######
clearpart --all --initlabel --drives=xvda
#...
part pv.01  --size=100 --grow --asprimary --ondisk=xvda
volgroup volgroup00 --pesize=4096 pv.01
logvol /home --fstype ext3 --name=LV_home --vgname=volgroup00 --size=3072
#...
#######

(5) Any comments, criticisms, or suggestions for improvement on these ideas?

Thanks!