Experiences in a Virtual World

PowerShell Snip of the Week (Get-SCVirutalNetworkAdapter)

leave a comment »


powershell_2Ben Armstrong recently posted a method on Listing all the IP Addresses used by VMs.  The Method was pretty straight forward and gave back some great information.  It got me thinking of how enterprise customers could do this using System Center Virtual Machine Manager 2012 R2.  Here is what I came up with for this weeks PowerShell Snip of the Week.


Find IPv4 and IPv6 IP Addresses for all Running VMs:

Get-SCVirtualMachine | ? StatusString –eq “Running” | Get-SCVirtualNetworkAdapter | ft Name, IPv4AddressType, IPv4Addresses, IPv6Addresses –a



With this base there are a whole variety of options you could get from this if you twist the script a little.

Find Information about a server with a specific IP Address:

Sometimes in a troubleshooting scenario you get limited information.  Many times that information comes from the network team or from a Firewall log where only the an IP Address of a VM is known.

Get-SCVirtualMachine | Get-SCVirtualNetworkAdapter | ? IPv4Addresses –eq “IPADDRESS”


Get-SCVirtualMachine | Get-SCVirtualNetworkAdapter | ? IPv4Addresses -eq


This gets you some valuable information in your troubleshooting, most notably, the name of the VM so that you can now start to look at it directly.

Find VMs with duplicate MAC Addresses or Just track down a VM by MAC Address:

Modifying the script in a different way, looking for MAC Address, allows for another common troubleshooting scenario where VMs have the same virtual MAC Address.  It doesn’t happen all that often, but it can be tricky to track down when it does.  The following script will return the VM with the MAC Address you are looking for or multiple VMs if they share the same MAC Address.

Get-SCVirtualMachine | Get-SCVirtualNetworkAdapter | ? MACAddress -eq “<MACADDRESS>”


Get-SCVirtualMachine | Get-SCVirtualNetworkAdapter | ? MACAddress -eq “00:15:5D:F3:F8:03”

Written by VirtuallyAware

April 22, 2014 at 8:27 AM

PowerShell Snip of the Week – (Get-VMIntegrationService)

leave a comment »


Finding the status of a VMs or all your VMs Integration Components can be a very useful troubleshooting tool when you are having various VM management issues.  Examples could be that VMs that have the correct Integration Components versions are slipping into saved state or maybe the VM is not responding to a shutdown command from the Hyper-V or SCVMM console.  I have seen both of these.  This week I have a couple of examples for you that might just come in handy if you come across a VM that just is not responding as a fully enlightened VM should.

These scripts need to be run from a Workstation/Server that has the Hyper-V PowerShell Components

View Status of all Integration Components for a VM:

Get-VM -ComputerName HOSTNAME–VMName <VMNAME>| Get-VMIntegrationService| ft VMName, Name, primarystatusDescription, Enabled

If all ICs are in a good state you will see this  output


If you see this, the VM will go into Saved State when backups are performed



To get just the VMs with Integration Services that have a Primary Status of “No Contact” you can use this method:

$s = “VMHOST1″,”VMHOST2″

foreach ($server in $s) {Get-VM -ComputerName $server | Get-VMIntegrationService| ? primarystatusdescription -like “no*” | ft VMName, Name, primarystatusDescription, Enabled}


Output will look like this if there are any VMs with IC Contact issues.



My next post will go more deeply into what to do when you see these issues with Integration Components.

Written by VirtuallyAware

April 14, 2014 at 8:27 AM

PowerShell Snip of the Week (Get-WinEvent)

leave a comment »

VMs that went into Saved State in the Last Day

imageDuring the migration of VMs to a Hyper-V in Windows Server 2012 R2 environment you may find that some of your VMs go in to Saved State when the backup process kicks off.  This may be because you have not updated the Integration Components, there is a problem with the Integration Component install or some other issue where the Hyper-V Writers determine that the VM should be backed up offline (Look for a post on this soon).  During this time of troubleshooting you can go to the Windows-Hyper-V-Worker-Admin event log on each server to identify which VMs are having this issue by looking for event 18510.  If you have a larger environment this gets a little inefficient.

