How To Change the Date and Time for a Xen Virtual Machine

This will describes how to disable clock synchronization on the Xen Virtual Machines (XenVMs). By default, the clocks are synchronized with their XenServer Host and changing the date and time on them is not possible.

Steps :

1. On the Text Console for the XenVM, type the command:
# echo 1 > /proc/sys/xen/independent_wallclock

2. Use the date command, which takes the form date <MMDDhhmm>, to set the date. For example, the following command would set the date to 21:21:00 3 May 2007:
# date  -s “1 JAN 2009 23:00:00”

3. If you want this setting to persist through a reboot of the virtual machine, change the sysctl configuration file sysctl.conf by adding the following lines:
# Independent wall clock time to XenServer Host
xen/independent_wallclock = 1

You can also use the XenServer Administrator console to accomplish this by adding the following line as a boot parameter to the XenVM:
independent_wallclock = 1

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: