Importing a Virtual Machine with an Incompatible Saved State
This afternoon – an email arrived with the following question for me:
“I’m working with on a Hyper-V migration with an import-vm component. I saw what I believe is your post on importing incompatible VMs. We are experiencing an issue where the incompatibility has to do with a bad saved state after the migration. This can be cleared manually, but nowhere can I find a references to how to resolve this issue with a script.
Could you possible point me in the right direction?”
Happy to help! The trick in this case is to remember that when you use “compare-VM” the compatibility report that is returned contains an entire copy of the virtual machine that you are trying to import. You can modify this virtual machine in anyway in order to prepare it for import. For an incompatible saved state – you will want to use “Remove-VMSavedSate” on the virtual machine object that is included in the compatibility report.