VMware ESX and Enhanced VMotion Compatibility

27 August, 2008

The classic VMotion problem of recent times is the customer who buys tin from a vendor, only to find out that the processor number e.g. 53xx and 54xx, is actually quite significant. The principle difference which will prevent VMotion is the addition of SSE4.1 to the 54xx range of Intel processors (if you previously only had 53xx Intel processors).

An application using the SSE4.1 feature (or is aware of this feature) when VMotioned to a non-SSE4.1 host would likely blue screen trying to make use of this feature on the older host.

People then recalled the CPU mask feature in VMware – we’ll just mask it out they thought. Unfortunately VMware declared this was an unsupported mask with KB1993 and KB1991.

Note that for production environments, VMware neither supports nor recommends modifying VMotion masks for SSE3, SSE3, or SSE4.1 because of the risk of failure of the application or guest operating system after migration.

The reason soon became clear:

  • SSE features can be used by user-level code (applications).
  • Mask does not work for user-level code (i.e. applications).
  • In user-level code, CPUID is executed directly on hardware and is not intercepted by VMware.
  • Thus, VM cannot reliably hide SSE from an application

The best that customers could do was buy compatible hardware, and keep themselves right with vendor compatibility charts such as these ones from Dell and HP.

ESX 3.5 U2 brought a new feature: Enhanced VMotion Compatibility (EVC for short) which I’ll explain…

New CPUs are coming out with a facility to ‘turn off’ (mask) features that would make them VMotion incompatible with other hosts running older (compatible) CPUs.

For Intel this is called Flex Migration. It is clear that for processors that are in different families but support Flex Migration will negotiate the common feature set amongst the CPUs.

Where it is not absolutely clear, is where you have an existing cluster and you want to add in hosts with the new Flex Migration facility. You should be able to do this if you satisfy the following requirements (paste from Basic Administration Guide):

All hosts in the cluster must either have hardware live migration support(Intel FlexMigration or AMD‐V Extended Migration) or have the CPU whose baseline feature set you intend to enable for the cluster. For specific host processors supported, see Table 15‐1.

Table 15-1. Processors Supported in EVC Clusters

Vendor Baseline Processor Processors Supported
Intel Intel Core 2 (Merom) Intel Core 2 (Merom)
45nm Core 2 (Penryn)
AMD AMD Second Generation Opteron (Rev‐E/F) AMD Second Generation Opteron (Rev‐E/F)
AMD Third Generation Opteron (Barcelona)

It is therefore advised that customers buying new tin, if they cannot acquire a processor that is exactly the same or in the same family – purchase a Flex Migration enabled CPU.

It should also be clear that only masks the features on the processors, it does not turn them off. Programs which are written to guidelines will behave, those which are coded badly will see these features regardless – and more importantly will encounter issues if VMotioned to a host that used that feature. Pasted from VMware:

