Configure Nutanix Timezone from command line

One of the settings generally overlooked is about setting the appropriate timezone. In this quick article we’ll review how to configure Nutanix timezone settings. This will allow us to consolidate all the timestamps related to different tasks from the Host and Controller VMs. Another important aspect is with regards to Network Time Protocol as we already explored in this article on how to configure Nutanix Time Server.

The purpose of this article is to show the steps for changing the Nutanix timezone using the built-in command line utility “nCLI”.

It is important to mention that in order to make the changes effective a reboot of the cluster is required. The article includes the steps for rebooting the cluster.


Configure Nutanix TimeZone with command line

Let’s login to the CVM. In my case I have a single node cluster running in my home lab. We can this starting an SSH session from the Host or using an SSH client to connect directly. In my case I will use PuTTY. Default credentials are:

  • username: nutanix
  • password: nutanix/4u

To get an high level detail of the Nutanix cluster configuration we can issue the command:

“ncli cluster get-params” configure Nutanix timezone get parameters

The output in the screenshot shows the timezone is set to US/Pacific. This is the standard setting. configure Nutanix timezone list parameters

If we try to run the date command of course we get the timezone in PST format. configure Nutanix timezone date

At this point if we want to know the available values we can use to configure the Nutanix timezoneĀ  we can simply issue the following command to list them:

“ncli cluster set-timezone timezone=test” configure Nutanix timezone list zone names

The screenshot below shows the output. Just for reference I have saved all the timezone values in a text fileĀ timezone. configure Nutanix timezone names

In my case I will change this to Europe/London. So from command line we can simply type:

“ncli cluster set-timezone timezone=Europe/London” configure Nutanix timezone set zone

At the execution of the command we can now see the Nutanix timezone has changed accordingly. In addition to make this effective and change all timestamps with the new timezone we need to restart the cluster. configure Nutanix timezone check zone

Of course the date command now shows the correct timezone. configure Nutanix timezone check date

Since this is a single node cluster with one CVM we’ll proceed by stopping the cluster with the command:

“cluster stop” configure Nutanix timezone cluster stop

Let’s type “yes” to confirm. configure Nutanix timezone cluster stop confirm

Cluster services are now not running. configure Nutanix timezone cluster not running

Let’s do a reboot of the CVM. Not required but since there are no other VMs running it is a safe operation. Let’s do this with:

“sudo reboot” configure Nutanix timezone cvm reboot

At this point the kill signal has been sent and the TTY connection will close.

Let’s connect again to the SSH session to the Nutanix Controller VM. configure Nutanix timezone cvm login

We are now ready to issue the command:

“cluster start” configure Nutanix timezone cluster start

The screenshot now shows all the Cluster services running. configure Nutanix timezone cluster running

This pretty much concludes this quick article on how to choose a different Nutanix timezone using the command line.

Michele Domanico

Passionate about Virtualization, Storage, Data Availability and Software Defined Data Center technologies. The aim of is sharing with the Community the knowledge and experience gained with customers, industry leaders and like minded peers. Always open to constructive feedback and new challenges.

Leave a Reply

%d bloggers like this: