I've created a custom ks.cfg which i've got prompting for server names, IP addresses etc, however in the %post section I have:
%post --interpreter=bash --nochroot
mkdir /extra
cp /mnt/source/extra/hpmgmt-8.5.1-vmware4x.tgz /extra
before the box reboots I can see the folder and the files, however after reboot they are not on the server.
Wtf am I doing wrong as Its driving me mad now!
i've also tried:
%post --interpreter=bash --nochroot
mkdir /mnt/sysimage/extra
cp /mnt/source/extra/hpmgmt-8.5.1-vmware4x.tgz /mnt/sysimage/extra
(oh and this is for vsphere)
David
Anyone got any ideas?
Its driving me mad now.
David
Hi,
Can you share how you managed to prompt for service console ip, hostname etc??? ive managed to prompt for the sc ip and hostname but can't get the prompt for vmotion working - i'd like to prompt for the vmotion ip address when the build first starts and then configure it in the post section.....but not having much luck at the mo.
Sorry cant help much with your question at the mo...i'll keep trying to plug away at it though.
I do it in the PRE section..
I've got
%pre --interpreter-bash
exec </dev/tty1 >/dev/tty1
chvt 1
echo "Enter Service Console Address"
read ip
and get rest etc...
chvt 6
then
cat <<EOF>> /tmp/networkconfig
network --device=vmnic0 --bootprotostatic --ip=$ip
EOF
then in the main part of ks.cfg for network config do:
%include /tmp/networkconfig
Drop me a mail if you want the full scripts (david.wallis@callcreditgroup.com)
David
Ill take a look at it tomorrow for you
Thanks...that'll be absolutely ace if you can!
This is what I do based a lot of references on the web. put the post script in init.d, otherwise it gets deleted after reboot.
##########################################################
%post –interpreter=bash
#Create post config script
cat << \EOF > /etc/rc3.d/S99postconf
#!/bin/bash
blah blah...
Reset system to normal boot mode
echo "Removing automated post script..."
rm /etc/rc3.d/S99postconf
EOF
chmod +x /etc/rc3.d/S99postconf
Also, I use UDA 2 and use subtemplate feature to configure vmotion, vmkernerl IP, etc.
This is how I got it to work in my environment:
%post --interpreter=bash
mkdir /mnt/sysimage/extra
mount /dev/cdrom /mnt/cdrom
cp /mnt/cdrom/extra/hpmgmt-8.5.1-vmware4x.tgz /mnt/sysimage/extra
If this doesn't work (I'm not sure if /mnt/ will retain anything on reboot) try this:
%post --interpreter=bash
mkdir /home/sysimage/extra
mount /dev/cdrom /mnt/cdrom
cp /mnt/cdrom/extra/hpmgmt-8.5.1-vmware4x.tgz /home/sysimage/extra
Cheers will have a play, never thought of mounting the cd! I should stick to microsoft really! As you can tell bash isn't one of my strong points!
David Wallis
It took me several hours of searching forums and messing around to finally get that to work. Hopefully it will work for you as well.
David
I removed your personal information from your last post. I would be very careful about including it.
Cheers, Should have remembered that replying from my blackberry would automatically add my disclaimer from my email!
David
I use LogicMail for BlackBerry just for that problem.