Michael DeHaan wrote:
> Leonid Flaks wrote:
>> I am testing koan installation of the virtual guest.
>> Host system is not a cobbler server, but on the same network.
>> The name of the guest is 'devel'. Cobbler is running OK - I was able to 
>> PXE install a couple of systems.
>>
>> On host I ran:
>>
>> koan --server cobblerserver --virt --system=devel
>>
>> and after a couple minutes got this:
>>
>> - looking for Cobbler at http://cobblerserver/cobbler_api
>> - reading URL: http://xx.xx.xx.xx/cblr/svc/op/ks/system/devel
>> libvirtd (pid  2547) is running...
>> - using qemu hypervisor, type=kvm
>> Cannot find install source in kickstart file, aborting.
>>
>> If I ran 'koan --server cobblerserver --display --system=devel',
>> the output is following:
>>
>> - looking for Cobbler at http://cobblerserver/cobbler_api
>> - reading URL: http://xx.xx.xx.xx/cblr/svc/op/ks/system/devel
>>                  name  : devel
>>                distro  : F-10-GOLD-x86_64
>>               profile  : F-10-64-virt-guest
>>             kickstart  : http://xx.xx.xx.xx/cblr/svc/op/ks/system/devel
>>               ks_meta  : 
>> tree=http://mirror.mycompany.com/fedora/releases/10/Fedora/x86_64/os/
>>                kernel  : /x8c/leonpc/srv/pxe-images/10/64/vmlinuz
>>                initrd  : /x8c/leonpc/srv/pxe-images/10/64/initrd.img
>>        kernel_options  : ksdevice=eth0 noipv6 lang= text 
>> ks=http://xx.xx.xx.xx/cblr/svc/op/ks/system/devel kssendmac
>>                 repos  : F10-x86_64-Everything-local 
>> F10-x86_64-updates-local
>>              virt_ram  : 512
>>             virt_type  : qemu
>>             virt_path  : /dev/vg-virt/LV2
>>
>> xx.xx.xx.xx is the IP of cobbler server.
>>
>> I use the network installation with the same http url as for non virtual 
>> systems, that works fine.
>>
>> Am I missing something here?
>>
>>   
> Due to the way cobbler uses libvirt, we parse the kickstart from koan 
> before using it to find out where to find the install location, and then 
> we pass that along so that we can start the installation. This is where 
> it failed. If the kickstart template contains the "url --url=$tree" line 
> this /should/ work. (koan is looking for the "url" line to parse out and 
> apparently couldn't find it).
Yes, the template for this profile has 'url --url $tree' line.

> 
> Can I see the results of "cobbler system getks --name=devel" ?
> 
> Also please be sure you're trying a recent koan, i.e. 1.6.X something.
It is the latest for fedora 10 (1.6.5)
> 
> 
Here is the output "cobbler system getks --name=devel":

#platform=x86, AMD64, or Intel EM64T
#version=DEVEL
# Firewall configuration
firewall --disabled
# Root password
rootpw --iscrypted XXXXXXXXXXXXXXXXXXXXXXXXXXX
# Network information
#network  --bootproto=static --device=eth0 --gateway=XX.XX.XX.24 
--ip=XX.XX.XX.28 --nameserver=XX.XX.128.31 --netmask=255.255.255.0 
--onboot=on
# System authorization information 
 

auth  --useshadow  --passalgo=md5 --enablenis --nisdomain=mynisdomain 

# Use graphical install 
 

text 
 

# System keyboard 
 

keyboard us 
 

# System language 
 

lang en_US 
 

# SELinux configuration 
 

selinux --disabled 
 

# Do not configure the X Window System 
 

skipx 
 

# Install OS instead of upgrade 
 

install 
 

# Use network installation 
 
 

url --url 
http://mirror.mycompany.com/fedora/releases/10/Fedora/x86_64/os/ 



repo --name=F10-x86_64-Everything-local 
--baseurl=http://mirror.mycompany.com/fedora/releases/10/Everything/x86_64/os/
repo --name=F10-x86_64-updates-local 
--baseurl=http://mirror.mycompany.com/fedora/updates/10/x86_64/ 


# Reboot after installation
reboot
# System timezone
timezone  America/New_York
# System bootloader configuration
bootloader --location=mbr
# Partition clearing information
clearpart --all
# Disk partitioniong information
%include /tmp/ksfoo/partitioning/v-guest.part

%pre
set -x -v
exec 1>/tmp/ks-pre.log 2>&1

# Once root's homedir is there, copy over the log.
while : ; do
     sleep 10
     if [ -d /mnt/sysimage/root ]; then
         cp /tmp/ks-pre.log /mnt/sysimage/root/
         logger "Copied %pre section log to system"
         break
     fi
done &


wget "http://XX.XX.XX.XX/cblr/svc/op/trig/mode/pre/system/devel"; -O 
/dev/null
wget -O /tmp/anamon "http://XX.XX.XX.XX/cobbler/aux/anamon"; 

python /tmp/anamon --name "devel" --server "XX.XX.XX.XX" --port "80" 


touch /tmp/ks-pre.log && exec >> /tmp/ks-pre.log 2>&1
export TMPMNTPNT="/tmp/ksfoo";
mkdir -p $TMPMNTPNT && \
         mount -t nfs -o ro,udp,nolock 
nfsserver.mycompany.com:/NFS4exports/leonpc/ks $TMPMNTPNT

%end

%post
#!/bin/sh
#-- base post section --------------------------------------------
set -x -v
exec 1>/root/ks-post.log 2>&1

wget "http://XX.XX.XX.XX/cblr/svc/op/yum/system/devel"; 
--output-document=/etc/yum.repos.d/cobbler-config.repo




# Start download cobbler managed config files (if applicable)
# End download cobbler managed config files (if applicable)

# Start koan environment setup
echo "export COBBLER_SERVER=XX.XX.XX.XX" > /etc/profile.d/cobbler.sh
echo "setenv COBBLER_SERVER XX.XX.XX.XX" > /etc/profile.d/cobbler.csh
# End koan environment setup

# Begin cobbler registration
# skipping for system-based installation
# End cobbler registration


wget -O /usr/local/sbin/anamon "http://XX.XX.XX.XX/cobbler/aux/anamon";
wget -O /etc/rc.d/init.d/anamon "http://XX.XX.XX.XX/cobbler/aux/anamon.init";

chmod 755 /etc/rc.d/init.d/anamon /usr/local/sbin/anamon
test -d /selinux && restorecon /etc/rc.d/init.d/anamon 
/usr/local/sbin/anamon

chkconfig --add anamon

cat << __EOT__ > /etc/sysconfig/anamon
COBBLER_SERVER="XX.XX.XX.XX"
COBBLER_PORT="80"
COBBLER_NAME="devel"
LOGFILES="/var/log/boot.log /var/log/messages /var/log/dmesg"
__EOT__


umask 077
touch /tmp/ks-post.log && exec >> /tmp/ks-post.log 2>&1
echo 
"----------------------------------------------------------------------"
echo "POST START `date`"
export TMPMNTPNT="/tmp/chrootksfoo";
export LOCALVERS="10";
export ARCH="64";
# need to mount again because %post runs in the chrooted environ!!!
# and need to startup rpcbind and nfslock for the mount to work
mkdir -p $TMPMNTPNT && \
         /etc/init.d/rpcbind start && /etc/init.d/nfslock start && \
         mount -t nfs -o ro 
nfsserver.mycompany.com:/NFS4exports/leonpc/ks $TMPMNTPNT
cd $TMPMNTPNT/scripts-post
./base-post.devel.f$LOCALVERS-$ARCH.sh &
wait

wget "http://XX.XX.XX.XX/cblr/svc/op/nopxe/system/devel"; -O /dev/null
wget "http://XX.XX.XX.XX/cblr/svc/op/ks/system/devel"; -O /root/cobbler.ks
wget "http://XX.XX.XX.XX/cblr/svc/op/trig/mode/post/system/devel"; -O 
/dev/null
%end

%packages --ignoremissing
@base
@fonts
@graphical-internet
@gnome-desktop
@printing
@system-tools
@admin-tools
@server-cfg
@text-internet
@virtualization
autofs
ypbind
koan
screen
yum-fastestmirror
tcsh
-yum-fedorakmod
-ntp
-firstboot
-system-config-date
-system-config-keyboard
%end


Had to do some editing to remove encrypted password, IP etc.
_______________________________________________
cobbler mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/cobbler

Reply via email to