Ask a questionAsk a question
 

AnswerStopping time sync with host

  • Sunday, May 10, 2009 2:18 AMProton2 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I would like to use (explore the features of) my VisualStudio2010CTP, but when I try to use it in Windows 7 Virtual PC the time sync with the host has caused the expiration of the CTP to disable the ability to log in.
    In Virtual PC 2007 I could add...
    <host_time_sync>
         <enabled type="boolean">false</enabled>
    </host_time_sync> 

    to do this, is there something similar for Windows 7 Virtualization?

Answers

  • Sunday, May 10, 2009 5:37 AMVrijesh Kothari [MSFT]MSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    The same setting can work on the Windows Virtual PC also. Add this in the VMC File. However the time will always be sync with the host on boot time. Is the Visual Studio 2010 CTP already expired as per the current date.


    Thanks, Vrijesh Kothari **** This posting is provided AS IS with no warranties, and confers no rights. You assume all risk for your use.

All Replies

  • Sunday, May 10, 2009 5:37 AMVrijesh Kothari [MSFT]MSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    The same setting can work on the Windows Virtual PC also. Add this in the VMC File. However the time will always be sync with the host on boot time. Is the Visual Studio 2010 CTP already expired as per the current date.


    Thanks, Vrijesh Kothari **** This posting is provided AS IS with no warranties, and confers no rights. You assume all risk for your use.
  • Sunday, May 10, 2009 11:04 AMProton2 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    The expiration date of the CTP is 1/1/2009. I stil have the original download that has not been booted in a virtual enviroment on my computer yet.
    Until a few days ago the CTP was working under Virtual PC 2007 SP1 with the host time sync disabled. If i recall correctly the CTP starts off with a date of around October 2008.
    I will follow this suggestion on one of the Visual Studio blogs...
    "
    I would suggest rolling back to a clean copy of the VPC (uncompress the original) and immediately disabling your clock prior to launching it for the first time."

    I will play around with it and see if it works.
  • Thursday, June 04, 2009 3:18 PMLuis_EnriqueTorres Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Where do we add this? Inside the <vm_description> tag directly? Or do we add a <microsoft><components> as in old Virtual PC to make it work?

    Luis
  • Friday, June 05, 2009 8:01 AMProton2 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    A new Visual Studio 2010 Beta I downloaded is good for another 314 days, so disabling the clock in no longer required.
  • Wednesday, June 17, 2009 8:48 AMAvinash Kumpati Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Its not the question of VS2010 Beta or other product. Is there any way we can disable time sync between host and VM in Windows Virtual PC (the one in Windows 7). I have successfully tried this one in Virtual PC 2007 SP1 by adding <host_time_sync> lines in .vmc file.

    But in Windows Virtual PC, even after adding the lines in .vmc (also by disabling integration features), disabling time synchronization between host and guest is not possbile.

    Any workarounds?
  • Wednesday, June 17, 2009 10:08 AMPalash Kar [MSFT] Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    You need to set another VMC tag to disable boot time time sync.

    Set  hardware/bios/time_sync_at_boot to false.
  • Wednesday, June 17, 2009 10:09 AMPalash Kar [MSFT] Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    remove <components> rest all are same.

    Basically you need to set this value integration/microsoft/host_time_sync/enabled to false.
  • Thursday, July 16, 2009 4:47 AMkaronwu Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Seems still not work after "set this value integration/microsoft/host_time_sync/enabled to false" and "set <host_time_sync> to false". following is the vmc file:
    ------
     <hardware>
      <bios>
       <time_sync_at_boot>
        <enabled type="boolean">false</enabled>
       </time_sync_at_boot>


     <integration>
      <microsoft>
       <host_time_sync>
        <enabled type="boolean">false</enabled>
        <frequency type="integer">15</frequency>
        <threshold type="integer">10</threshold>
       </host_time_sync>
    ------

    Each time I boot the vm, i enter into BIOS and set a previous date (200/5/15 e.g.), reboot then i still see the time in BIOS is sync with host, so still my account expired and cannot logon.

    Any suggestion?


    karon
  • Thursday, July 16, 2009 5:14 AMSANDY.WADHWA [MSFT] Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Proposed AnswerHas Code


    Following VB Script will do everything for you.  Copy the code and save it in a .vbs file. 

    'Title: Script to disable timesync for a VM. 
    
    'Usage: cscript ScriptName <vmname> 
    Set objVPC = CreateObject("VirtualPC.Application") 
    
    'Get virtual machine name from command-line parameter 
    Set objVM = objVPC.FindVirtualMachine(WScript.Arguments(0)) 
    
    'Disable TimeSync During Boot Time
    errReturn  = objVM.SetConfigurationValue("hardware/bios/time_sync_at_boot",false)
    
    'Get object for GuestOS
    Set objGuestOS =objVM.GuestOS
    
    'Disable TimeSync During VM Execution
    objGuestOS. IsHostTimeSyncEnabled = false
    
    
    • Proposed As Answer bykaronwu Thursday, July 16, 2009 7:21 AM
    •  
  • Thursday, July 16, 2009 7:21 AMkaronwu Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    SANDY, thanks for the VBS, it works. and i know how to modify the vmc by hand:
    ------
     <hardware>
      <bios>
       <time_sync_at_boot type="boolean">false</time_sync_at_boot>
      </bios>


     <integration>
      <microsoft>
       <host_time_sync>
        <enabled type="boolean">false</enabled>
        <frequency type="integer">15</frequency>
        <threshold type="integer">10</threshold>
       </host_time_sync>
    ------
    karon
  • Wednesday, September 30, 2009 11:42 PMKhanh Luu Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Hi 

    I updated my vmc file by hand as the script does not run under windows 7 64bits. 
    The settings does not disable the syncing between the host/guest machines for me.
    I am running Virtual PC 2007 SP1 (64 bits)
    .
    KL

    <hardware>
      <bios>
       <time_sync_at_boot type="boolean">false</time_sync_at_boot>
      </bios>
     </hardware>

     <integration>
      <microsoft>
       <components>
        <host_time_sync>
         <enabled type="boolean">false</enabled>
         <frequency type="integer">15</frequency>
         <threshold type="integer">10</threshold>
        </host_time_sync>
       </components>

  • Friday, November 06, 2009 9:24 PMsappidireddy Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I used below thing. But it doesn't work for me. Can any one help to solve this ?

    <hardware>
      <bios>
       <time_sync_at_boot type="boolean">false</time_sync_at_boot>
      </bios>
     </hardware>

     <integration>
      <microsoft>
       <components>
        <host_time_sync>
         <enabled type="boolean">false</enabled>
         <frequency type="integer">15</frequency>
         <threshold type="integer">10</threshold>
        </host_time_sync>
       </components>


    Sandy - Could you help me how to run VB Script?


    venkat
  • Friday, November 06, 2009 10:58 PMsappidireddy Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hello Sandy ,

    Could you tell me how to run this vb script? I am using Windows 7 and VPC 2007 sp1

    venkat
  • Monday, November 09, 2009 5:34 AMPalash Kar [MSFT] Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Copy the script above and save it to a file with the extension .vbs, say script.vbs.  now run the following command


    cscript script.vbs "VM Name"

    replace "VM Name" with the name of the VM.
  • Saturday, November 14, 2009 4:20 AMsappidireddy Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    getting below error when ever I try to execute vb script . any Idea?


    C:\Sharepoint Instalation\VPC2\vms.vbs(4, 1) Microsoft VBScript run
    ctiveX component can't create object: 'VirtualPC1.Application'
    venkat
  • Sunday, November 15, 2009 3:40 AMProton2 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    If your using Virtual PC 2007 SP1 then you just open up the .vmc file associated with your virtual machine in notepad and navigate to :

     <integration>
      <microsoft>
       <mouse>
        <allow type="boolean">true</allow>
       </mouse>

    and add the section I show below that starts with <components>.

    <integration>
         <microsoft>
            <mouse>
               <allow type="boolean">true</allow>
            </mouse>
            <components>
               <host_time_sync>
                  <enabled type="boolean">false</enabled>
               </host_time_sync>
            </components>

    Save the file and restart your virtual machine.