<

SCVMM Migration Failed - how to get past

Published on
10,858 Points
4,858 Views
Last Modified:
Approved
Beyond Next Solutions
IT project consultancy providing architecture, deployment, migration, management, and training on Microsoft server products.
When working with Microsoft SCVMM (System Center Virtual Machine Manager) in a Hyper-V virtualization environment, we have run across scenarios in which the failed migration of a VM from one host to another may leave the VM in a failed state. Specifically, in the SCVMM console, the VM has a red 'X' beside it with the "Migration failed" under the status column. While the VM is in this failed state, SCVMM will only allow you to Repair, Delete, or View networking of the VM. Furthermore, if you right-click the VM and select 'Repair', the option to 'Ignore' is unavailable, and the 'Retry' and 'Undo' options fail. Even though you may have corrected the problem outside of VMM, for example using the Hyper-V Manager console, the repair options yield no results.

We have read many articles and posts on how to deal with this scenario, such as removing the host from VMM and adding it back. Or using SQL Server Management Studio to hide failed jobs (NOT a good idea as it can eventually lead to poor SCVMM performance since the VMM cleanup process will skip old jobs that are hidden!). Once you have corrected the problem and exhausted all possibilities to remedy the situation, here is a handy PowerShell script that will help you out of this jam, which we pieced together specifically for this situation.

First, a little peek under the hood:

- When the migration fails, the ObjectState field in SQL for the VM gets set to 220, indicating a failed state.
- If the ObjectState field for a VM is set to 0 (zero) or 1, SCVMM will re-check the VM state. If you have repaired the VM and set the ObjectState in the VirtualManagerDB to 0, VMM will immediately notice the VM has been fixed, and all is well.

For script usage and link to download, see my blog post at: http://blog.beyond-next.com/2011/09/scvmm-migration-failed-how-to-clear.html
0
Comment
0 Comments

Featured Post

Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

Join & Write a Comment

Did you know PowerShell can save you time with SaaS platforms? Simply leverage RESTfulAPIs to build your own PowerShell modules. These will kill repetitive tickets and tabs, using the command Invoke-RestMethod. Tune into this webinar to learn how…
This is Part-2 of Learning to use the Power of Mailwasher Pro so if you haven't watched Part-1 yet, I urge you to do so before watching this video. Click this link to watch Part-1 (https://www.experts-exchange.com/videos/56638/Learn-to-use-the-POWER…

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month