[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-users] Installing openSuSE 10.3 as PV-guest on a LVM-drive of a openSuSE 10.3 host
Am 18.11.2007 um 21:13 schrieb Thorolf Godawa: how can I install a openSuSE 10.3 PV-guest on a LVM-drive of a openSuSE10.3 host with Xen 3.10? Actually - I don't know the official way to do this and I don't know exactly why it doesn't work for you. I assume domUloader.py has problems detecting a valid kernel/initrd/bootloader or whatever in your installed system. So I try to describe what I did to get running domU's ...As you did, I used to install systems directly into a logical volumes - but I had to find out that it is near to impossible to upgrade a SuSE systemwithout a master boot record to play with. So I switched to "virtual hard disks" within LV's. What I currently do is to create two logical volumes: /dev/vg0/test-hda /dev/vg0/test-swapThen I "fdisk /dev/vg0/test-hda" with one single primary partition and use "kpartx -a /dev/vg0/test-hda" to import this virtual disk via device-mapper. Then I create a filesystem on /dev/mapper/vg0-test--hda1 and mount the newly created filesystem.After that I can dir-install to this filesystem via YaST. Now you have to create a valid fstab in the new system and you have to place a valid/etc/YaST2/control.xml file. I use just a copy of the dom0 for that - without this you will have problems to use Community Repositories. Important: you have to umount /dev/mapper/vg0-test--hda1There is no detection that this filesystem is still mounted when you start your new domU and you will kill the filesystem when it is mounted twice. As there is no correctly installed kernel/initrd/bootloader within the dir-installed system you have to boot it otherwise. The following script creates an usable initrd to boot such a system. After booting the system I install a bootloader within the booted system via yast. Now you can switch to domUloader.py for booting this system. === mkinitrd-xen.sh === #!/bin/bash . /etc/rc.status . /etc/sysconfig/xen-bj rc_reset echo -n "Create initrd for domU's" if [ -z "$DOMU_KERNEL" ]; then DOMU_KERNEL="vmlinuz-xen" fi if [ -z "$DOMU_INITRD" ]; then DOMU_KERNEL="initrd-domU" fi if [ -z "$DOMU_INITRD_MODULES" ]; then DOMU_INITRD_MODULES="xennet xenblk" fi if [ -z "$DOMU_BOOT_DIRECTORY" ]; then DOMU_BOOT_DIRECTORY="/etc/xen/images/boot" fi mkdir -p "$DOMU_BOOT_DIRECTORY" cp -p "/boot/$DOMU_KERNEL" "$DOMU_BOOT_DIRECTORY" mkinitrd -b "$DOMU_BOOT_DIRECTORY" -k "$DOMU_KERNEL" \ -i "$DOMU_INITRD" -u "$DOMU_INITRD_MODULES" rc_status -v -r === snip === my configuration for this: === /etc/sysconfig/xen-bj === # base kernel to be used for xen domU's DOMU_KERNEL="vmlinuz-xenpae" DOMU_INITRD="initrd-domU" # modules to include in domU initrd DOMU_INITRD_MODULES="xennet xenblk reiserfs nfs nfsd xfs dm_mod" # directory to place kernel and initrd for domU's DOMU_BOOT_DIRECTORY="/etc/xen/images/boot" === snip === and finally the working xen config: === /etc/xen/vm/test === name="test" ostype="opensuse" memory=192 vcpus=1 on_crash="destroy" on_poweroff="destroy" on_reboot="restart" localtime=0 builder="linux" #bootloader="/usr/lib/xen/boot/domUloader.py" #bootargs="--entry=xvda1:/boot/vmlinuz-xenpae,/boot/initrd-xenpae" kernel="/etc/xen/images/boot/vmlinuz-xenpae" ramdisk="/etc/xen/images/boot/initrd-domU" root="xvda1" extra="xencons=tty" disk=[ 'phy:/dev/vg0/test-hda,xvda,w', 'phy:/dev/vg0/test-swap,xvdb2,w', ] vif=[ 'mac=00:16:3e:34:00:16,bridge=xenbr0', ] serial="pty" === snip === Regards Ralf _______________________________________________ Xen-users mailing list Xen-users@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-users
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |