Some Custom Config examples:
**CustomConfig section can be found under Settings > Hypervisors > Edit
Since Cloudboot HVs are always booted from a standard image, they lose any custom changes which are made anytime they are rebooted.
This is why when adding/editing a Cloudboot HV we give the option to add custom config. The examples are given below:
To add an interface and discover/log into an ISCSI target:
ifconfig eth1 10.10.20.253/24 up
iscsiadm -m discovery -t sendtargets -p 10.10.20.254
iscsiadm -m node -l
To add a sensible hostname:
hostname hypervisor1.onapp.com
Mount a NFS mount for backups
mkdir -p /onapp/backups && mount -t nfs <NFS SERVER IP>:/backups /onapp/backups
Set a "unique" specific initiator name:
echo 'InitiatorName=iqn.1994-05.com.redhat:a340bd46425f-HV2' > /etc/iscsi/initiatorname.iscsi
/etc/init.d/iscsi restart
Create a bonded interface (appliance/provisioning):
echo -e 'DEVICE=appbond\nTYPE=BOND\nBONDING_OPTS="miimon=100 mode=4"'>/etc/sysconfig/network-scripts/ifcfg-appbond
echo -e 'DEVICE=eth3\nHWADDR=90:e2:ba:2e:ba:05\nMASTER=appbond\nSLAVE=yes'>>/etc/sysconfig/network-scripts/ifcfg-eth3
echo -e 'DEVICE=eth4\nHWADDR=90:e2:ba:2e:ba:06\nMASTER=appbond\nSLAVE=yes'>>/etc/sysconfig/network-scripts/ifcfg-eth4
ifup eth3
ifup eth4
ifup appbond
Bind the appliance NIC to a specific interface name (useful if interfaces get detected in a different order after HV reboots) In this example the network join interface name would be set to app1:
nic0=`ifconfig -a | grep 90:E2:BA:2B:4F:0D | cut -f1 -d " " ` && ip link set $nic0 down && ip link set $nic0 name app1 && ip link set app1 up
Change the bonding mode of the OnApp storage bond
ifdown onappstorebond
rm /etc/modprobe.d/onappstorebond
echo -e 'TYPE=BOND\nBONDING_OPTS="miimon=100 mode=4"'>>/etc/sysconfig/network-scripts/ifcfg-onappstorebond
ifup onappstorebond
Disable SMART Checks:
#commenting out DEVICESCAN
sed -i "/^[[:space:]]*DEVICESCAN/{s/^/#/}" /etc/smartd.conf
/etc/init.d/smartd restart
Cloudboot Backup server examples:
If you have a separate partition for backups and templates (/dev/sda1 and /dev/sda2)
mkdir -p /onapp/backups
mkdir -p /onapp/templates
mount /dev/sda1 /onapp/backups
mount /dev/sda2 /onapp/templates
If you current array is detected as /dev/sda1 and currently everything is located in /onapp within templates and backup directories within:
mkdir -p /onapp
mount /dev/sda1 /onapp
Synchronize NTP with CP server:
echo "server 100.100.100.2" >> /etc/ntp.conf
service ntpd stop
ntpdate -s 100.100.100.2
service ntpd start
Where 100.100.100.2 is IP address of your CP server.