Import virtual machines or template operation of Microsoft Test Manager throws 'Object reference not set to an instance of an object’'

Import virtual machines or template operation of Microsoft Test Manager throws 'Object reference not set to an instance of an object’'

Rate This
  • Comments 2

The content of this blog is applicable if you are using Team Foundation Server 2012 Update 4 with System Center Virtual Machine Manager 2012 R2.

 

Problem:  When you try to import a virtual machine or template to Team Foundation Server library using Microsoft Test Manager(MTM), import wizard throws 'Object reference not set to an instance of an object’' . This issue occurs when you have any VM or template with no description in your Virtual Machine Manager(VMM) library share that you have configured to Team Foundation Server(TFS) and you are trying to import them to TFS.

 

Work Around:  To fix this error make sure you add description to all the VMs or templates in your Virtual Machine Manager library share and then perform import operation using MTM.

To get list of all the templates or VMs which does not have description, you can run the following PowerShell script in VMM PowerShell console.

$templates = Get-SCVMTemplate -All -VMMServer <VMMServerName>
$templates |  select {$_.description -eq $null }, Name

Leave a Comment
  • Please add 8 and 4 and type the answer here:
  • Post
  • You've made my week with this post, many many thanks!

  • Just wanted to add on top of this that this issue is fixed in TFS 2013 and the workaround is required only for TFS 2012.

Page 1 of 1 (2 items)