VMware Cloud Community
shamim-a
Enthusiast
Enthusiast

VMWare tools in Ubuntu

Hi All

I installed vmware tools on a ubuntu server. server doesn't have a gui interface.

Now i would like to sync the server time with ESX host.

is this possible? if yes, please let me know the procedure.

Infrastructure: ESX 3.5 with VC 2.5

Ubuntu 6.0

Shamim

0 Kudos
9 Replies
demz
Expert
Expert

Hi,

you can try to execute the following command in the COS of the ESX hosting the VM

vmware-cmd /vmfs/volumes/UUID/VMFOLDER/yourVM.vmx setconfig tools.syncTime "true"

This will add the right entry in the vmx file of your VM.

Texiwill
Leadership
Leadership

Hello,

Moved to more appropriate forum.

Ensure that 'guestAgent' is started on the VM, if so then the change demz suggested will work. Alternatively you could use ntpdate within Cron every five minutes to do the same thing. BTW, if you are using synctime do not use ntpd.


Best regards,

Edward L. Haletky

VMware Communities User Moderator

====

Author of the book 'VMWare ESX Server in the Enterprise: Planning and Securing Virtualization Servers', Copyright 2008 Pearson Education.

CIO Virtualization Blog: http://www.cio.com/blog/index/topic/168354

As well as the Virtualization Wiki at http://www.astroarch.com/wiki/index.php/Virtualization

--
Edward L. Haletky
vExpert XIV: 2009-2023,
VMTN Community Moderator
vSphere Upgrade Saga: https://www.astroarch.com/blogs
GitHub Repo: https://github.com/Texiwill
shamim-a
Enthusiast
Enthusiast

Thanks for your comments,

Can u please let me know, how can i check whether guestAgent is running on my Ubuntu server?

vmware-guestd process is running.

Shamim

0 Kudos
Texiwill
Leadership
Leadership

Hello,

Look at the process list....

ps ax


Best regards,

Edward L. Haletky

VMware Communities User Moderator

====

Author of the book 'VMWare ESX Server in the Enterprise: Planning and Securing Virtualization Servers', Copyright 2008 Pearson Education.

CIO Virtualization Blog: http://www.cio.com/blog/index/topic/168354

As well as the Virtualization Wiki at http://www.astroarch.com/wiki/index.php/Virtualization

--
Edward L. Haletky
vExpert XIV: 2009-2023,
VMTN Community Moderator
vSphere Upgrade Saga: https://www.astroarch.com/blogs
GitHub Repo: https://github.com/Texiwill
0 Kudos
shamim-a
Enthusiast
Enthusiast

hi texiwill

vmware-guestd is running.

I have run the vmware-cmd command to set the tools.syncTime "true", Command run successfully, but in vmx file

tools.syncTime = FALSE

I have tried it in a Windows server also. Same problem in coming in that also.

But if in Windows server, i'm setting thru GUI, change is happening in vmx file also.

Shamim

0 Kudos
Texiwill
Leadership
Leadership

Hello,

vmware-cmd does not always work, you can edit the .vmx file by hand to make the change. Just be sure the VM is powered off first.


Best regards,

Edward L. Haletky

VMware Communities User Moderator

====

Author of the book 'VMWare ESX Server in the Enterprise: Planning and Securing Virtualization Servers', Copyright 2008 Pearson Education.

CIO Virtualization Blog: http://www.cio.com/blog/index/topic/168354

As well as the Virtualization Wiki at http://www.astroarch.com/wiki/index.php/Virtualization

--
Edward L. Haletky
vExpert XIV: 2009-2023,
VMTN Community Moderator
vSphere Upgrade Saga: https://www.astroarch.com/blogs
GitHub Repo: https://github.com/Texiwill
0 Kudos
demz
Expert
Expert

Edward, you're right, I think he tries the vmware-cmd command on a powered on VM, it is the case Shamim ?

0 Kudos
shamim-a
Enthusiast
Enthusiast

hi demz & texiwill

yes..i was trying vmware-cmd on a running server.

and yes again, vmware-cmd is not making any changes in vmx file, even i run the command when vm is powered off. Then I vi the vmx and edited it.

it is nice to see that, once i edited on Windows server vmx, & when power on the vm, in vmware tools, time sync option got checked.

but in an ubuntu server, how can i confirm it?

also one more question;

is there any changes need to make in ESX host, to configure it as a time server?

Thanks for the help.... Smiley Happy

Shamim

0 Kudos
demz
Expert
Expert

I don't know how to check, except by checking if the date is as well the one given by the ESX.

You can get time from a ntp server from your ESX, simply do the following :

esxcfg-firewall -e ntpClient

echo ntp.yourserver.com > /etc/ntp/step-tickers

echo restrict ntp.yourserver.com mask 255.255.255.255 nomodify notrap noquery >> /etc/ntp/ntp.conf

echo server ntp.yourserver.com >> /etc/ntp/ntp.conf

chkconfig --level 345 ntpd on

service ntpd restart

hwclock --systohc

Let us know if all is working

0 Kudos