If domi is run on a system where a loopback device is in use, at least on a udev system. It looks for /dev/loop[n] where losetup prints /dev/loop/[n]. domi thinks the device is not use and tries to set it up but gets an error. A small patch which follows appears to fix the situation. It follows --- /tmp/domi.orig 2006-04-22 12:02:25.000000000 -0500 +++ /usr/bin/domi 2006-04-22 11:40:44.000000000 -0500 @@ -260,7 +260,7 @@ count="${DOMI_DISK_SIZE}" fi for i in $(seq 0 63); do - DOMI_DISK_DEV="/dev/loop${i}" + DOMI_DISK_DEV="/dev/loop/${i}" if losetup -a | grep -q "${DOMI_DISK_DEV}:"; then continue fi
I assume from your gentoo.org address you have access to cvs. Feel free to add this patch yourself, and add yourself as a maintainer if you're interested in fixing future bugs. Thanks.
I'm in the infra group. I'm not an ebuild maintainer and, honestly, I don't really have the time right now to be one.
Hi all, I am looking for help on runnung domi to install a fedora domainU. I have the following in my domi.conf #!/bin/bash #This script is generated by http://bugs.gentoo.org/show_bug.cgi?id=112407 and the domi.man file #domi - xen domain installer /etc/domi.conf #domi is a shell script which sets up virtual machines. It creates #virtual disks using either LVM or image files and installs a linux #distribution on the newly created disk. # #domi reads the configuration from /etc/domi.conf and the config file #passed on the command line. Then goes ahead and sets up the virtual #disk without asking further questions, so be careful. #The config files are simply sourced. Thus the syntax for setting the #config options is the usual shell variable style, i.e. VAR="value", #hashmark works for comments and so on. ############################################ #DOMI_NAME="myexample" # Required DOMI_NAME="fedora" ##Name of the virtual machine. #Distribution to install. Valid choices are suse, fedora, debian and gentoo. #DOMI_DISTRO="gentoo" # Required. DOMI_DISTRO="fedora" #DOMI_CACHE Location where downloaded files are cached. #Default: /var/cache/domi DOMI_CACHE="/var/cache/domi" #DOMI_FSTYPE File system to use #Default: ext2 DOMI_FSTYPE="ext2" #DOMI_PASSWD Initial root password #Default: root DOMI_PASSWD="secret" #DOMI_VDISK #Name of the virtual disk (inside the vm). "xvda" should do just #fine with all modern, udev-based distros which create the device #nodes automatically. In case of trouble you can try "hda" instead. #Default: xvda DOMI_VDISK="xvda" #DOMI_XEN_CONF #Recommended. #If specified the script writes a initial Xen config file to the given #location. #DOMI_XEN_CONF="/etc/xen/auto/myexample-startscript" DOMI_XEN_CONF="/etc/xen/auto/domi_script " #DOMI_XEN_KERNEL Xen kernel (for the Xen config file). #Default: /boot/vmlinuz-xen #DOMI_XEN_KERNEL="/path/to/the/DomU-kernel" DOMI_XEN_KERNEL="/boot/vmlinuz-2.6-xen" #DOMI_XEN_MEMORY #Main memory (for the Xen config file, in megabytes). #Default: 128 DOMI_XEN_MEMORY="900" #DOMI_DISK_VG #LVM volume group to use for storage. If specied the script will #create a volume with DOMI_NAME in that volume group and use it to #setup the virtual disk. #Recommended. #DOMI_DISK_VG="volg-md9"# without a "/" DOMI_DISK_VG="volgroup01 " #DOMI_DISK_FILE #If you don't use LVM you can specify an image file to use for the #virtual disk. Setting either DOMI_DISK_VG or DOMI_DISK_FILE is #required. #DOMI_DISK_FILE="/path/to/my/myexample.file" #DOMI_DISK_FILE="" #DOMI_DISK_SPARSE #Set this to some non-empty value to make domi use sparse file for the #disk images. Has no effect if you use LVM. #DOMI_DISK_SIZE #Default: 4096 #Size of the virtual disk, in megabytes. DOMI_DISK_SIZE="4096" #DOMI_SWAP_SIZE #Default: 256 #Size of the swap partition, in megabytes. DOMI_SWAP_SIZE="256" #DOMI_ROOT_SIZE #Default: DOMI_DISK_SIZE - DOMI_SWAP_SIZE #Size if the root filesystem, in megabytes #DOMI_HOOK_POST #Custom postinstall script to run. And in a /home/mark/domi.conf FEDORA_REPO=http://download.fedora.redhat.com/pub/fedora/linux/core/5/i386/os FEDORA_GROUP=base When I run domi /home/mark/domi.conf I just get ### ### fedora: initialization (i386) ### ### ### fedora: setup disk (lvm volume /dev/volgroup01 /fedora) ### Logical volume "fedora" already exists in volume group "volgroup01" ### ### fedora: cleanup: virtual disk ### ### ### fedora: cleanup: remove tmp files It completes in about 3 seconds. From what I understand domi should download the the fedora packages and create a domU. What am I missing?
found one problem. I had a space in the volumegroup variable name. i.e "/dev/volgroup01 ". This called the script to fail. I now get as far as the following. ### fedora: setup disk (lvm volume /dev/volgroup01/fedora) ### Logical volume "fedora" successfully removed Logical volume "fedora" created Disk geometry for /dev/mapper/volgroup01-fedora: 0kB - 4295MB Disk label type: msdos Number Start End Size Type File system Flags 1 1kB 4026MB 4026MB primary boot 2 4026MB 4294MB 268MB primary add map volgroup01-fedora-part1 : 0 7863281 linear /dev/mapper/volgroup01-fedora 1 add map volgroup01-fedora-part2 : 0 523437 linear /dev/mapper/volgroup01-fedora 7863282 ### ### fedora: setup root fs and swap ### Setting up swapspace version 1, size = 267993 kB LABEL=fedora-swap, UUID=8975dae0-7cd6-4fb8-8030-8b8d745f0bb1 ### ### fedora: copy saved yum cache [/var/cache/domi/fedora-pub-fedora-linux-core-5-i386-os] ### which: no yum in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/3.4.5:/opt/sun-jdk-1.5.0.06/bin:/opt/sun-jdk-1.5.0.06/jre/bin:/usr/qt/3/bin:/usr/kde/3.4/sbin:/usr/kde/3.4/bin) error: yum not found ### ### fedora: save yum cache [/var/cache/domi/fedora-pub-fedora-linux-core-5-i386-os] ### ### ### fedora: cleanup: virtual disk ### /dev/mapper/volgroup01-fedora-part1 umounted del devmap : volgroup01-fedora-part1 del devmap : volgroup01-fedora-part2 ### ### fedora: cleanup: remove tmp files ### Do I need to download these files manually or should the script do it for me?
ok --- looks like it need yum installed but I cant find it in the ebuilds :(
marduk - I've applied the patch as a sed line in the ebuild. Mark - looks like it needs yum - please open another bug (building suse may also require kpartx and y2pmsh). I haven't got time to write ebuilds for those, so if you do please attach them to the new bug report. Thanks.