I have a scripted installation file which works fine and installs everything including all post network config etc however as soon as I enable interactive mode so that users can change the ip address etc to build different hosts the install falls over with a few anaconda errors ending in the following line:
AttributeError: 'dict' object has no attribute 'order'
The config file is as follows: (for some reason this forum is interpretting hashes in my script file is the number 1)
Regional Settings
keyboard uk
lang en_GB
langsupport --default en_GB
timezone --utc Europe/Dublin
Installation settings
interactive
skipx
text
mouse none
firewall --disabled
Unencrypted root password: V1rTUaLIz3
rootpw --iscrypted $1$5a17$LhBegAZBDjCV8e7Z3hAxz0
reboot
install
cdrom
Driver disks
Load drivers
Bootloader options
bootloader --location=mbr --driveorder=sda
Authentication
auth --enableshadow --enablemd5
Partitioning
clearpart --all --drives=sda --initlabel
part /boot --fstype ext3 --size 200 --ondisk=sda --asprimary
part swap --size 1600 --ondisk=sda --asprimary
part / --fstype ext3 --size 3072 --ondisk=sda --asprimary
part /home --fstype ext3 --size 512 --ondisk=sda
part /tmp --fstype ext3 --size 2048 --ondisk=sda
part /var --fstype ext3 --size 4096 --ondisk=sda
part /opt --fstype ext3 --size 2048 --ondisk=sda
part None --fstype vmkcore --size 100 --ondisk=sda
part None --fstype vmfs3 --size 20480 --ondisk=sda
Network Configurations
network --device eth0 --bootproto static --ip 192.168.163.95 --netmask 255.255.255.0 --gateway 192.168.163.1 --nameserver 192.168.163.4 --hostname scripted.vmdomain.com --addvmportgroup=0
VMWare License options
vmaccepteula
vmlicense --mode=server --server=27000@192.168.163.5 --edition=esxfull --features=backup,vsmp
%vmlicense_text
%packages
@base
%post
cp /etc/rc.d/rc.local /etc/rc.d/rc.local.bak
cp /etc/localtime /etc/localtime.old
cat > /etc/rc.d/rc.local<<EFO1
#!/bin/sh
Add extra uplink to vSwitch0
esxcfg-vswitch -L vmnic1 vSwitch0
Create Production Virtual Switch
esxcfg-vswitch -a vSwitch1
esxcfg-vswitch -L vmnic1 vSwitch1
esxcfg-vswitch -L vmnic2 vSwitch1
esxcfg-vswitch -L vmnic4 vSwitch1
Create a Backup Virtual Switch
esxcfg-vswitch -a vSwitch2
esxcfg-vswitch -L vmnic2 vSwitch2
esxcfg-vswitch -L vmnic3 vSwitch2
esxcfg-vswitch -L vmnic5 vSwitch2
Create an Internal Virtual Switch
esxcfg-vswitch -a vSwitch3
Create Port Groups
esxcfg-vswitch -A VMotion vSwitch0
esxcfg-vswitch -A Production vSwitch1
esxcfg-vswitch -A Backup vSwitch2
esxcfg-vswitch -A Internal vSwitch3
Create VMotion Interface
esxcfg-vmknic -a VMotion -i 192.168.163.96 -n 255.255.255.0
service mgmt-vmware restart
sleep 20
Use the vimsh shell to activate the VMotion functionality
vimsh -n -e "/hostsvc/vmotion/vnic_set portgroup1"
Open Firewall Ports
esxcfg-firewall -e ntpClient
esxcfg-firewall -e sshClient
Add Extra DNS Servers
echo nameserver 192.168.50.200 >>/etc/resolv.conf
Add NTP Servers
mv /etc/ntp.conf /etc/ntp.conf.bak
echo "restrict 127.0.0.1" >>/etc/ntp.conf
echo "restrict default kod nomodify notrap" >>/etc/ntp.conf
echo "server 192.168.50.30" >>/etc/ntp.conf
echo "driftfile /var/lib/ntp/drift" >>/etc/ntp.conf
Modify Step-Tickers File
mv /etc/ntp/step-tickers /etc/ntp/step-tickers.bak
echo "192.168.50.30" >>/etc/ntp/step-tickers
echo " " >>/etc/ntp/step-tickers
ln -sf /usr/share/zoneinfo/Europe/Dublin /etc/localtime
Allow Root User SSH Access - Disable These Commands If Unsure
sed -e 's/PermitRootLogin no/PermitRootLogin yes/' /etc/ssh/sshd_config > /etc/ssh/sshd_config.new
mv -f /etc/ssh/sshd_config.new /etc/ssh/sshd_config
service sshd restart
Add local SSH user
useradd -p ziG3isbGhHixg ssh_user
Increase the Service Console Memory in esx.conf
sed -i -e 's/272/800/' /etc/vmware/esx.conf
Increase the Service Console Memory in grub.conf
sed -i -e 's/272M/800M/' /boot/grub/grub.conf
sed -i -e 's/277504/818176/' /boot/grub/grub.conf
Return rc
mv -f /etc/rc.d/rc.local.bak /etc/rc.d/rc.local
reboot
EOF1
Does anybody have any idea why this is not working? As soon as I comment out the 'interactive' bit it flies through fine.
Thanks
Have you checked to make sure that line is in the correct format? Meaning, no ^M at the end of the line?
Run cat -A against the file to see if the correct end of line marker exists.
-KjB
Every time I change the file I pass it through a format conversion program so that it is in linux format and has all the correct formatting so i don't think it is that.
Thanks for the reply though .