EVC utilizes hardware support to modify the semantics of the CPUID instruction only. It does not disable the feature itself. For example, if an attempt to disable SSE4.1 is made by applying the appropriate masks to a CPU that has these features, this feature bit indicates SSE4.1 is not available to the guest or the application, but the feature and the SSE4.1 instructions themselves (such as PTESE and PMULLD) are still available for use. This implies applications that do not use the CPUID instruction to determine the list of supported features, but use try‐catch undefined instructions (#UD) instead, can still detect the existence of this feature.

Therefore, for EVC to be useful, application developers must adhere to recommended guidelines on feature detection. CPU vendors recommend that software programmers query CPUID prior to using special instructions and features available on their CPUs. If this guideline is followed by programmers, EVC is a reliable mechanism for live migration of x86 virtual machines across varied hardware. Thus, you can use EVC to enable an entire cluster to use the same set of basic features, allowing migration with VMotion across any two nodes in the cluster. VirtualCenter can also set up new hardware add‐ons to the cluster and apply these masks.

Intel provide a comparison tool to check beforehand if a CPU possesses Flex Migration capability.

Further Information on this subject can be located in the VMware VMotion Guide and the ESX 3.5U2 Basic Admin Guide Page 238 Onwards.

Bron: http://www.novosco.com/articles/2008/08/19/vmware-esx-and-enhanced-vmotion-compatibility/


ESX3: Scripted Install is disabled

27 August, 2008

When you click the Log In To Script Installer link, you are presented with the following error

Image

To fix this problem you will need to login as ‘root’ to the console of your ESX host and edit a file. By default the scripted installer applet is disabled - to enable it follow the process below:

1. Log in to the console using your root account

2. Using VI or NANO open the following file /usr/lib/vmware/webAccess/tomcat/apache-tomcat-5.5.17/webapps/ui/WEB-INF/struts-config.xml

3. We need to comment out and un-comment some lines. Luckily they are in the same section. You need to find the scripted install handler section.

4. I have marked in red the line of code we need to comment out and the section to un-comment in blue, in the picture below.

To comment out the line, we use the <!– to start the comment and close the comment using –>

Image

5. In the screenshot below you can see the changes we have made to the section. Save the changes and exit the editor.

Image

6. To have our changes take effect the configuration file needs to be re-read by the web server so we will need to restart the webAccess service.

Enter service vmware-webAccess restart to restart the webAccess service

Bron: xtravirt


Microsoft removes limit on virtual machines migration

27 August, 2008

In the last two years Microsoft worked to release more virtualization-friendly license agreements.
The process has been slow but the results are remarkable: unlimited virtual servers paying one Windows 2008 Datacenter Edition, unlimited virtual databases paying one SQL Server 2005 Enterprise Edition, up to unlimited virtual desktops paying a Windows Vista Enterprise Centralized Desktop license.

Now the company is taking further steps as its new hypervisor Hyper-V is out.

As anticipated last week, Microsoft has just announced that its licensing policy will change on September 1, 2008 to simplify the movement of virtual machines between physical hosts:

Microsoft is updating its software licensing terms for 41 server applications, including Microsoft SQL Server 2008 Enterprise edition, Microsoft Exchange Server 2007 Service Pack 1 Standard and Enterprise editions, Microsoft Dynamics CRM 4.0 Enterprise and Professional editions, Microsoft Office SharePoint Server 2007, and Microsoft System Center products. With the new terms, the company is waiving its previous 90-day reassignment rule, allowing customers to reassign licenses from one server to another within a server farm as frequently as needed…

The Application Licensing Mobility Brief is now available for download from the Volume Licensing Briefs page of Microsoft.com. The Licensing Microsoft Server Products in Virtual Environments brief is also available from the Volume Licensing page. Understanding the combination of the 2 briefs is required in order to make sure companies have adequate Microsoft licensing coverage for virtual environments.

Bron: vm/etc enz.


A Few SRM Discussion Points

27 August, 2008
  • Storage array replication is a necessity. Without it, SRM can’t be used. Keep in mind that only certain arrays and certain replication technologies are supported, so be sure to check the SRM compatibility list.
  • The Storage Recovery Adapter (SRA) is a critical part of an SRM deployment, but it doesn’t come from VMware. It comes from the storage vendor (assuming that it is a compatible array and compatible replication technology).
  • Two instances of VirtualCenter (VC) are required. One of these will be at the “Protected Site,” the other will be at the “Recovery Site.”
  • Likewise, two instances of SRM are needed, one at each site.
  • The VC servers and SRM servers at each site need to be able to talk with each other, i.e., they need IP-based connectivity. SRM will communicate with the local VC server over TCP ports 443 and 8095. SRM will communicate with the remote VC server over TCP port 443. The local SRM server uses the remote VC server as a proxy to communicate with the remote SRM server instead of communicating with it directly.
  • VC and SRM each require their own database.
  • If the physical hardware is sufficiently equipped, then VC and SRM can be co-located on the same server. Otherwise, VC and SRM should be placed on their own physical server.
  • SRM does not support failback. Instead, create a Recovery Plan in reverse.
  • The VC and SRM databases do not replicate between the sites. They are maintained separately.
  • Observe the “DNS Rule of Four” for SRM—forward lookup, reverse lookup, short name, and fully-qualified domain name (FQDN). All four of these should work properly.
  • All VMs in a Protection Group will fail over at the same time, so users will want to properly architect the Protection Groups to provide the appropriate DR functionality for the right VMs. Application dependencies are important here—failing over some VMs but not others that provide dependency services won’t do much good, now will it?
  • VMware SRM requires Virtual Center 2.5, and VirtualCenter 2.5 Update 1 is recommended. Update 2 is not supported.
  • Similarly, VMware ESX 3.5 Update 2 is also not supported (yet).

bron: blog.scottlowe.org


Watching your ESX server performance in real time with ESXTOP

27 August, 2008

Very few people understand the power of the VMware Console. Even fewer know the power of esxtop, a command-line real-time monitor for the vmkernel. You can get more information here.

One of the most awesome things about esxtop is that it’s minimally intensive on resources and can be run interactively, as a batch mode or as replay worlds.

However the practice of logging in and running it with root logged in on every ESX host is a little annoying and exposes anyone with basic knowledge to the Ctrl-C kill command, and then the root prompt. Which is bad.

What I do on some of my sites is similar to what VMware does on tty11 (Ctrl+Alt+F11) – the VMware ESX Service Console Welcome Screen. Essentially, I output a dynamic interactive esxtop to one of the available tty’s (tty7-12 are disabled in ESX 3.x, so you have to use 1-5, 6 is the emergency console)

Here’s what you need to do edit in the/etc/inittab file:

Edit out the mingetty tty5 terminal by making this line:

5:2345:respawn:/sbin/mingetty tty5

…look like this:

#5:2345:respawn:/sbin/mingetty tty5

Then, insert the following bolded lines after the non-bolded line which should already exist in your /etc/inittab:

6:2345:respawn:/sbin/mingetty -f /etc/issue.emergency -l /bin/login.emergency tty6

# Output ESXTOP to Console/tty5
esxtop:2345:respawn:/usr/bin/esxtop -d 2 -s > /dev/tty5 < /dev/tty5

After this, reboot your ESX server and watch console 5 (Ctrl+Alt+F5) – you will see all your vmkernel performance stats, and you can control them interactively as per the instructions for esxtop which you can find by running man esxtop in the service console. Or you can read the documentation here.

Bron: http://lraikhman.blogsite.org


Top Tips for Deploying VI

27 August, 2008

The following “top tips” highlight some issues that can arise in a VI deployment. They cover things which are sometimes hard to diagnose, or which might result in a problem weeks or months after some seemingly innocuous action. It is meant to shed some insight on “latent” issues, that is, those which don’t result in immediate warnings or errors when the root cause event occurs. These have been collected from customer experience gathered over time by the VI team, and will be posted in two parts.  We welcome your comments on these and any other “gotchas” that you might have encountered.

  1. Make sure DNS is fully configured. This includes ensuring proper, consistent configuration for all of the following: short name, fully-qualified name, forward lookup, and reverse lookup. Otherwise, you’ll see ESX hosts intermittently disconnect from VirtualCenter, and HA might not work properly.
  2. Don’t use Virtual SMP for applications which don’t need it. Most applications are single-threaded and therefore cannot benefit from more than one virtual CPU. Assigning just a single CPU to VMs maximizes the physical CPU utilization of ALL of your cores, and avoids underutilized cores. If your applications were converted from running on 2 physical servers, don’t assume they need to – they might have been running on the smallest practical server configuration available. Start with a single VCPU, and then monitor the performance to see whether increase the number of virtual CPUs actually makes a difference.
  3. Make sure you monitor the “% ready” metric. There’s one new, key metric in managing virtualization environments that is doesn’t exist in physical environments: “% ready”. “% ready” measures, for a given VM, the amount of time that a VM is able to run on the physical CPU but is unable to run because ESX doesn’t schedule it. In a well-running VMware environment, “% ready” should always be near 0.  When it climbs to non-zero, it’s indicating that your applications are not getting the CPU time that they desire. This typically points to one of many possible, real underlying issues: maybe you don’t have enough physical memory, and ESX is swapping out VM’s… Or maybe you’re simply running too many VM’s on the box… Or, maybe you’ve got the overuse of virtual SMP issue described above, and other VM’s are getting starved.
  4. Watch your snapshot space growth. Because snapshots live on your disk and grow over time, you want to be careful that you have enough spare capacity on your disk. Every snapshot consists of a “REDO” file; for the most recent snapshot, all new disk writes associated with the VM are recorded to this file. A REDO file has the potential in the extreme to grow to be the size of the original disk, and the REDO file of every snapshot that you maintain continues to occupy disk space. You want to make sure that you have enough “headroom” on your datastore to handle such growth over time.  Operations that might dramatically increase the size of your snapshots include the following: an OS service pack update, application reinstall, or a disk defrag inside the VM.
  5. Make sure the SQL Server Agent is up and running on the VirtualCenter DB. VirtualCenter depends on Microsoft SQL Server Agent to perform stats rollups. However, VirtualCenter does not have the ability to ensure this service is running on the DB server. If the user has it disabled, or the service is shut down at some point, the VI Client will not show expected stats (weekly, monthly…).  In addition, since daily data is not rolled up, it accumulates in the database, thus degrading performance and consuming more and more space.
  6. Team your management NICs if using VMware High Availability (VMware HA). This will help you avoid false alarms (i.e. false VMware HA failovers of VM’s) in situations when you temporarily lose connectivity between your ESX hosts (e.g. when there’s a momentary network outage, or even during a network switch maintenance operation).

1. If you have an active/passive FC storage array (most mid-range arrays fall into this bucket), be careful about setup. Firstly, be sure to have redundant paths from FC switches to your arrays’ storage processors. Secondly, be sure to use “MRU” (the default) for the path-selection policy and not “fixed”.

The best way to explain the first issue is with a picture.  What’s wrong with the following configuration?

Vitips21

Although you might believe that you have full redundancy between the hosts and the switches, and specifically that you can survive one HBA failure on each host, the reality is that you don’t have enough redundancy.  Here’s one failure scenario that won’t be handled properly:

Vitips22

The reason is that, with active/passive storage arrays, a given LUN can only be presented on one storage processor at a given time.   The LUN can shift from one storage processor to another, but such a shift takes many seconds (potentially up to 30 seconds).   If both HBA’s have failed (as in the above diagram), then the ESX hosts won’t be able to access to the same LUN at the same time.  Host 1 attempts to access the LUN on storage processor 1; host 2 attempts to access the same LUN on storage processor 2; and you end up with a ping-pong effect, or a “path thrashing” effect due to the active/passive array shifting the LUN back and forth between the two storage processors.  Performance of VM’s on both hosts will be erratic and penalized.

The solution is simple: create redundant connections from the FC switches to the array storage processors, as shown below.

Vitips23

There is a second noteworthy issue with active/passive arrays related to this same path thrashing effect: make sure that you use the “MRU” path selection policy (the default) rather than the “fixed” path selection policy.  If you use “fixed”, you may make the mistake of forcing the use of a particular storage processor for one host… but a different storage processor for another host… and thus end-up in a similar LUN ping-pong or path thrashing situation.

For more details about path thrashing see, the SAN Configuration Guide.

2. When configuring your VI environment for VMotion, make sure that your physical network switches are configured properly; in particular, make sure that each port has the right network (e.g. VLAN) visibility.

VMotion requires that the destination ESX host have similar network connectivity to the source ESX host (so that, for example, the VM can continue access to its assigned VLAN after the VMotion).  VirtualCenter checks for correct virtual switch configuration on the source and destination ESX; however, VirtualCenter does not for correct configuration of the physical network switches.  In a larger VI deployment where many network switch ports are involved, a single misconfiguration of a single physical switch port can be hard to detect.  The symptom will be as follows: when the particular VM relying on a particular VLAN id VMotion migrates to the particular ESX host with the misconfigured switch port, the VM loses all network connectivity.   Solution: when adding new ESX hosts to a network, take the time to double-check your network switch port configurations to make absolutely sure that all the VLANs are correctly configured.

3. When using VMware HA, take note of how memory reservations are specified and used to reserve cluster failover capacity.  Using more consistent reservations or disabling admission control are both appropriate workarounds if the calculations are overly conservative in your environment.

How VMware HA works: If a VMware ESX host fails, VMware HA will restart the VMs affected by that failure on alternate hosts in the cluster.  In order to do so, HA must reserve failover capacity within the cluster.  HA currently achieves this by implementing an “admission control” policy that prevents (or warns against) the powering on of VMs that would encroach upon the failover capacity being reserved.  In some cases, however, the admission control calculations may be too conservative.

Example scenario: Suppose you have 19 VMs, each with a 300 MB memory reservation.  To power-on all of these VM’s, you need 5.7GB of RAM (=19*0.3) (total within the cluster, after allocating space for potential host failures, and not accounting for memory sharing in ESX).  Since all reservations are equivalent, HA defines an average VM to require 300 MB of memory.

Now, let’s suppose you power-on a 20th VM with a 2 GB memory reservation.  Instead of calculating memory requirements as 7.7 GB (=19 x 0.3 + 1 x 2), HA takes a more conservative approach and redefines the average VM to be the biggest reservation observed.   With the higher reservation specified, HA will cautiously assume that every VM need 2 GB of memory, and will ask for 40GB (=20*2) of RAM to be set aside for total runtime and failover capacity within the cluster.  These calculations are intended to be conservative to ensure that sufficient spare capacity is available, without fragmentation across hosts within a cluster.

In many cases (such as clusters with widely varying sizes of hosts and VMs), however, these calculations can be more conservative than desirable, and can lead to “insufficient failover capacity” warnings when powering on more VMs.

Two potential approaches are recommended if you are observing these warnings, or want to avoid them within a heterogeneous cluster configuration:

Approach 1: Either lower the reservations on your most demanding VM’s, or remove the reservations skewing the calculations and rely upon “shares” instead.  See the resource management guide for differences between reservations and shares.

Approach 2:  Alternatively, configure HA to disable strict admission control.  Host failures will still be detected and acted upon, but VMware HA will not prevent the starting of new VMs due to insufficient failover capacity.

4. When sizing your LUNs, a medium-sized LUN (~500GB) seems best for most situations.

Small LUN’s (and VMFS volumes) can result in SAN management complexity (too many LUNs to manage).  Very large LUN’s can result in performance issues (due to VMFS lock-contention for certain operations), too coarse a granularity for troubleshooting and performance tuning, and failure/error isolation.  The below chart summarizes some of the considerations.  Details are provided on page 72 of the VI 3 SAN Design Guide.

Smaller LUN’s
100GB
Medium-sized LUN’s
500GB
Larger LUN’s
3TB
VMFS: Metadata overhead Some overhead (0.5%) Negligible overhead (<0.1%) Negligible overhead (<0.1%)
VMFS: Lock-contention during VM creation operations, or during VCB-based backup operations (*) Near zero contention Some contention Much contention
Impact of a failure or error, difficulty of troubleshooting Affects a few VM’s Affects 20-30 VM’s Affects many VM’s
Ease of SAN mgmt Hard (many LUN’s to manage) Medium Easy (just 1 LUN to manage)
Ease of tuning performance (**) High (tunable per the few VM’s on a LUN) Medium (tunable for 20-30 VM’s at a time) Low (one setting for many, many VM’s)
Flexibility in specifying value-added services  (***) High (different LUNs can have different policies or settings) Medium (tunable for 20-30 VM’s at a time) Low (many VMs share the same policies or settings)

(*) File creation in VMFS grabs a SCSI lock on the LUN.  Since each LUN has a limited number of SCSI locks, excessive concurrent file creation in VMFS can cause lock contention, which can hurt performance.  This can be apparent if multiple users are concurrently creating VM’s (and therefore VMFS files), or when a VCB-based backup process is concurrently backing up multiple VM’s (and is therefore concurrently creating multiple VMFS REDO files)
(**) e.g. RAID-level, array caches, queue depths, path selection/path dedication
(***) e.g. Backup, other data protection features such as replication, mirroring, etc., capacity optimization features such as de-dupe, thin-provisioning, etc., security and encryption features

Bron: http://blogs.vmware.com


Hyper-V for the ESX Engineer

27 August, 2008

Aaron Delp over at BladeVault.info recently published a good article on Hyper-V for the ESX Engineer.

Read it below.

I just attended a great session on Microsoft Hyper-V.  Before I go into my notes, let me give you my background to better frame this post.  I used to be an MCSE (NT4!) but I really haven’t touched Microsoft products in a number of years.  My focus has been on hardware architecture and eventually this has led me into the virtual architecture as it has gained acceptance into the market place.  If some of my highlights seem a little different than most posts out there, it is because I am making the ESX to Hyper-V mapping in my head.  I know ESX, I don’t know Windows Server 2008 (or 2003 for that matter).

With that out of the way, here are my points of interest in no particular order.

  • Hyper-V is paravirtualized – paravirtualized means the virtual machine is “aware” (Microsoft uses the term enlightened) that it is virtualized.  If the machine isn’t enlightened, it will run in emulation mode.  Emulation mode requires a lot of context switching between user mode and kernel mode.  This will understandably slow down performance.
  • The Hyper-V “Service Console” is referred to as the Management Partition.  This is a Windows VM with privileges into the kernel that other VMs do not have.  This (at least on the surface) is similar to ESX’s Service Console.
  • It is recommended to run Hyper-V on Windows Core (stripped down version with no GUI).  The core version will consume less resources, require less patches, etc.
  • Server 2008 has “roles” that determine the functions on the server.  Hyper-V is recommended to be the only role on the server for production
  • Hyper-V does not share memory pages
  • Hyper-V has quick migration instead of VMotion.  Instead of a live migration, the machine is suspend and resumed on another host.  The amount of memory will have a direct impact on the amount of time required because the memory contents will written to the disk and then read from the disk on the new host.
  • Hyper-V relies on Microsoft Clustering Services right now to provide multiple host functionality for SAN connected virtual machines.  This means that Enterprise Edition is the minimum required OS level for the host to perform Quick Migrations
  • It is recommended that each LUN contain only one VM.  Space needed will be disk space required + virtual RAM assigned to the machine (for quick migrations) + room for snapshots of the virtual machine
  • Live Backups of a VM are supported through VSS if the guest OS is VSS aware
  • Virtual Hard Disk files are .vhd files instead .vmdk files for ESX
  • Raw Device Mapping (RDM) in ESX is called Pass Through Disks in Hyper-V

At the end of the session we briefly covered the Microsoft Enterprise Management Product (think Virtual Center).  It is part of Microsoft System Center and is called SCVMM (System Center Virtual Machine Manager).  Here are some points for this product.

  • Since Distributed Resource Scheduling doesn’t exist today for Hyper-V, they support the idea of Intelligent Placement of a VM onto the farm.  This data is configurable but the SCVMM basically tracks performance of the hosts over a recent time period in an attempt to recommend the best placement of the new virtual machine on a host.
  • The entire product is driven by Windows Power Shell and is completely customizable, exportable, etc.
  • Upcoming version of the product will support ESX and well as Hyper-V.  In order to support ESX, an existing Virtual Center will be required for SCVMM to interface.  (Think single pane of glass for management).  I have my doubts on this one but I’m curious.
  • Self Service Portal – End Users will be able to provision their own machines.  Again, I’d have to see this one.

bron: http://www.bladevault.info


Disabling the Windows Logon Screen Saver

27 August, 2008

Why

  • Screen savers are not necessary for virtual machines
  • Running screen savers wastes CPU resources
  • There is no interface option to disable the screen saver on the log on screen in Windows

To disable Windows Logon Screen Saver:

1. Click Start > Run, type regedit, click OK.
2. Locate the following registry key:

HKEY_USERS\.DEFAULT\Control Panel\Desktop

3. Double-click the ScreenSaveActive string value item in the Details pane.
4. In the Value data box, replace the number 1 with the number 0, and then click OK.


File Level Recovery from within a VMDK backup

27 August, 2008

One of the frequently asked question when implementing VMware on NFS is how would you implement file recovery from within a VMDK backup and what tools are available to accomplish this?

Implementing array based snapshots to backup entire datastores and their contents is a simple and a well documented process, however, often times customers have the need to recover specific files from within VMDKs.

Depending on the Datastore type used (VMFS vs NFS) the process and the administrative steps required as well as the associated costs vary greatly.

With VMFS you can could treat the Virtual Machines as Physical servers and deploy backup agents inside each VM and have file level backup and restore granularity. All that at the expense of typically higher CPU and Memory consumption, multiple backup schedules and in general higher acquisition and operational costs.

Another approach would be to use a combination of Vmware’s Consolidated Backup (VCB) and Backup software and do file level backups and restores.

How about NFS?

The backup process using NFS is very simple. Because we control the filesystem we know what’s in there and we can recover specific files (.vmdk, .vmx) or any file that’s in a VM directory.

However, what is the process to provide further granularity and be able to restore a specific file from within a VMDK backup in an NFS implementation without using backup software agents or proxies?

There are several options to accomplish this however, today I’ll talk about a couple of them. Both require a CIFS share to be created onto the snapshot directory of the NFS volume (i.e /vol/vmdata/.snapshot).

In both cases you will be accessing the snapshot directory from the Virtual Machine that requires the needed file by specifying the UNC path. This process works for Windows VMs and requires VMDKs with a single partition.

Option 1

This option was recently discovered and further developed (Registry entries and Batch script) by one of the NetApp SE’s (Mike Arndt) and it’s very effective and free for those customers that already have a CIFS license with their NetApp arrays, which is a very large percentage. The other important factor is that Mike has made it a point-and-click process. Great job Mike!!!

As part of their VMware Disk Developer’s Kit, VMware provides a vmware-mount.exe utility that allows for mounting an existing VMDK on a Windows Driver letter. We’ll be using this utility as well to mount the VMDK as well as some Registry Entries and a Batch Script to further simplify the file recovery process.

Step 1: Download and install the kit from the above link

Step 2: Registry Entries

The following registry entries can be added by putting them in a file with a .reg extension and double-clicking on the file. The entries will provide you with a “VMDK Mount” and “VMDK UnMount” option when you right click in the Windows Explorer interface.

REGEDIT4
; The following registry keys will put right click shortcuts in place for VMDKMounter.


[HKEY_CLASSES_ROOT\.vmdk]

@="VMware.VirtualDisk"

[HKEY_CLASSES_ROOT\.vmdk\VMware.VirtualDisk\ShellNew]

@="" 

[HKEY_CLASSES_ROOT\VMware.VirtualDisk\Shell\vmdkmounter]

@="VMDK Mount" 

[HKEY_CLASSES_ROOT\VMware.VirtualDisk\Shell\vmdkmounter\command]

@="cmd.exe /c "c:\\Program Files\\NetApp\\VMDKMounter\\vmdkmounter.bat" mount %1"

[HKEY_CLASSES_ROOT\Drive\shell\vmdkmounter]

@="VMDK UnMount"

[HKEY_CLASSES_ROOT\Drive\shell\vmdkmounter\command]

@="cmd.exe /c "c:\\Program Files\\NetApp\\VMDKMounter\\vmdkmounter.bat" unmount %1"

Step 3: Batch Script

The following batch script needs to be placed in C:\Program Files\NetApp\VMDKMounter in order for the previously mentioned registry entries to work properly.

Note: The Lines marked in red should be one line.

@ECHO OFF
SET vmware_mount_cmd_path="C:\\Program Files\\VMware\\
VMware Virtual Disk Development Kit\\bin\\vmware-mount.exe"
IF EXIST %vmware_mount_cmd_path% GOTO CONTINUE
ECHO The vmware-mount utility is not installed.  Exiting.
GOTO EXIT0
:CONTINUE
IF "%1"=="mount" GOTO GETDRIVE
set drive_letter=%2
ECHO Unmounting VMDK on drive %2 ...
%vmware_mount_cmd_path% %drive_letter:~0,2% /d /f
GOTO EXIT0
:GETDRIVE
SET /P drive_letter="Enter Drive Letter [Z:] "
IF NOT "%drive_letter%"=="" GOTO CHECKDRIVE
SET drive_letter=Z:
:CHECKDRIVE
IF NOT EXIST %drive_letter% GOTO DOMOUNT
ECHO Drive %drive_letter% appears to already be in use!  Exiting.
GOTO EXIT0
 :D OMOUNT
ECHO Mounting VMDK on drive %2 ...
%vmware_mount_cmd_path% %drive_letter% %2 /m:n
explorer %drive_letter%
:EXIT0
@ping 127.0.0.1 -n 5 -w 1000 > nul

File Recovery Process 
Step 1: Use the UNC path to access the snapshot directory (Figure 1)
Step 2: Pick the snapshot you want and drill down and into the VM folder
Step 3: Select the *.vmdk (not the -flat.vmdk), right click the "VMDK Mount" 
Step 3: Drag and Drop the file and use"VMDK UnMount" option when done.

 

PuTTY Connection Manager

10 July, 2008

PuTTY Connection Manager is a free PuTTY Client Add-on for Windows platforms which goal is to provide a solution for managing multiple PuTTY instances. This is one of the most important missing feature of PuTTY.