Brugh/All,
I'm still having problems were the default vmkernel gateway it looks like it adds the gateway from the console, but when I go into the gui it's not there. Also I'm having a problem where I have a "VM Network" port group which I have set to go to vSwitch1, but it keeps ending up in vSwitch0 instead. Below is my script.
- Setup admin acct
grep ^admins: /etc/group > /dev/null || groupadd admins
grep ^%admins /etc/sudoers > /dev/null || echo %admins ALL = NOPASSWD: ALL >> /etc/sudoers
useradd esxadmin
echo XXXX| passwd --stdin esxadmin
usermod -G admins esxadmin
- Add addition nic to vSwitch0
esxcfg-vswitch -L vmnic1 vSwitch0
- Add additional nic to vSwitch1
esxcfg-vswitch -a vSwitch1
esxcfg-vswitch -L vmnic2 vSwitch1
esxcfg-vswitch -L vmnic3 vSwitch1
- Set vlan information for service ports
- esxcfg-vswitch vSwitch0 -p "Service Console"
- create Standard VM PortGroups
esxcfg-vswitch -A 'Server VLAN' vSwitch1
esxcfg-vswitch -A 'DMZ_public' vSwitch1
esxcfg-vswitch -v 6 -p 'DMZ_public' vSwitch1
esxcfg-vswitch -A 'DMZ_private' vSwitch1
esxcfg-vswitch -v 5 -p 'DMZ_private' vSwitch1
esxcfg-vswitch -A 'Tyler-Network' vSwitch1
esxcfg-vswitch -v 11 -p 'Tyler-Network' vSwitch1
esxcfg-vswitch -A 'CODY-Secure-Network-Restricted' vSwitch1
esxcfg-vswitch -v 40 -p 'CODY-Secure-Network-Restricted' vSwitch1
esxcfg-vswitch -A 'VM Network' vSwitch1
esxcfg-vswitch -v 210 -p 'VM Network' vSwitch1
- create the VMotion portgroup & set default gw
esxcfg-vswitch -A VMkernel vSwitch0
esxcfg-vswitch -v 0 -p 'VMkernel' vSwitch0
esxcfg-route 172.19.80.1
- Dont edit the next line! check ks link in table of ESX hosts for output
esxcfg-vmknic -a VMkernel -i ###HOSTIP### -n 255.255.255.0
- enable VMotion
service mgmt-vmware restart
sleep 5
while ; do
sleep 5
echo Waiting for hostd to accept connections..
done
vimsh -n -e "hostsvc/vmotion/vnic_set vmk0"
- Allow ROOT access using SSH
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
mv /etc/ntpd.conf /etc/ntpd.conf.bak
mv /etc/ntpd/step-tickers /etc/ntpd/step-tickers.bak
echo "1.north-america.pool.ntp.org" > /etc/ntp/step-tickers
echo "pool.ntp.org" >> /etc/ntp/step-tickers
echo "restrict 127.0.0.1" > /etc/ntp.conf
echo "restrict default kod nomodify notrap" >> /etc/ntp.conf
echo "server 1.north-america.pool.ntp.org" >> /etc/ntp.conf
echo "server pool.ntp.org" >> /etc/ntp.conf
echo "driftfile /var/lib/ntp/drift" >> /etc/ntp.conf
esxcfg-firewall -e ntpClient
service ntpd restart
chkconfig --level 345 ntpd on
hwclock --systohc
vimsh -n -e "hostsvc/advopt/update LVM.DisallowSnapshotLun int 0"
vimsh -n -e "hostsvc/storage/hba_rescan vmhba1"
vimsh -n -e "hostsvc/storage/hba_rescan vmhba2"
sleep 5
cd /vmfs/volumes/ISO-SoftwareRepository/hpmgmt/825
./install825vibs.sh --silent --inputfile hpmgmt.conf