I have used the script below during my troubleshooting.  You could easily change this to either look to a server list text file or even to accept a switch.




foreach ($server in $s) {Get-WinEvent -ComputerName $server -FilterHashTable @{LogName =”Microsoft-Windows-Hyper-V-worker-admin”; StartTime = (Get-Date).AddDays(-1)} | ? id -eq 18510}

Written by VirtuallyAware

April 7, 2014 at 8:27 AM

PowerShell Snip of the Week (SCVMM)

with one comment


imageHere is this weeks PowerShell Snip of the Week.

Using Get-VirtualNetworkAdapter.

When looking into a recent issue with a NIC Team on a host, I had a need for a quick way to identify which VMs were using a particular logical network and their MAC Address so that the VM(s) traffic could be identified with WireShark.

This snip targets VMs on a specified cluster that are assigned to a certain logical network.

Get-VMHostCluster CLUSTERNAME | Get-VMHost| Get-VM |Get-VirtualNetworkAdapter |? LogicalNetwork -eq “LOGICALNETWORKNAME”| FT name, logicalnetwork, macaddress -a

Written by VirtuallyAware

March 31, 2014 at 8:27 AM

Deep Dive Day 2014 is Just Around the Corner

leave a comment »

There is still time to sign-up for Virtualization Deep Dive Day 2014 on March 12th. This has been a great day to Network with peers, learn about new products in virtualization, as well as network with some very bright folks. 

I am going to be talking about important features in Hyper-V 2012 and 2012 R2 that really matter to administrators and how the can be practically used in your environment.  As always there will be lot of demos and time to chat before or after one-on-one.  

You can register HERE.

clip_image002 VirtG Presents

The Sixth Annual Virtualization Deep Dive Day 2014

An event for Information Technology Professionals

Event location: Date: Wednesday, March 12th

Microsoft Time: 8:00AM – 5:00PM

4th Floor, Multi-Purpose Rooms Information and Registration:

One Cambridge Center (1CC)

Cambridge, MA. 02142 Morning snacks and lunch are free.

Deep Dive Day 2014 is a multi-track event put on by the Virtualization Group Boston (VirtG). Experts from around the country will be providing great technical talks covering every form of virtualization. Also, visit with industry leading vendors in the exhibition area.

Whether you are new to virtualization or want the technical details on the latest for server, desktop, application, networking, security and storage virtualization, plus "The Cloud", you don’t want to miss this event. Refer to the schedule below for all the great breakout sessions.


