Windows 7 VPC virtual machine does not automatically synchronize with the host

Source: Internet
Author: User

The virtual opportunity in the Virtual PC is automatically synchronized with the current host time. However, many times, testing virtual opportunities will run after a long time, but you will find that due to time synchronization, some windows will expire, and the testing software will have a validity period, which is very important to solve this problem, on Windows 7, the traditional VPC setting method is invalid because the VPC of Windows 7 is redesigned.

For more information about how to set up VPC, see http://blogs.msdn.com/ B /virtual_pc_guy/archive/2007/11/28/disabling-time-synchronization-under-virtual-pc-2007.aspx.

Windows 7 VPC virtual machine setting method reference Windows 7 virtualization Forum http://social.technet.microsoft.com/Forums/en-US/w7itprovirt/thread/aca326fd-8e37-49f3-8b90-4eda93a11cd6#5bd85a23-5e88-4a59-97d2-fb67422646fe

The key is a vbs script.

   1: 'Title: Script to disable timesync for a VM. 

   2:  

   3: 'Usage: cscript ScriptName <vmname> 

   4: Set objVPC = CreateObject("VirtualPC.Application") 

   5:  

   6: 'Get virtual machine name from command-line parameter 

   7: Set objVM = objVPC.FindVirtualMachine(WScript.Arguments(0)) 

   8:  

   9: 'Disable TimeSync During Boot Time

  10: errReturn  = objVM.SetConfigurationValue("hardware/bios/time_sync_at_boot",false)

  11:  

  12: 'Get object for GuestOS

  13: Set objGuestOS =objVM.GuestOS

  14:  

  15: 'Disable TimeSync During VM Execution

  16: objGuestOS. IsHostTimeSyncEnabled = false

I saved it as vpcdisable. vbs. The command to set Windows XP mode not to be synchronized with the host is as follows:

Microsoft Windows [version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C: \ Users \ geffzhang> Cd Desktop

C: \ Users \ geffzhang \ Desktop> cscript vpcdisable. vbs "Windows XP mode"
Microsoft (r) Windows Script Host version 5.8
Copyright (c) Microsoft Corporation 1996-2001. All rights reserved.

C: \ Users \ geffzhang \ Desktop \ vpcdisable. vbs (16, 1) (null): The Configuration value cannot be set. Cannot
Changes the properties when the VM is sleeping or running.

C: \ Users \ geffzhang \ Desktop> cscript vpcdisable. vbs "Windows XP mode"
Microsoft (r) Windows Script Host version 5.8
Copyright (c) Microsoft Corporation 1996-2001. All rights reserved.

C: \ Users \ geffzhang \ Desktop>

Start the Windows XP mode VM. The modification time is not synchronized with the host.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.