Tag : Hyper-V

Can’t Install AV on a Hyper-V Host or it Breaks Networking… Wow

Problem: Antivirus and Hyper-V (Why can’t I start my virtual machine?)
A little while ago our support team ran into some problems starting virtual machines after they install antivirus software in the management operating system.  The root cause of the problem is that a number of these programs monitor file access in a way that interferes with Hyper-V’s attempts to open virtual machine files.  If you see this problem – you have two options:

  1. Don’t install antivirus.  If you are running a server core configuration, or a full server configuration, and you have nothing running in the management operating system other than Hyper-V, and you do not have people logging in and browsing the web in the management partition, etc… Then you do not really need to have antivirus software installed as there is limited risk of a virus.
  2. Install antivirus and set up the following exclusions (most antivirus programs allow you to exclude specific directories, files and processes from scanning to help deal with issues such as these):
  •         Default virtual machine configuration directory (Normally this is C:ProgramDataMicrosoftWindowsHyper-V)
  •         Custom virtual machine configuration directories
  •         Default virtual hard disk directory (Normally this is C:UsersPublicDocumentsHyper-VVirtual Hard Disks)
  •         Custom virtual hard disk directories
  •         Snapshot directories
  •         Vmms.exe
  •         Vmwp.exe

 

Hyper-V: Shrinking a VHD

If you are using Hyper-V virtual machine, with thin provisioned (or dynamic) virtual disks, you may find yourself needing to compact those virtual disk files (.VHD) to reclaim free space.

Typically you would compact a virtual hard disk in situations such as the following:

  • After you install the guest operating system (which uses many temporary files)
  • After you delete large amounts of data
  • When you are preparing the virtual hard disk for archiving, for deployment to another computer or CD-ROM, or for distribution

To ensure that you get the smallest possible file size when you compact the virtual hard disk, you need to do some file system maintenance before you compact the disk. In the guest operating system of the virtual machine that is using the disk you want to compact, do the following:

  • Remove any temporary folders or unwanted folders or files.
  • Empty the Recycle Bin.
  • Defragment the disk.

Note that when running a defrag, you will actually grow the .VHD file prior to compacting, so make sure the host server has enough free space to accommodate it.

Shut down the VM, then go to the settings and go to the disk settings and click edit. This will bring up the disk edit wizard and the keep the first selected option, Compact.

Depending on the size of the .VHD file, and the available “white space” within the file, compacting may take a significant amount of time. So be sure to plan your downtime accordingly.

You may receive the error message “The system failed to compact disk.vhd. Error Code: The requested operation could not be completed due to a file system limitation” when attempting to compact the .VHD file.
First, check to see that there are no VSS backups on the VHD by running a “vssadmin list shadows” command in an elevated command prompt.

Second, delete any VSS backups that are present by running “vssadmin delete shadows /all“. If this fails to delete the VSS backups, you may need to resort to the “DiskShadow” utility in WS2K8 and WS2K8R2. (There’s some more information on DiskShadow here (free registration required) and also here.)

Upgrading The Intergration Services with SP1

With the release of Windows Server 2008 R2 SP1 and the addition of Dynamic Memory, I’ve received a few requests for the link to the latest version of the Integration Services. If you’ve upgraded to R2 Service Pack 1, you have the latest Integration Services. There are a few scenarios to consider.

Guest OS is Linux. If the guest OS is Linux and you’re running the latest Linux Integration Services 2.1, you don’t need to do anything. You have the latest. For more info, see attached.

Guest OS is Windows Server 2008 R2. If the guest OS was Windows Server 2008 R2 and you upgraded the guest to Service Pack 1, then the Integration Services were upgraded as well. (How cool is that?)

Other Supported Windows Guests: If you’re running any other supported Windows OS, then you’ll need to upgrade the Integration Services. The Integration Services ISO is included with Hyper-V. When you upgrade to SP1, the Integration Services are automatically updated as well. To upgrade the Integration Services, you need to:
1.      Start the VM

2.      Connect to the VM

3.      Go to the Action Menu and Select the bottom menu item, Insert Integration Services Setup Disk.

4.      Run the Integration Services installer and restart the VM. Done.

FAQ
Q:           Do the Linux Integration Services enable mouse support?
A:
Mouse support is not included in the Linux integration services.  However, see the read me for information on where to obtain the InputVSC driver that provides mouse support when used over a RDP connection.

Q:           Is Red Hat Enterprise Linux 6.0 supported?
A:
At this time Red Hat 6.0 (currently) in beta is not supported. Our goal is to work with Red Hat to back port the Hyper-V Linux integration services from kernel.org tree. However, this will only happen once our drivers are out of the staging area in the kernel. We don’t have a timeline for this yet, but will share more information on this as we continue to work with the Linux community.

Q:           Did Citrix develop these drivers?
A:
No.  The Linux IC’s were developed by a team in the Microsoft Open Source Technology Center.
Many thanks to Hank Janssen and his team, including Haiyang Zhang and Hashir Abdi.

Q:           Do I need to run the Xen kernel with the hypercall shim?
A:
No, the Xen kernel is no longer used.

Q:           How does this relate to the announcement of Microsoft contributing the Linux IC code under GPLv2 to the Linux kernel?
A:
This package provides integration components for the distributions that we support (SLES and Red Hat). Once the IC’s that have been merged into the kernel are available in distributions, we will gradually phase out the separate IC package.

Q:           Is SUSE Linux Enterprise Server 11 Service Pack 1 supported?
A:
No, not yet. Now that we have RTM’d version 2.1, Novell will back port these into an update for SLES 11 SP1 which will be released by Novell in the next few months. Thereafter, customers will get the Hyper-V Linux IS’s as a part of the SLES 11 SP1 distribution. No separate download or installation will be required.

Q:           Will these capabilities be contributed into the mainline Linux kernel?
A:
Yes, we will submit patches with these capabilities to the Linux mainline kernel as well.

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. Microsoft 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.

Virtual Enhancements- Microsoft Hyper v

There are some new enhancements with Hyper v you should be aware of.  Dynamic Memory- A new feature of Hyper-V™ introduced in SP1 for Windows Server® 2008 R2  that enables Hyper-V hosts to dynamically adjust the amount of memory available to virtual machines in response to changing workloads. The benefits of Dynamic Memory include higher virtual machine consolidation ratios and increased flexibility for managing virtualized workloads.

Microsoft RemoteFX– Introduces a new set of remote user-experience capabilities that enable a media-rich user environment for virtual and session-based desktops. RemoteFX can be deployed to a range of thick and thin client devices, enabling cost-effective, local-like access to graphics-intensive applications. RemoteFX also supports a broad array of USB peripherals to improve the productivity of users of virtual desktops. Microsoft RemoteFX leverages the power of virtualized graphics resources and advanced codecs to recreate the fidelity of hardware-assisted graphics acceleration, including support for 3D content and Windows Aero®.  Multi-Site Disaster Recovery Automation for Hyper-V – not so new, but still important.  For automated failover and recovery of Hyper-V workloads, organizations can combine StorageLink Site Recovery technology with Microsoft failover clustering to create a geographically dispersed (or multi-site) cluster. Together, StorageLink Site Recovery and Windows Server® 2008 provide a disaster recovery solution that automatically detects local application or hardware failures and responds with the appropriate failover measures.