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”
The output in the screenshot shows the timezone is set to US/Pacific. This is the standard setting.
If we try to run the date command of course we get the timezone in PST format.
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”
The screenshot below shows the output. Just for reference I have saved all the timezone values in a text file timezone.
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”
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.
Of course the date command now shows the correct timezone.
Since this is a single node cluster with one CVM we’ll proceed by stopping the cluster with the command:
“cluster stop”
Let’s type “yes” to confirm.
Cluster services are now 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”
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.
We are now ready to issue the command:
“cluster start”
The screenshot now shows all the Cluster services running.
This pretty much concludes this quick article on how to choose a different Nutanix timezone using the command line.
Add Comment