VMware Cloud Community
dinny
Expert
Expert
Jump to solution

Can I get vmtools to time sync automatically when I build a w2003 VM on VI3

Hiya,

I currently build my windows OSs (on VMs hosted on ESX 3.01) via a scripted build.

(I appreciate that I could use a template and perhaps get round the issue that way - but I am interested to see if there are any alternatives)

I want to turn off the W32Time service which I can easily do via a WMI script.

I then wish to automatically set the vmtools to time sync.

Unfortunately this is not the default setting.

I know that this is a setting held in the .vmx file - so I guess I have at least three possible alternatives:

1) Maybe there is an (undocumented?) switch I can use at the vmtools install time with the vmware tools.msi?

2) Perhaps I could amend the default vmx file used at build time by VC - I imagine that this is possible but appreciate it would be unsupported. Does anyone know where this info would be held? I am guessing in an .xml file somewhere?

3) I could maybe write a script to open the vmtools from the system tray and manually check the box.

Has anyone ever done something like this?

Any ideas how it could best be done?

Cheers

Dinny

Reply
0 Kudos
1 Solution

Accepted Solutions
WesTopping
Enthusiast
Enthusiast
Jump to solution

Here is the tool I used to do this.

http://chitchat.at.infoseek.co.jp/vmware/vmtools.html#vmw

Just copy the vmw.exe to a location in the system path of your VM Template.

I created a group policy in AD that would shutoff w32time service and run a startup script with this command in it "vmw option +t"

Wes

View solution in original post

Reply
0 Kudos
7 Replies
Jae_Ellers
Virtuoso
Virtuoso
Jump to solution

I'm guessing.

1. use regmon from sysinternals to monitor where the value is stored in the registry then script the reg file import.

2. use AutoIt to change the checkbox

3. test the vmx config change

-=-=-=-=-=-=-=-=-=-=-=-=-=-=- http://blog.mr-vm.com http://www.vmprofessional.com -=-=-=-=-=-=-=-=-=-=-=-=-=-=-
sbeaver
Leadership
Leadership
Jump to solution

AFAIK The value is not in the registry but the value is in the *.vmx file

Steve Beaver
VMware Communities User Moderator
VMware vExpert 2009 - 2020
VMware NSX vExpert - 2019 - 2020
====
Co-Author of "VMware ESX Essentials in the Virtual Data Center"
(ISBN:1420070274) from Auerbach
Come check out my blog: [www.virtualizationpractice.com/blog|http://www.virtualizationpractice.com/blog/]
Come follow me on twitter http://www.twitter.com/sbeaver

**The Cloud is a journey, not a project.**
Reply
0 Kudos
Jae_Ellers
Virtuoso
Virtuoso
Jump to solution

Yeah, but does the time get synced if the box isn't checked?

-=-=-=-=-=-=-=-=-=-=-=-=-=-=- http://blog.mr-vm.com http://www.vmprofessional.com -=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Reply
0 Kudos
sbeaver
Leadership
Leadership
Jump to solution

The way I understand it is once that box is checked the value is written to vmx file for that VM and the tools then update the time

Steve Beaver
VMware Communities User Moderator
VMware vExpert 2009 - 2020
VMware NSX vExpert - 2019 - 2020
====
Co-Author of "VMware ESX Essentials in the Virtual Data Center"
(ISBN:1420070274) from Auerbach
Come check out my blog: [www.virtualizationpractice.com/blog|http://www.virtualizationpractice.com/blog/]
Come follow me on twitter http://www.twitter.com/sbeaver

**The Cloud is a journey, not a project.**
Reply
0 Kudos
dinny
Expert
Expert
Jump to solution

Hiya,

Thanks for the suggestions.

I'm fairly certain that the setting is not held locally on the windows OS - I don't think it is even there for a transient time?

So I don't believe I can use a reg file or similar.

I may well be able to use something like autoit?

I know that things like the default VM disk name and other standard settings used when creating a VM in ESX 2.5 were held on the ESX 2.5 server in:

/usr/lib/vmware-mui/apache/htdocs/vmware/src/sxAddVirtualMachine.js[/i]

You could amend the defaults used to create a VM by editing this file.

I am guessing that the default settings used to create the vmx (or at least some of them) are held somewhere on the ESX box in ESX 3.

I don't suppose anyone has any idea if this is the case - or where that might be?

Dinny

Reply
0 Kudos
WesTopping
Enthusiast
Enthusiast
Jump to solution

Here is the tool I used to do this.

http://chitchat.at.infoseek.co.jp/vmware/vmtools.html#vmw

Just copy the vmw.exe to a location in the system path of your VM Template.

I created a group policy in AD that would shutoff w32time service and run a startup script with this command in it "vmw option +t"

Wes

Reply
0 Kudos
dinny
Expert
Expert
Jump to solution

Thanks Wes,

That's just the sort of thing I was after.

Cheers

Dinny

Reply
0 Kudos