Thursday, September 12, 2013

Turn off time sync in virtual machine

Recently, I got a request to recover the gst database of NetWorker to retreive some historical backup stats because retention for stats was set too short.  To avoid interfering the production environment, I close the gstd saveset out with FTD as clone device.  Build a Windows 2003 VM on my laptop with same version of NetWorker.  Because retention for stats was too short.  As soon as I recovered the gstd database and started gst service, those expired records would be purged.  Only option is to change the system time of VM to an earlier date within the retention period.  To achieve that, I follow VMware kb1189 to disable the time sync with host.

Since I am using VMware Workstation, I choose to edit the vmx file.  For vSphere, you can add parameters following the kb1189.

Add configuration options in the virtual machine's .vmx file:

Open the virtual machine's configuration file (/vmfs/volumes/datastore_name/vm_name/vm_name.vmx) using a text editor.
  1. Set these options to zero. If the entries do not exist, add them.

    Note: 0 = disabled, 1 = enabled.

    tools.syncTime = "0"
    time.synchronize.continue = "0"
    time.synchronize.restore = "0"
    time.synchronize.resume.disk = "0"
    time.synchronize.shrink = "0"
    time.synchronize.tools.startup = "0"
    time.synchronize.tools.enable = "0"
    time.synchronize.resume.host = "0"


    Note: In GSX, VMware Fusion, and VMware Workstation, you must use "FALSE" instead of "0". For example:

    tools.syncTime = "FALSE"
    time.synchronize.continue = "FALSE"
    time.synchronize.restore = "FALSE"
    time.synchronize.resume.disk = "FALSE"
    time.synchronize.shrink = "FALSE"
    time.synchronize.tools.startup = "FALSE"
    time.synchronize.tools.enable = "FALSE"
    time.synchronize.resume.host = "FALSE"
After that, I change the system date, scan in the media.  run recoverpsm and then start gst.  Now, all the stats I need is there. 

No comments: