Skip to content

Instantly share code, notes, and snippets.

@ruzickap
Last active August 29, 2015 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ruzickap/1cc8a50a1e7cc072a567 to your computer and use it in GitHub Desktop.
Save ruzickap/1cc8a50a1e7cc072a567 to your computer and use it in GitHub Desktop.
VMware vCenter Server 5.x Appliance installtion and configuration
# Deploy OVF from remote HTTP source
/vmfs/volumes/My_Datastore/vmware-ovftool/ovftool --diskMode=thin --datastore=My_Datastore --noSSLVerify --acceptAllEulas --skipManifestCheck "--net:Network 1=VMware Management Network" --prop:vami.ip0.VMware_vCenter_Server_Appliance=10.29.49.99 --prop:vami.netmask0.VMware_vCenter_Server_Appliance=255.255.255.128 --prop:vami.gateway.VMware_vCenter_Server_Appliance=10.29.49.1 --prop:vami.DNS.VMware_vCenter_Server_Appliance=10.1.1.44 --prop:vami.hostname=vcenter.example.com "ftp://ftp.example.com/software/vmware/VMware-vCenter-Server-Appliance-5.5.0.10000-1624811_OVF10.ova" "vi://root:mypassword@127.0.0.1"
echo "Accepting EULA ..."
/usr/sbin/vpxd_servicecfg eula accept
echo "Configuring Embedded DB ..."
/usr/sbin/vpxd_servicecfg db write embedded
echo "Configuring SSO..."
/usr/sbin/vpxd_servicecfg sso write embedded
echo "Starting VCSA ..."
/usr/sbin/vpxd_servicecfg service start
echo "Configure NTP"
/usr/sbin/vpxd_servicecfg timesync write ntp ntp.example.com
echo "Set Proxy Server"
/opt/vmware/share/vami/vami_set_proxy px01.example.com 3128
# Password change
echo rootpassword | passwd --stdin
# Add user admin
useradd admin
echo admin123 | passwd --stdin admin
chage -M -1 -E -1 admin
# If you wish to completely disable account password expiry, you can do so by running the following command:
chage -M -1 -E -1 root
echo "Configure Network Settings"
/opt/vmware/share/vami/vami_set_dns 10.0.0.44 10.0.0.45
/opt/vmware/share/vami/vami_set_hostname vcenter.example.com
/opt/vmware/share/vami/vami_set_timezone_cmd Europe/Prague
# Regenerate all certificates next reboot
echo only-once > /etc/vmware-vpx/ssl/allow_regeneration
# Add SSH key
mkdir /root/.ssh
wget ftp://ftp.example.com/ssh_keys/id_dsa.pub -O /root/.ssh/authorized_keys
chmod 755 /root/.ssh
chmod 600 /root/.ssh/authorized_keys
# Install SuSe repositories
zypper --gpg-auto-import-keys ar http://download.opensuse.org/distribution/11.1/repo/oss/ 11.1
zypper --gpg-auto-import-keys ar http://download.opensuse.org/update/11.1/ Update-11.1
rm /etc/zypp/repos.d/Update-11.1.repo
zypper --no-gpg-checks refresh
# Install MC :-)
zypper install -y mc
# Disable mouse support in MC
sed -i 's@/usr/bin/mc@/usr/bin/mc --nomouse@' /usr/share/mc/bin/mc-wrapper.sh
( sleep 10; reboot ) &
# Set static IP
/opt/vmware/share/vami/vami_set_network eth0 STATICV4 10.0.0.99 255.255.255.128 10.0.0.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment