<

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x

SCVMM Migration Failed - how to get past

Published on
11,022 Points
5,022 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

Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

Join & Write a Comment

Learn the basics of Skype For Business in office 365
Watch this simple and effective video tutorial to extract attachments from Outlook 2007 and try this easy method by yourself. No need to go anywhere, just watch the video and export attachments from Outlook in few simple steps. To know more, click h…

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month