«

»

Set Nutanix AHV Timezone

——————————————————————————————–

Updated 2019-09-18

Important – This blog post is obsolete if you’re using an AOS version newer than 5.0 meaning pretty much everyone these days.

Do not set AHV time zone anymore.

——————————————————————————————–

Orginal blog post:

 

A question I have received multiple times since Nutanix released their hypervisor AHV, formerly known as Acropolis Hypervisor, is how to set correct time zone.
I have already covered how to set correct time zone for the Nutanix Controller Virtual Machine (CVM) and the Nutanix Cluster in the Create & Configure Nutanix Cluster via command line blog post.

There is a Nutanix KB, Number 3849 that covers the steps to set AHV time zone so either read the KB, published 1 month ago, or follow the below steps where i take advantage of the newly, from AOS 5.0, CVM command hostssh.

  • Verify exiting AHV time zone configuration by running the below command from any CVM in the Nutanix cluster
    • hostssh date
  • Find the time zone of your choice by list the available once via the below command from any CVM in the Nutanix Cluster
    • ssh root@192.168.5.1 ls -l /usr/share/zoneinfo

      As you can see there are both files which you can use and directories/folders where you can get additional time zone configuration options.
  • I use the below command syntax to configure AHV time zone and in the below example I’ll set it to Europe -> Stockholm
    • hostssh "date; mv /etc/localtime /etc/localtime.bak; ln -s /usr/share/zoneinfo/Europe/Stockholm /etc/localtime; date"
  • The command form the previous step will give you an output similar to the below so just verify the time and time zone is correct and you’re good to go.

If you want to verify the linux symlink you can run the below command from any CVM in the Nutanix cluster

  • hostssh ls -l /etc/localtime
  • The expected output from the above command is something similar to the below (depends on the your time zone configuration)