After the vRO OVF is deployed and running. Open the VM in VMRC (VMware Remote Console), login. I add a bash shell script to the template vRO will execute to adjust network settings passed by vRA. Once the script is added, permissions are adjusted, take a snapshot
Open VMRC, login as root
In VI, craate a file named addnetwork.sh placed on the root folder. The file can be located in any folder, we just chose the root folder.
Type settings listed in the image, or copy and paste from listed below
Type command to give vRO the ability to execute the script
Chmod 755 /addnetwork.sh
Notice perms after adjusting
Last STEP
- Shutdown VM
- Take a single snapshot
—————————-
Code from step 3
mv /etc/HOSTNAME /etc/HOME.original
echo $1 >> /etc/HOSTNAME mv /etc/sysconfig/networking/devices/ifcfg-eth0 /etc/sysconfig/networking/devices/ifcfg-eth0.original
echo “DEVICE=eth0” >> /etc/sysconfig/networking/devices/ifcfg-eth0 echo “BOOTPROTO=’static’” >> /etc/sysconfig/networking/devices/ifcfg-eth0 echo “STARTMODE=’auto’” >> /etc/sysconfig/networking/devices/ifcfg-eth0 echo “TYPE=Ethernet” >> /etc/sysconfig/networking/devices/ifcfg-eth0 echo “USERCONTROL=’no’” >> /etc/sysconfig/networking/devices/ifcfg-eth0 echo “IPADDR=’$2′” >> /etc/sysconfig/networking/devices/ifcfg-eth0 echo “NETMASK=’$3′” >> /etc/sysconfig/networking/devices/ifcfg-eth0 mv /etc/sysconfig/network/routes /etc/sysconfig/network/routes.original
echo “default $4 – -” >> /etc/sysconfig/network/routes mv /etc/resolve.conf /etc/resolve.conf.original
echo “nameserver $5” >> /etc/resolve.conf echo “nameserver $6” >> /etc/resolve.conf echo “domain $7” >> /etc/resolve.conf echo “search $7” >> /etc/resolve.conf service network restart |
Enjoy,
Steve Schofield
http://vsteve.me