clip_image006 clip_image008 clip_image010 clip_image012 clip_image014 clip_image016 clip_image018 clip_image020 `

Written by VirtuallyAware

February 28, 2014 at 9:57 PM

Posted in Hyper-V

Steps for Updating SCVMM 2012 R2 to Update Rollup 1

leave a comment »

The update of SCVMM 2012 R2 with Update Rollup one is fairly straight forward with the exception of the need to execute a SQL script after the server component update, but if you have used VMM for any length of time you know that an occasional modification to the database itself is necessary to correct issues.  Even with that, the process, should take no more than five minutes to complete. Here are the steps below.  Make sure you either perform this in your test environment first or wait a few weeks until others have tested the update just to be sure any unexpected issues have been vetted.  There are not a lot of changes in the rollup, I can think of many more that need to be corrected, but having an outage of your main virtual machine management tool is never a good thing.

    1. Download the Hotfixes HERE
    2. Extract the MSP files from the CAB files by double clicking on the download CAB then right-clicking the MSP file and choosing extract.


3. Execute msiexec.exe /update kb2904712_vmmserver_amd64.msp

4. Execute the following SQL script: (It is stressed to do this immediately after the server side update)

/* script starts here */
ALTER Procedure [dbo].[prc_RBS_UserRoleSharedObjectRelation_Insert]
@ID uniqueidentifier,
@ObjectID uniqueidentifier,
@ObjectType int,
@RoleID uniqueidentifier,
@UserOrGroup varbinary (85),
@ForeignAccount nvarchar (256),
@IsADGroup bit,
@ExistingID uniqueidentifier = NULL OUTPUT
SELECT @ExistingID = [ID] FROM [dbo].[tbl_RBS_UserRoleSharedObjectRelation]
WHERE [ObjectID] = @ObjectID AND [RoleID] = @RoleID
— Select owner OR Select all which matches ForeignAccount or UserOrGroup OR
— both ForeignAccount and UserOrGroup is NULL
(([UserOrGroup] = @UserOrGroup OR [ForeignAccount] = @ForeignAccount) OR
([UserOrGroup] IS NULL AND @UserOrGroup IS NULL AND [ForeignAccount] IS NULL AND @ForeignAccount IS NULL))
/* Ignore duplicate entries */
IF (@ExistingID IS NULL)
INSERT [dbo].[tbl_RBS_UserRoleSharedObjectRelation]
/* script ends here */

5. Execute msiexec /update kb2919248_AdminConsole_amd64.msp


Version Before: 3.2.7510.0 Version After: 3.2.7620.0
image image

***You can also check out the Video put out by the SCVMM Support Team on the deployment process HERE.

Written by VirtuallyAware

January 30, 2014 at 7:27 AM

System Center 2012 R2 Update Rollup 1 (KB2904734)

leave a comment »

Microsoft_System_Center_2012_R2_logoThe System Center Team release (KB2904734) System Center 2012 R2 Update Rollup 1 today with high hopes by admins everywhere that this will start to plug some of the large holes in the products under the System Center Umbrella released  3+ Months ago along side of Windows Server 2012 R2 as part of Microsoft’s “attempt” to not leave gaps between platform and management products.  Don’t get me wrong.  The System Center 2012 R2 products add a lot of great features and functionality, but between functionality bugs and features pulled that were in previous versions, it has left a bad taste in many administrator’s mouths and has gone against the goal of Microsoft of releasing capable products at GA.

Below are the links to the products that have updates.  Only System Center Data Protection Manager, System Center Operations Manager and Virtual Machine Manager have applicable updates.

Description of Update Rollup 1 for System Center 2012 R2

Issues that are fixed in System Center 2012 R2 Data Protection Manager Update Rollup 1

Issue 1

A 0x80070057 error occurs when a session is closed prematurely. This error is caused by a failure during a consistency check.

Issue 2

Lots of concurrent threads or calls to Microsoft SQL Server from the Data Protection Manager (DPM) console cause slow SQL Server performance. When this issue occurs, the DPM console runs out of connections to SQL Server and may hang or crash.

Issue 3

The DPM console crashes, and an error that resembles the following is logged:


Issues that are fixed in System Center 2012 R2 Operations Manager Update Rollup 1

Issue 1

An error occurs when you run the p_DataPurging stored procedure. This error occurs when the query processor runs out of internal resources and cannot produce a query plan.

Issue 2

Data warehouse BULK INSERT commands use an unchangeable, default 30-second time-out value that may cause query time-outs.

Issue 3

Many 26319 errors are generated when you use the Operator role. This issue causes performance problems.

Issue 4

The diagram component does not publish location information in the component state.

Issue 5

Renaming a group works correctly on the console. However, the old name of the group appears when you try to override a monitor or scope a view based on group.

Issue 6

SCOM synchronization is not supported in the localized versions of Team Foundation Server.

Issue 7

An SDK process deadlock causes the Exchange correlation engine to fail.

Issue 8

The “Microsoft System Center Advisor monitoring server” reserved group is visible in a computer or group search.

Issue 9

Multiple Advisor Connector are discovered for the same physical computer when the computer hosts a cluster.

Issue 10

A Dashboard exception occurs if the criteria that are used for a query include an invalid character or keyword.


Operations Manager – UNIX and Linux Monitoring (Management Pack Update)

Issue 1

On a Solaris-based computer, an error message that resembles the following is logged in the Operations Manager log. This issue occurs if a Solaris-based computer that has many monitored resources runs out of file descriptors and does not monitor the resources. Monitored resources may include file systems, physical disks, and network adapters.

Note The Operations Manager log is located at /var/opt/microsoft/scx/log/scx.log.

errno = 24 (Too many open files)

This issue occurs because the default user limit on Solaris is too low to allocate a sufficient number of file descriptors. After the rollup update is installed, the updated agent overrides the default user limit by using a user limit for the agent process of 1,024.

Issue 2

If Linux Container (cgroup) entries in the /etc/mtab path on a monitored Linux-based computer begin with the “cgroup” string, a warning that resembles the following is logged in the agent log.

Note When this issue occurs, some physical disks may not be discovered as expected.

Warning [scx.core.common.pal.system.disk.diskdepend:418:29352:139684846989056] Did not find key ‘cgroup’ in proc_disk_stats map, device name was ‘cgroup’.

Issue 3

Physical disk configurations that cannot be monitored, or failures in physical disk monitoring, cause failures in system monitoring on UNIX and Linux computers. When this issue occurs, logical disk instances are not discovered by Operations Manager for a monitored UNIX-based or Linux-based computer.

Issue 4

A monitored Solaris zone that is configured to use dynamic CPU allocation with dynamic resource pools may log errors in the agent logs as CPUs are removed from the zone and do not identify the CPUs currently in the system. In rare cases, the agent on a Solaris zone with dynamic CPU allocation may hang during routine monitoring.

Note This issue applies to any monitored Solaris zones that are configured to use dynamic resource pools and a “dedicated-cpu” configuration that involves a range of CPUs.

Issue 5

An error that resembles the following is generated on Solaris 9-based computers when the /opt/microsoft/scx/bin/tools/ script does not set the library pathcorrectly. When this issue occurs, the omicli tool cannot run. omicli: fatal: open failed: No such file or directory

Issue 6

If the agent does not retrieve process arguments from the getargs subroutine on an AIX-based computer, the monitored daemons may be reported incorrectly as offline. An error message that resembles the following is logged in the agent log:

Calling getargs() returned an error

Issue 7

The agent on AIX-based computers considers all file cache to be available memory and does not treat minperm cache as used memory. After this update rollup is installed, available memory on AIX-based computer is calculated as: free memory + (cache – minperm).

Issue 8

The Universal Linux agent is not installed on Linux computers that have OpenSSL versions greater than 1.0.0 if the library file does not exist. An error message that resembles the following is logged:

/opt/microsoft/scx/bin/tools/.scxsslconfig: error while loading shared libraries: cannot open shared object file: No such file or directory


Description of Update Rollup 1 for System Center 2012 R2 Virtual Machine Manager

Issue 1

System Center 2012 R2 Virtual Machine Manager cannot deploy a new or imported VMWare template.

Issue 2

A virtual machine with that uses VHDX cannot be refreshed correctly in System Center 2012 R2 Virtual Machine Manager, and you receive the following error message:

Refresh job failed with error 2912: The requested operation cannot be performed on the virtual disk as it is currently used in shared mode (0xC05CFF0A)

Issue 3

Database operations sometimes fail with “FailedToAcquireLockException.”

Issue 4

A new virtual machine template from a template that specifies an operating system profile doesn’t use credentials from the operating system profile.

Issue 5

Virtual machines in VMWare that connect by the using Cisco N1000V dvSwitch are unavailable for management from Virtual Machine Manager.

Issue 6

System Center Virtual Machine Manager service crashes if you disable one of the teamed network adapters.

Issue 7

The Get-Scstoragearray -host command should return storage arrays that are visible to a host that is using zoning.

Issue 8

During the discovery of a network-attached storage (NAS) provider, the credentials that are used do not include a domain name.

Issue 9

Some localized strings are not displayed correctly in the UI.

Issue 10

A query to find the certificate should match both the subject name and the friendly name because FindBySubjectNameis a wildcard search.

Issue 11

Template deployment fails, and you receive the following error message:

Error (2904)
VMM could not find the specified path on the <Server name> server.
The system cannot find the path specified (0x80070003)

Issue 12

Virtual Hard Disk (VHD) cannot be mounted on a host because VHD conflicts with other disks because of a stale entry that was left in the dictionary of Virtual Machine Manager memory.

Differencing disk based deployment may fail because the parent disk is being refreshed as noncached.


I would recommend getting these up and running in your test environments first.  As with any update, there are chances for potential issues.  If you see anything any issues, please report them back to Microsoft and help out the community.




Written by VirtuallyAware

January 28, 2014 at 9:55 PM


Get every new post delivered to your Inbox.

Join 284 other followers

%d bloggers like this: