Contact & Subscribe RSS

LinkedIn
RSS

Run SCOM Discovery task manually

Sometimes it takes up to 24 hours to discover a new component or new installed role. If there is no time to wait 24 hours to complete this discovery you can do this manually.
There is a nice task in the SCOM console to get this discovery started.

First search the Discovery ID and Instance ID. This can be done with some PowerShell one-liners:

Then search the “Trigger On Demand Discovery” button in your SCOM Console.
Is placed under the folder -> Operations Manager -> Agent Details -> Agent Health State -> Select Object -> Task plane (scroll down) -> Trigger on demand discovery

Then Override the task parameters with your id found in the steps above:
Override Task Parameters SCOM

Get duplicate MAC Address PowerShell VMM

Duplicate mac addresses can result in strange situations in your environment, losing connections etc.
This is a simple script to filter all the duplicate mac addresses.

Set VM Cloud and User Role with VMM PowerShell

When you install Azure Pack you need to add a cloud and userole on each VM.
Manually this is a boring click job..

PowerShell makes this a lot easier, first change the cloud and then the user role:

 

Error: VMM Host not responding

First of all check if your VMM SA Account is member of the local administrators group on each Hyper-v node.
Then open the VMM Console and right-click on the host that’s experiencing issues and chose properties -> status.

– Network: Some network issues, most cases VMM can’t reach the VMM agent. Check DNS, Ports and ping.

Ports used by VMM Agent:
Hyper-V Host (VMM agent) Ports: 80/135/139/445        WinRM/RPC/NetBIOS/SMB (TCP)
Hyper-V Host (File transfer) Port: 443 or 80                     HTTPS/HTTP Using Bits
Hyper-V Host (Control channel) Ports: 5985/5986          WS-Management

– WinRm: Check if WinRm is working on the Hyper-v node:

Configure the WinRm service to run in a separate Svchost.exe process. You can check this with Process explorer from Sysinternals witch can be download from here.

If WinRm is not running in a separate svchost process.
Open an elevated command prompt:

You get this output if the command was succesful:
[SC] ChangeServiceConfig SUCCESS

And increase the limits of WinRm:

Try a refresh in VMM..

– Host agent service: Restart the VMM Agent on the host with this PowerShell command:

– Host agent version: Update the VMM Agent version if it is older than the VMM Console.
– WMI Performance Counter: If you have some WMI related issues you can restart the SCOM Agent try to clear the SCOM Health cache..

 

If WMI Still corrupted you can try to performs a consistency check on the WMI repository, and if an inconsistency is detected, rebuilds the repository, with this command:

When this fails you can try a full reset of the WMI Repository with this command:

 

If the Winrm commands fails, look if the winRM working correctly with this command:

With a working config the output looks like this:

Listener [Source=”GPO”]
Address = *
Transport = HTTP
Port = 5985
Hostname
Enabled = true
URLPrefix = wsman
CertificateThumbprint
ListeningOn = THE IPADRESSES

With a bad config try a new quick config of WinRm:

 

Error: Failed to determine SCVMM Server version. The credentials provided have insufficient privileges on NO_PARAM.

VEEAM communicates with the VMM Console to get the Hyper-v topology and other VM information. After installing UR6 on our VMM Management servers VEEEAM could not enumerate the VM information from VMM.

The jobs fails with the following error: Task failed. Failed to expand object. Error: Failed to determine SCVMM Server version: You cannot contact the VMM management server. The credentials provided have insufficient privileges on NO_PARAM. You cannot contact the VMM management server. The credentials provided have insufficient privileges on. Ensure that your account has access to the VMM management server, and then try the operation again.

In our case we solve this with the following steps:

– Download / install all available Windows Updates.
– Upgrade the VMM Console on your VEEAM management server to the same version as your VMM management server.
– Create a new SA account with the same rights and VMM Rights as the old account.
– Change SA account in VEEAM Console (Backup Infrastructure -> Right click on your VMM Server -> Properties -> Credentials -> Change -> Finish.

The weird thing is, AFTER changing the SA account with the same rights etc the stuff worked again -_-‘
If someone can explain this don’t hesitate to comment 🙂

Error: Could not load file or assembly ‘EMC.WinApps.Fx.Adapter.HostSystem.WindowsHostSystem.VdsUtils

You get this error when you deselect some features in the ESI Setup:
System.IO.FileNotFoundException: Could not load file or assembly ‘EMC.WinApps.Fx.Adapter.HostSystem.WindowsHostSystem.VdsUtils

Check if the EMC.WinApps.Fx.Adapter.HostSystem.WindowsHostSystem.VdsUtils.dll file exsist in your EMC ESI Program directory, like this:

ESI_FXAdapters

If not, uninstall ESI and Reinstall it with all the default enabled features, or install on a sandbox and copy the .dll to the directory above.

Delete VM From VMM Database

Firtst, try to remove the VM with the VMM Powershell module:

If this was not succesvol you can try this:
This is a sweaty hand job, but in most cases succesful..

On your VMM Management server, stop VMM Management service and VMM Agent.
Login to your SQL Management Studio and start a Query against your VirtualManagerDB.
First search for the ID, the Spooky VM have:

After you get the ID, past this ID in the following 3 sections of code in the GUID section:

 

MSMQ errors in ClusterLog

What is MSMQ:

You can use MSMQ for Application communication across heterogeneous networks and systems that may be temporarily offline. Applications send messages to queues and read messages from queues. A queue is a temporary storage location from which messages can be sent and received reliably, as and when conditions permit. This enables communication across networks and between computers, running Windows, which may not always be connected.

When MSMQ is not enabled or not configured you get a lots of errors in your Windows Cluster log.
In our Hyper-v cluster we don’t need MSMQ.

Errors we faced:

ERR   [RHS] s_RhsRpcCreateResType: (21)’ because of ‘Startup routine for ResType MSMQTriggers returned 21.’
INFO  [RCM] result of first load attempt for type MSMQTriggers: 21
WARN  [RCM] Failed to load restype ‘MSMQTriggers’: error 21.

If you don’t use MSMQ you can disable it with the following PowerShell commands:

 

Start VEEAM Job Task Scheduler

The VEEAM job scheduler is really basic. It’s not possible to schedule a job on different times in a week for example.
You can create a task schedule job to start the back-up on every possible time.

Start -> Task scheduler -> Create Task

– Name (Job name and Time)
– Check Run whether user is logged on or not
– Check Run with highest privileges
– Configure for: Windows server 2012 R2 (or other late OS)
– Triggers (choose a time)
– Action -> New -> Start a program
– Program script: powershell
– Arguments:

Start job normally:

Start full backup you give the value -fullbackup after start-vbrjob:

 

Get folder size on Cluster Shared Volume (CSV) Hyper-v

In VMM or Failover cluster manager there is no way to view the total size of the directory’s on the ClusterSharedVolumes (CSV).
Ive made a simple script to determine the size of a folder.

Run this script against a Hyper-v node in a cluster.