TechOnTip Weblog

Run book for Technocrats

Archive for May, 2011

Openfiler as a FC SAN

Posted by Brajesh Panda on May 26, 2011

Brian did a good job on this; find his documentation in his blog

I will give a try when I will get a chance for sure!


Posted in IP-SAN, Storage | Tagged: | Leave a Comment »

Application Clustering – Config Build

Posted by Brajesh Panda on May 15, 2011

Before we start building any cluster we may like to use a cheat sheet which will help us to capture all inputs required to build an application cluster.

This list is for reference purpose. You can enhance this list as per your requirement. You can download this sheet from here.

Posted in MsClustering, MsFailOverClustering | Tagged: , | Leave a Comment »

How to KILL a Hyper-v Virtual Machine?

Posted by Brajesh Panda on May 13, 2011

All virtual machines usually run as a process instance under process “vmwp.exe”. So to kill any specific virtual machine we need to find the Process ID or Virtual Machine GUID f. Then you can use Windows Task Manager /Powershell/Commadline to kill the same

I have already mentioned how to find process id or virtual machine GUID in another post. Here it is! Now let’s go ahead kill this bumpy virtual machine. As soon as you kill the virtual machine vmwp.exe will restart the same. So if you want to turn it off use turn off parameters too.

Killing Virtual Machine Using Powershell

You can save below 3 lines in a ps1 (Powershell file) & utilize the same directly.

$VMName = read-host -Prompt “Enter Virtual Machine Name”

