How can time be configured on Xen cloudboot hypervisors?
Xen Cloudboot Hypervisors
* The examples below are for a Centos5 (used for Xen HVs) cloudboot HV
* Internet should be available on the HV
- cloudboot HVs use BST(British Summer Time) time zone during boot
- hardware clock is read only once during the OS boot
- /etc/sysconfig/clock is absent on clouboot HVs so hardware clock is
read as local time for BST time zone
- !!! all the listed above can't be changed by custom config !!!
#1 set hardware clock to current BST time:
- boot the HV
root@HV# /etc/init.d/ntpd stop root@HV# echo -e '18.104.22.168\t0.centos.pool.ntp.org' >> /etc/hosts root@HV# ntpdate 0.centos.pool.ntp.org root@HV# hwclock -w
#2 make CP timezone file available for the HV
- check if /etc/localtime on CP is regular file or a symlink
root@CP# ls -al /etc/localtime
-rw-r--r-- 1 root root 440 May 2 15:00 /etc/localtime
- copy the timezone file
root@CP# cp /etc/localtime
#3 modify the HV custom config(in UI)
- add the following lines to the HV custom config
ln -sf /.rw/etc/localtime /etc/localtime echo -e '22.214.171.124\t0.centos.pool.ntp.org' >> /etc/hosts echo -e '126.96.36.199\t1.centos.pool.ntp.org' >> /etc/hosts echo -e '188.8.131.52\t2.centos.pool.ntp.org' >> /etc/hosts
#4 reboot the HV from UI
If you don't want to set up the internet on these HVs, you can configure the ntpd service on the CP and modify 'ntp.conf' on the HVs via custom scripts to use the CP as the source. You should not need to add records to /etc/hosts in this case.
This is setup your team will have to do, as it's not related to OnApp software, and we're restricted on setting up third party services.