IT Core Blog

Never stop questioning. Curiosity has its own reason for existing…

Archive for the ‘Tools’ Category

How Time Synchronization works in Hyper-V

leave a comment »

Ben Armstrong explains in dep How Time Synchronization works in Hyper-V.

Problem #1 – Running virtual machines lose track of time.

While all computers contain a hardware clock (called the RTC – or real-time clock) most operating systems do not rely on this clock.  Instead they read the time from this clock once (when they boot) and then they use their own internal routines to calculate how much time has passed.

The problem is that these internal routines make assumptions about how the underlying hardware behaves (how frequently interrupts are delivered, etc…) and these assumptions do not account for the fact that things are different inside a virtual machine.  The fact that multiple virtual machines need to be scheduled to run on the same physical hardware invariably results in minor differences in these underlying systems.  The net result of this is that time appears to drift inside of virtual machines.

UPDATE 11/22: One thing that you should be aware of here: the rate at which the time in a virtual machine drifts is affected by the total system load of the Hyper-V server.  More virtual machines doing more stuff means time drifts faster.

In order to deal with time drift in a virtual machine – you need to have some process that regularly gets the real time from a trusted source and updates the time in a virtual machine.

Hyper-V provides the time synchronization integration services to do this for you.  The way it does this is by getting time readings from the management operating system and sending them over to the guest operating system.  Once inside the guest operating system – these time readings are then delivered to the Windows time keeping infrastructure in the form of an Windows time provider (you can read more about this here: http://msdn.microsoft.com/en-us/library/bb608215.aspx).   These time samples are correctly adjusted for any time zone difference between the management operating system and the guest operating system.

Problem #2 – Saved virtual machines / snapshots have the wrong time when they are restored.

When we restore a virtual machines from a saved state or from a snapshot we put back together the memory and run state of the guest operating system to exactly match what it was when the saved state / snapshot was taken.  This includes the time calculated by the guest operating system.  So if the snapshot was taken one month ago – the time and date will report that it is still one month ago.

Interestingly enough, at this point in time we will be reporting the correct (with some caveats) time in the systems RTC.  But unfortunately the guest operating system has no idea that anything significant has happened – so it does not know to go and check the RTC and instead continues with its own internally calculated time.

To deal with this the Hyper-V time synchronization integration service detects whenever it has come back from a saved state or snapshot, and corrects the time.  It does this by issuing a time change request through the normal user mode interfaces provided by Windows.  The effect of this is that it looks just like the user sat down and changed the time manually.  This method also correctly adjusts for time zone differences between the management operating system and the guest operating system.

Read more here 🙂

Written by IT Core

November 23, 2010 at 9:25 PM

Posted in Documentation, Tools, Virtualization

Tagged with

Windows Storage Server 2008 R2 and the Microsoft iSCSI Software Target 3.3 available on MSDN/TechNet

leave a comment »

Microsoft has released the Windows Storage Server 2008 R2 for MSDN/TechNet subscribers this new version includes Microsoft iSCSI Software Target 3.3 that includes Windows PowerShell cmdlets and differencing virtual hard disk support for HPC boot scenarios.

 

Read more at:
Windows Storage Server
and
Jose Barreto’s Blog
PowerShell cmdlets for the Microsoft iSCSI Target 3.3 (included in Windows Storage Server 2008 R2)

Written by IT Core

September 29, 2010 at 9:08 PM

Virtual Machine Servicing Tool (VMST) 3.0

leave a comment »

This release of the Virtual Machine Servicing Tool (VMST) 3.0 completely replaces the Offline Virtual Machine Servicing Tool version 2.1.

Version 3.0 of the tool works with System Center Virtual Machine Manager 2008 R2, System Center Configuration Manager 2007 SP2, and Windows Server Update Services 3.0 SP2. The tool also supports updating the Windows® 7 and Windows Server® 2008 R2 operating systems.

To Download the Virtual Machine Servicing Tool 3.0 click here.

Some highlights include:
 
•    Offline virtual machines in a SCVMM library.
•    Stopped and saved state virtual machines on a host.
•    Virtual machine templates.
•    Offline virtual hard disks in a SCVMM library by injecting update packages.

Written by IT Core

September 28, 2010 at 12:00 AM

Hyper-V Host may stop when VM’s Dynamic Memory use all available RAM

leave a comment »

When setting up VMs with dynamic memory remember that your hyper-v host may stop if those VMs consume (or try to) use all existing memory on the host leaving nothing for the parent partition. 

To prevent that Crete the following Registry Key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ Virtualization
RED_DWORD value
Name = MemoryReserve
Setting = amount of MB to reserve for the parent partition.
After setting up the desired value you must reboot the host to the setting become active.

Note: if you set this value too low; VMs will be able to use too much memory and cause performance issues for you. Equally – the higher you set this the fewer VMs you can run.
For more information about memory reserve with dynamic memory check the Virtual PC Guy’s Blog

Written by IT Core

September 21, 2010 at 9:52 PM

Image to Virtual Hard Disk (WIM2VHD) Converter

leave a comment »

You can use WIM2VHD to quickly create a VHD from a WIM file, e.g. the install.wim file in the Vista/Windows7/Server 2008/Server 2008 R2 installation media, and then attach that VHD to a Hyper-V virtual machine.

Mikael Nystrom blogged about WIM2VHD.

Sometimes you need a fast way to create a reference image. You know, suddenly you need to have a VHD file of Windows Server 2008 R2 and a Windows 7 machine, like NOW. It always seem to be NOW or yesterday that things need to be done, wonder why…

Anyway, you need the following:

WAIK (Well, you only need Imagex, but if you have WAIK installed you have that)
WIM2VHD, and that’s just a small download
The OS (You only need the Install.wim, but I’ll guess you already have the DVD somewhere anyway)
WIM2VHD
This tools i really nice actually, but it only supports Windows 7 and Windows Server 2008 R2. The command line to create a VHD file is quite simple:

cscript WIM2VHD.wsf /wim:g:\sources\install.wim /sku:1

That will create a 40gb dynamic VHD file in less than 3 minutes (Yes, I do have a SSD disk), but it also have a bunch of other commands that could be used to make it more fun 🙂

Required parameters:

  /wim: Path to the .wim file
  /sku: Sku number or sku name

Some Optional parameters:

  /vhd: Name and path to the VHD file you would like to have
  /size: Size (default is 40960 mb)
  /disktype: Dynamic, Fixed or FastFixed (FastFixed requires VHDTOOL)
  /unattend: Path and name of an unattended XML file
  /qfe: A comma-seperated list of .MSU files that you would like to have in the image
  /mergefolder: Names of folders that you would like to have in the image

I use it from time to time when a need a fast solution and i don’t have time to do it the “real” way and in this case the real way is using MDT of course.

Nice work 🙂

Written by IT Core

August 26, 2010 at 12:00 AM

Posted in Tools, Virtualization

Tagged with ,

Linux Integration Services v2.1 RTM

leave a comment »

From Virtualization Team Blog

“We are really excited to announce the availability of the Hyper-V Linux Integration Services for Linux Version 2.1. This release marks yet another milestone in providing a comprehensive virtualization platform to our customers. Customers who have a heterogeneous operating system environment desire their virtualization platform to provide support for all operating systems that they have in their datacenters. We have supported Linux as a guest operating system on our virtualization platform from the days of Virtual Server and continue to enhance our support in that regard.”

The following features are included in the 2.1 release:

Driver support for synthetic devices: Linux Integration Services supports the synthetic network controller and the synthetic storage controller that were developed specifically for Hyper-V.
Fastpath Boot Support for Hyper-V: Boot devices take advantage of the block Virtualization Service Client (VSC) to provide enhanced performance.
Timesync: The clock inside the virtual machine will remain synchronized with the clock on the host.
Integrated Shutdown: Virtual machines running Linux can be gracefully shut down from either Hyper-V Manager or System Center Virtual Machine Manager.
Symmetric Multi-Processing (SMP) Support: Supported Linux distributions can use up to 4 virtual processors (VP) per virtual machine.
Heartbeat: Allows the host to detect whether the guest is running and responsive.
Pluggable Time Source: A pluggable clock source module is included to provide a more accurate time source to the guest.

This version of the integration services for Hyper-V supports Novell SUSE Linux Enterprise Server 10 SP3, SUSE Linux Enterprise Server 11, and Red Hat Enterprise Linux 5.2 / 5.3 / 5.4 / 5.5.
Obtain the Linux IC’s via the Microsoft Download Center.

Written by IT Core

July 30, 2010 at 12:00 AM

SCVMM integration with Opsmgr fails with the error ID:10207

leave a comment »

How to recover from the error 10207 when performing the Administrator setup console stage:

Setup was not able to retrieve the service account from the specified Virtual Machine Manager server.
Specify a different VMM server and then try the operation again.

ID: 10207

Check if the SPN for the SCVMM service account is OK. Use the SETSPN -L, or check the account properties using ADSIEDIT or any other tool that allows you to confirm the SPN. If everything is ok you may need to recreate the SCP container that is under the SCVMM server account (In the picture bellow you can check that using the tool ADSIEDIT.msc).

 

To manually create this container, use the SCVMM CD and browse to the \Setup folder using command prompt.  Run CONFIGURESCPTOOL.EXE –INSTALL from that folder.  This should create the SCP, after running the cmd confirm the SCP creation using ADSIEdit.  Now rerun the integration setup and all steps should complete without errors.

Note: If you do uninstall/reinstall SCVMM then make sure you patch it to the level it was at before.  Up-to-date SCVMM agents cannot communicate with out-of-date SCVMM servers.

The full story Aida-s blog.

Written by IT Core

July 18, 2010 at 12:00 AM