$kill = (gwmi -q “SELECT * FROM Msvm_ComputerSystem WHERE ElementName = ‘$VMname'” -n root\virtualization).ProcessID

Stop-Process -id $kill –F

Killing Virtual Machine Using Windows Task Manager

After you found the VM GUIDs, open up Windows Task Manager, Go to Performance Tab, Click on View Menu, Click Select Columns & make sure you select PID & Command Line.

Now from Command Line Colum find out the VMWP.exe process which is referring to the above GUID. And you can kill the process afterwards. Refer to the below screenshot

Posted in MsHyper-V | Tagged: , | 4 Comments »

Hyper-V Virtual Machine Process ID & GUID

Posted by Brajesh Panda on May 12, 2011

You can find the server GUID from the VM config XML file. Usually the XML file is named as the VM Name. And you will find the config file in the Virtual Machine folder. But if you have not changed the default path for the virtual machine config folder in Hyper-V Management console you will end up having all XML config files in the same folder. Then it will be difficult to find out which file is pointing to which server.

Here are some easy methods to find out all virtual machines, their operational state, and their process ID & GUID. All these information are usually stored in WMI namespace root\virtualization & class msvm_computersystem. So we are going to query the WMI namespace & retrieve all these info. Screenshots were taken on different times after multiple time of kill operation, so process ID may be different in each screen shot ;-(

Using Powershell

Get-WmiObject -Namespace root\virtualization -class msvm_computersystem | select elementname, operationalstatus, processid, name| ft -auto

Here is another method; you can query for a specific virtual machine too.

(gwmi -q “SELECT * FROM Msvm_ComputerSystem WHERE ElementName = ‘brajesh'” -n root\virtualization).ProcessID

Where “brajesh” is the Virtual Machine Name displayed in the Hyper-v console.

Using VB Script

Here is the WMI script created by Michael which retrieves the VM GUID, BIOS GUID. Save this script as a VBS file & run it as “cscript <filename>”


Option Explicit
Dim WMIService
Dim KvpComponents
Dim VMList
Dim VMSettingList
Dim VM
Dim item
Dim setting
Dim component

‘Get instance of ‘virtualization’ WMI service on the local computer
Set WMIService = GetObject(“winmgmts:\\.\root\virtualization”)
‘Get all the MSVM_ComputerSystem object
Set VMList = WMIService.ExecQuery(“SELECT * FROM Msvm_ComputerSystem”)
For Each VM In VMList
if VM.Caption = “Virtual Machine” then
WScript.Echo “========================================”
WScript.Echo “VM Name: ” & VM.ElementName
WScript.Echo “VM GUID: ” & VM.Name
WScript.Echo “VM State: ” & VM.EnabledState

  ‘ Now get the BIOS GUID for this VM
Set VMSettingList = WMIService.ExecQuery(“SELECT * FROM Msvm_VirtualSystemSettingData”)
For Each setting In VMSettingList
Dim tempVMname
tempVMName = “Microsoft:”  + VM.Name
if setting.InstanceID = tempVMName then
WScript.Echo “VM BIOS GUID: ” & setting.BIOSGUID
end if
end if

Using this script I found my VM as “D756AC93-6711-4854-A6CE-E42B4978A505”

Posted in MsHyper-V | Tagged: , , | 1 Comment »

Windows 2008 R2 SP1 – Dynamic Memory

Posted by Brajesh Panda on May 9, 2011

Microsoft Official Article:

  1. System Requirements
    1. Install Windows 2008 R2 Service Pack 1 on Hyper-V Server – Reboot
    2. Install Service Pack 1 & new SP1 version Integration pack on Windows 2008 R2 & Windows 7 Virtual Machines – Reboot
    3. Install Security Hot fix KB2230887 & New SP1 version Integration pack on Windows 2008 SP2 Virtual machines – Reboot
    4. Upgrade (Install) Hyper-v Integration Software on Windows 2003 virtual machines – Reboot
    5. Shutdown Virtual Machine & Configure Dynamic Memory i.e. Startup RAM & Maximum RAM for the Virtual Machine.

Dynamic Memory Config

  1. Right Click virtual machine, go to settings, click on Memory; you will able to see Dynamic Memory details i.e.

Startup RAM: How much memory required for this virtual machine to boot up?

Maximum RAM: What is the maximum memory this virtual machine should scale up to in case demanded?

Memory Buffer: What is the % of physical memory on the top of the CURRENT Memory Demand this hyper-v should reserve for this VM? It can be defined between 5-2000%.

Memory Weight: Define priority of virtual machine to get their share of memory in-competition with other virtual machines When there is less physical memory available in the server for operation.

Dynamic Memory Usage Monitoring

  1. You will able to see 3 new Information tabs in the Hyper-V GUI;

    Assigned Memory:    How much memory has been assigned to this virtual machine?
    Memory Demand:    How much memory this machine needs to perform correctly; as per running workload!
    Memory Status:    It represents the memory assigned status; When VM is configured with Dynamic Memory & running; it presents three statuses i.e. OK, Warning, Low.

Assigned Memory = Memory Demand + (Memory Demand x Memory Buffer/100)

As per above formula if VM is assigned all of memory demand & memory buffer, Memory Status reports as OK.

As per above formula if VM is assigned all of memory demand & part of memory buffer, Memory Status reports as Low.

As per above formula if VM is assigned part of memory demand, Memory Status reports as Warning. This is the time when virtual machines will be experiencing performance issue. Because due to lack of physical memory it will start paging to it’s hard drive.

Here is an example;

Below VM’s Memory Demand is 2079 & Memory buffer is 5%. So theoretically Hyper-v should assign 2182.95MB (2079+(2079×5/100)) of memory. And we can see Hyper-v assigned the same to the VM.

Now to simulate more memory demand, I have elevated the buffer value to 2000%. It mean’s Hyper-v should allocate 41580MB memory. But as per available physical memory in hyper-v server, it pulled out 9000MB to assign the VM.

But assigned value is still below than the demand, so memory status went to Low.

If you want to simulate Warning, you can elevate all virtual machines maximum memory to 65536, it will allow all virtual machines to grab as much as memory available from the server, if usage of all virtual machines are high you will observe the same.

Or you may like to reserve a high amount of memory for the Hyper-v host using memory reserve concept (discussed below), so less physical memory will be available for virtual machines & they will report warning.

  1. If you like to see what is the current memory demand or how much assigned or how much committed etc. Never
    use traditional Windows TASK MANAGER inside the Virtual machine. Only refer to hyper-v GUI.

    Here is a screenshot which may clear your doubt; In Hyper-V Gui it is reporting Memory Demand is 2130MB & Assigned Memory is 2219MB. However Task manager is reporting 12945MB.

    Actually this 12945MB is the maximum amount of memory assigned to this VM till when it is started. Dynamic Memory driver inside the VM never release/update the same value for task manager.

  1. Here are some new performance counters for Dynamic Memory in the hyper-v server to track server/virtual machine usage!

  1. Memory Reserve is a new registry key has been released with Service Pack 1 to reserve certain amount of memory for the hyper-v host itself. Sometime people end up using all available physical memory in the server for Dynamic Memory, leaving no memory for the parent domain host i.e. hyper-v host itself. And management work from this partition face issues due slow response. In this case you may like to reserve certain amount of memory for the host itself. You have to create a REG_DWORD value & reboot the server for its effectiveness

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Virtualization

    RED_DWORD value

    Name = MemoryReserve

    Define the value in Decimal, reserve will be in MB.

Posted in MsHyper-V | Tagged: , , , , | 1 Comment »

Cluster Validation Error: An error occurred while executing the test. There was an error initializing the network tests. There was an error creating the server side agent (CPrepSrv). Creating an instance of the COM component with CLSID {E1568352-586D-43E

Posted by Brajesh Panda on May 8, 2011

While building failover cluster under one of my friend faced bellow error during validation phase.

An error occurred while executing the test. There was an error initializing the network tests. There was an error creating the server side agent (CPrepSrv). Creating an instance of the COM component with CLSID {E1568352-586D-43E4-933F-8E6DC4DE317A} from the IClassFactory failed due to the following error: 80070005

After some investigation & research on we found this error is applied to Windows 2008 Domain based networks.


è Log On to Windows 2008 Domain Controller

è Open DCOMCONFG from start – run

è Expand Component Services -> Computer

è Right Click My Computer -> Select Default Properties Tab

è Under Impersonation Level Default Impersonate & Click Apply

è Reboot Domain Controller & Try Validation Again

Posted in MsClustering, MsFailOverClustering | Tagged: , | 2 Comments »

An Error has occurred. Try this action again. If the problem continues, check the Microosft Dynamics CRM Community for solutions or contact your Microsoft Dynamics administrator. Finally, you can contact Microsoft Support.

Posted by Brajesh Panda on May 4, 2011

“An Error has occurred. Try this action again. If the problem continues, check the Microosft Dynamics CRM Community for solutions or contact your Microsoft Dynamics administrator. Finally, you can contact Microsoft Support.”

Microsoft CRM 4.0 Internet Facing Deployment Mobile Express Instance shows below error after logging to application http://IFD_URL/m

I have no clue ;-). Here are my lazy steps!

  1. 1st try to re-publish all of the entities you have planned for Mobile Express
  1. Open CRM 4.0 URL – > Settings -> Mobile Express -> Add required entities to right side -> Publish

2nd Uninstall the ME Patch & re-install it.

Posted in MS CRM 4.0 | Tagged: | Leave a Comment »

Microsoft iSCSI Target Cluster – Building Walkthrough

Posted by Brajesh Panda on May 3, 2011

In one of my last post I have discussed about Microsoft iSCSI Target Software 3.3. You can use this software to convert your (old) servers especially where you can populate a bunch of high capacity SATA/SAS HDD to convert the same to an IP SAN. Well this kind of scenario may be applicable for LAB/SMB business units where we don’t want to buy/spend lots of money for a specialized storage box. Well these days a lot of low cost SAS based DAS or IP-SANs are available in market with specialized storage features. So for usability you have to decide where you can use this kind of setup. Lets build a highly available storage, kind of active passive iscsi storage controllers ;-). Hope you are not getting confused with Building a MS Failover Cluser using MS iSCSI Target Software.

My Design Decisions & Blueprint

In my environment I used to have a Dell MD3000 SAS based direct storage box. I can connect 4 Servers directly without any path redundancy to this storage box & 2 Servers with 2-redundant path. But I have bunch of old (10) Dell Poweredge servers in my lab (generated out of dc consolidation project), I would like to repurpose them in my LAB & for some low priority low production purpose in my headquarter. Well none of my servers or devices is having warranty any longer. Renewing warranty or buying new hardware is out of budget. So I thought let’s do it this way…..

  • Apart from 1st 2 HDD I have pulled out all HDDs from Dell PE Servers & Populated remaining empty slots of MD 3000i. And made sure these HDDs are compatible with the storage box. Easy way of doing is install MD 3000 storage manager software & verify from the console software. I have discussed the installation & MD 3000 config step in one of my old post. It is here.
  • On server front I have decided
    • Two Node Windows Failover cluster with complete redundant path
    • I will utilize this cluster for Two Roles
      • Hyper-V Failover Cluster Role;
        With one Clustered Shared Volume to Host Less Critical LOB Application Virtual Machine
      • Ms iSCSI Target Cluster Role;
        with multiple clustered LUNs to Host virtual disks. These virtual disks will be presented to other Stand Alone Poweredge Servers through iSCSI Target using iSCSI technique. After wards I can use the same disk to host multiple virtual machines or I can use the same disk as a pass-through disk to your existing VMs. I prefer them to use as pass-through disks. . If I could use these Disks to host multiple Virtual Machine VHDs, there must be a lot of virtual translations i.e. VHDs inside -> VHDs inside -> NTFS partition.

Note: In next version of iSCSI Target I would like to see direct use of physical disk not VHDs inside NTFS partition. I could have also used those 8 Stand Alone Poweredge Servers to again create a hyper-v cluster using exported iSCSI volumes. But I never thought of that as a requirement because I will be using them in my test lab. Even if one server fails I will re-assign iSCSI exported virtual disk (LUN) to another node & start VMs over there. We can design all components in a better way to provide more performance like one VHD in one LUN, redundant network connections etc.

  • So to start with I have carved out 3 LUNs from the MD3000 & assigned to Node1 & Node2
    • Quorum LUN:         1GB
    • CSV LUN:        550GB
    • iSCSI Target LUN:    550GB
  • Network Design is one of the key components to achieve this; so I have decided on below NICs for Failover Cluster Nodes. I am flexible because it is a LAB & low priority production env.
    • Management & Virtual Machine Network: 1 NIC/node with X.X.X.X subnet
    • Cluster Communication & Live Migration Network: 1 NIC/node with Y.Y.Y.Y subnet
    • iSCSI Target Network: 1 NIC/node with Z.Z.Z.Z subnet (this is the adapter through which iSCSI Traffic will be coming in from Standalone LAB Hyper-v Server’s iSCSI initiators)

Read the rest of this entry »

Posted in Clustering, DELL MD3000i, Hyper-V, IP-SAN, WindowsStorageServer2008 | Tagged: , , | 6 Comments »

Failed to setup initiator portal. Error status is given in the dump data.

Posted by Brajesh Panda on May 2, 2011

This error came in most of the IP SAN storage boxes. As per Microsoft’s KB it is a connectivity error. I mean you have defined some wrong/duplicate iSCSI SAN target in your iSCSI Initiator’s discovery portal/favorite targets section, which can’t be connected.

In my case I used have a Equal Logic PS series SAN. As per requirement I used install Dell Equal logic Host Integration Tool Kit software in all of my iSCSI imitator machines. It installs its own MPIO software on the top of MS MPIO driver & manage connection & it really do in a good way. Whenever we add a new target it create an entry under its favorite target section. I have installed-then uninstalled- then installed, so it created a couple of fake target entries in the favorite target section for the same target. After the 1st connection being initiated, iSCSI initiator can’t login to those fake targets. So this error was coming. I just remove them & it worked for me.

Log Name: System
Source: iScsiPrt
Event ID: 5
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Description: Failed to setup initiator portal. Error status is given in the dump data.

Posted in IP-SAN | 2 Comments »

%d bloggers like this: