Someone save me from antivirus.  Did you read that correctly?  I said save me from antivirus. 

Odd isn’t it?  Anti-virus is there to protect us, but we also need to be protected from antivirus. Antivirus solutions are critical, even in a virtual desktop environment. Many people believe that because a hosted VM-based virtual desktop image is created from a real-only image that they are immune from virus.  That is only partially true.  When you reboot, the virus goes away because the changes to the base image are destroyed (including the virus), but what about that time period between getting infected and the next reboot? Those few hours are dangerous and it is why antivirus is takes up the number 6 spot in the Top 10 Mistakes to Avoid with Desktop Virtualization:

10. Not calculating user bandwidth requirements

9.   Not considering the user profile

8.   Lack of Application Virtualization Strategy

7.   Improper Resource Allocation

If using hosted shared desktops or hosted VM-based VDI desktops, those virtual desktops are located within the data center with other critical systems.  If a virus made it into the data center, the entire infrastructure is at serious risk.  However, simply adding an antivirus solution to the virtual desktop can protect the environment. So what’s the big deal? Just do it right?  Well, nothing is as simple as one expects it to be.  Antivirus can have a major impact on the virtualization infrastructure, and even cause users to experience poor virtual desktop performance, if done improperly.

If the virtual desktops are streamed with Provisioning services, and those desktops start a full system scan at roughly the same time. Provisioning services only streams the portions of the disk image that are required.  However, if a full system scan is done,  those virtual desktops will eventually request the entire vDisk image. This not only overwhelms the network and Provisioning services, but also impacts the storage infrastructure as the write cache is utilized and explodes in size. Overcoming these issues is a fairly easy matter and is based on the following recommendations:

  1. The desktop image must be free from viruses. It is recommended to do a full system scan in private image (read/write) mode. This guarantees the image is clean.
  2. When the desktop image is in standard mode (read-only), the antivirus should be configured as follows:
    1. Only scan create/modify activities of files
    2. Scan on write events only
    3. Scan local drives only
    4. Exclusions
      1. Pagefile
      2. Print Spooler directory
      3. Write cache file
      4. EdgeSight database
      5. ICA client’s bitmap cache directory
    5. Remove the antivirus configurations from the HKEY_LOCAL_MACHINE\Software\Microsoft\Windows

      \Current Version\Run registry key
  3. Reconfigure antivirus so that the virus definitions file is stored on a persistent diskso antivirus doens’t have to download the entire definition file on each startup.

These will help overcome antivirus headaches.

Daniel – Lead Architect – Worldwide Consulting Solutions

Follow Me on twitter: @djfeller

My Blog: Virtualize My Desktop

Questions, then email Ask The Architect