Contact & Subscribe RSS

LinkedIn
RSS

Posts tagged "scvmm-2012-r2"

Remove Hyper-v node from SCVMM Failed: Error(25333)

In some situations (hardware failures etc.) it’s not possible to remove the Hyper-v cluster node nicely out of SCVMM. When removing the Hyper-v node from VMM it will throw an Error (25333) in SCVMM. This is because the server is down and it’s not possible to remove the SCVMM Host agent.

To solve this you can use the following PowerShell command:

 

Monitor VMM Job using PowerShell

In SCVMM there is no option to send a mail when a job is completed.
This can be archived with PowerShell. Here is an simple example script to monitor the SCVMM Job status:

 

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:

 

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:

 

Remove Temporary Template SCVMM

When you manually remove a .VHD file from the library, is it possible that you cannot remove the template from the SCVMM library. The template has some Temporary  Template dependencies on it. On the dependencies tab in your template configuration file you see the Object that is linked.

Solution:

Double click on the linked object and copy the name.

Open a Virtual Machine Manager Powershell

remove-scvmtemplate -vmtemplate "Temporary Template1c2fe 00e-4d16-4975-b85b-8c4fad34fff5"

Once runned the linked temporary template has been removed and you are able te remove te template.

VMM Cannot find the device or this device is not valid for a boot device.

This error occurs when you rollout a Generation 2.
Issue occurs because the Bootmgfw.efi file is set as the first startup device that the VM tries to start from, instead of the .vhdx file which contains the operating system.

Solution:

To resolve this issue you must change the firstbootdevice in the template.
Open a Virtual Machine Manager Command Shell:

Get-SCVMTemplate -name “Windows 2012 VM Template” | Set-SCVMTemplate -FirstBootDevice “SCSI,0,0″

Change multiple GEN2 templates.

Get-SCVMTemplate | where-object {$_.FirstBootDevice -cnotcontains "SCSI,0,0" -and $_.Generation -eq "2"} | Set-SCVMTemplate -FirstBootDevice "SCSI,0,0"