Hi, I''ve successfully used xenguest-install.py to do a kickstart install of FC5 as follows: xenguest-install.py --name=guest1 --file=/dev/vg01/lv_guest1_vm --ram=384 --location=http://mirrors.kernel.org/fedora/core/5/i386/os/ --extra-args="ip=192.168.23.229 netmask=255.255.255.248 gateway=192.168.23.225 dns=192.168.2.203,192.168.2.204 ks=http://example.com/kickstart/guest1-fc5.cfg" This presents a lv to the guest and the kickstart config does all the partioning (I use lvm in kickstart too!). However, I''ve decided that the best way to use multiple partitions with xen guests is to define them as logical volumes on the Dom0 host and pass them to the DomU guest as separate partitions. e.g. lvcreate --name guest1_root --size 1.2G /dev/vg01 lvcreate --name guest1_usr --size 800M /dev/vg01 lvcreate --name guest1_home --size 5G /dev/vg01 lvcreate --name guest1_var --size 15G /dev/vg01 lvcreate --name guest1_swap --size 2G /dev/vg01 Then the Xen guest disk configuration would be something like: disk = [ ''phy:/dev/vg01/guest1_root,xvda1,w'', ''phy:/dev/vg01/guest1_usr,xvda2,w'', ''phy:/dev/vg01/guest1_home,xvda3,w'', ''phy:/dev/vg01/guest1_var,xvda4,w'', ''phy:/dev/vg01/guest1_swap,xvda5,w'' ] i.e. each lv on the Dom0 will appear as a separate partition inside the DomU guest. The benefit of this is that all partition management will be done in Dom0, e.g. To increase a partition size, I can shutdown the guest, increase the lv size, grow the FS and restart the guest. My question is: How can I specify multiple disks for the Xen0 guest and launch a kickstart installation? Thanks for any thoughts. R.
I wrote it a while ago, but check out the hacked verison of xenguest-install.py I attached here: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=185860 I assume it would still work.... On Thu, 2 Nov 2006, Robin Bowes wrote:> Hi, > > I''ve successfully used xenguest-install.py to do a kickstart install of > FC5 as follows: > > xenguest-install.py --name=guest1 --file=/dev/vg01/lv_guest1_vm > --ram=384 --location=http://mirrors.kernel.org/fedora/core/5/i386/os/ > --extra-args="ip=192.168.23.229 netmask=255.255.255.248 > gateway=192.168.23.225 dns=192.168.2.203,192.168.2.204 > ks=http://example.com/kickstart/guest1-fc5.cfg" > > This presents a lv to the guest and the kickstart config does all the > partioning (I use lvm in kickstart too!). > > However, I''ve decided that the best way to use multiple partitions with > xen guests is to define them as logical volumes on the Dom0 host and > pass them to the DomU guest as separate partitions. > > e.g. > lvcreate --name guest1_root --size 1.2G /dev/vg01 > lvcreate --name guest1_usr --size 800M /dev/vg01 > lvcreate --name guest1_home --size 5G /dev/vg01 > lvcreate --name guest1_var --size 15G /dev/vg01 > lvcreate --name guest1_swap --size 2G /dev/vg01 > > Then the Xen guest disk configuration would be something like: > > disk = [ ''phy:/dev/vg01/guest1_root,xvda1,w'', > ''phy:/dev/vg01/guest1_usr,xvda2,w'', > ''phy:/dev/vg01/guest1_home,xvda3,w'', > ''phy:/dev/vg01/guest1_var,xvda4,w'', > ''phy:/dev/vg01/guest1_swap,xvda5,w'' ] > > i.e. each lv on the Dom0 will appear as a separate partition inside the > DomU guest. The benefit of this is that all partition management will be > done in Dom0, e.g. To increase a partition size, I can shutdown the > guest, increase the lv size, grow the FS and restart the guest. > > My question is: > > How can I specify multiple disks for the Xen0 guest and launch a > kickstart installation? > > Thanks for any thoughts. > > R. > > -- > Fedora-xen mailing list > Fedora-xen@redhat.com > https://www.redhat.com/mailman/listinfo/fedora-xen >
Robin Bowes
2006-Nov-03 00:16 UTC
[Fedora-xen] Re: xenguest-install.py with multiple disks?
Ben wrote:> I wrote it a while ago, but check out the hacked verison of > xenguest-install.py I attached here: > > https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=185860 > > I assume it would still work....It sure does! I updated it to include some of the changes added to the more recent xenguest-install.py (uuid stuff, mainly). One small snag... I ran it as follows: xenguest-install-md.py --bridges="xenbr0" --file="/dev/vg01/guest1_root /dev/vg01/guest1_usr /dev/vg01/guest1_home /dev/vg01/guest1_var /dev/vg01/guest1_swap" --name=guest1 --ram=256 --location=http://mirrors.kernel.org/fedora/core/5/i386/os/ --extra-args="ip=192.168.23.230 netmask=255.255.255.248 gateway=192.168.23.225 dns=192.168.2.203,192.168.2.204 ks=http://example.com/kickstart/guest1-fc5.cfg" Each of the defined partitions were mapped as a physical disk in the guest, i.e. xvda, xvdb, xvdc, etc. I''d like them to appear as xvda1, xvda2, xvda3, etc. Any idea how to change the code to do that? Thanks, R.
On Fri, 3 Nov 2006, Robin Bowes wrote:> Each of the defined partitions were mapped as a physical disk in the > guest, i.e. xvda, xvdb, xvdc, etc. > > I''d like them to appear as xvda1, xvda2, xvda3, etc. > > Any idea how to change the code to do that?Er, woops, sorry, didn''t read your original post close enough. No, I have no idea how you would do that, or even if it''s possible, or even *why* you would want to do that?
Daniel P. Berrange
2006-Nov-03 02:32 UTC
Re: [Fedora-xen] Re: xenguest-install.py with multiple disks?
On Fri, Nov 03, 2006 at 12:16:52AM +0000, Robin Bowes wrote:> Ben wrote: > > I wrote it a while ago, but check out the hacked verison of > > xenguest-install.py I attached here: > > > > https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=185860 > > > > I assume it would still work.... > > It sure does! > > I updated it to include some of the changes added to the more recent > xenguest-install.py (uuid stuff, mainly). > > One small snag... > > I ran it as follows: > > xenguest-install-md.py --bridges="xenbr0" --file="/dev/vg01/guest1_root > /dev/vg01/guest1_usr /dev/vg01/guest1_home /dev/vg01/guest1_var > /dev/vg01/guest1_swap" --name=guest1 --ram=256 > --location=http://mirrors.kernel.org/fedora/core/5/i386/os/ > --extra-args="ip=192.168.23.230 netmask=255.255.255.248 > gateway=192.168.23.225 dns=192.168.2.203,192.168.2.204 > ks=http://example.com/kickstart/guest1-fc5.cfg" > > Each of the defined partitions were mapped as a physical disk in the > guest, i.e. xvda, xvdb, xvdc, etc.Yes, each ''disk'' defined in the guest config file maps to a single block device in the guest - hence they appear as distinct device nodes> I''d like them to appear as xvda1, xvda2, xvda3, etc.Then you want multiple partitions instead of multiple disks.> Any idea how to change the code to do that?Define a single disk file in the host & pass it to the guest, and within the guest split it up into multiple partitions. Nb, this doesn''t prevent you from accessing individual parititions in the host if you want to - see th kpartx tool http://fedoraproject.org/wiki/FedoraXenQuickstartFC6#head-9c5408e750e8184aece3efe822be0ef6dd1871cd Dan. -- |=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=| |=- Perl modules: http://search.cpan.org/~danberr/ -=| |=- Projects: http://freshmeat.net/~danielpb/ -=| |=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|