P2V (Physical-to-Virtual) Conversions in Hyper-V

As virtualization has become the norm, the need for physical-to-virtual conversions (P2V) has begun to decline for many of us. There are still a great number of legacy systems waiting their turn to be transferred. There are also many administrators inheriting systems from departed colleagues that avoided virtualization right up to the bitter end. Whatever your situation, this article is for you.

P2V conversions in Hyper-V

[thrive_leads id=’16356′]

What is a Physical-to-Virtual Conversion?

In simple terms, a physical-to-virtual (P2V) conversion transfers the entire state of an operating system installed on bare metal into a virtual machine. It is commonly done with the intent of retiring old hardware without rebuilding the system. It is also commonly done when an organization first begins to transition from an all-physical environment to a virtual environment.

Good Advice: Do Not Perform P2V Conversions

Truthfully, the best approach is to not perform P2V at all. It is fraught with peril. You will probably spend hours making your converted system work correctly. You will have a hybridized system that may not ever function optimally. Software support departments won’t like it. You might never make the thing work at all.

In particular, do not perform P2V for these systems:

  • Domain controllers
  • Exchange servers
  • Systems that rely on specialized hardware, such as fax boards and licensing dongles

Migrating Active Directory Domain Servers is preferred to a P2V operation just because moving domain services is ridiculously simple:

  1. Build a new Windows Server operating system environment
  2. Promote the new system to be a domain controller. For some reason, the TechNet article that describes how to promote a new domain controller makes this process look extremely difficult, but it isn’t. Even the article’s title includes the text “Level 100”.
  3. Install DHCP, if necessary. Use a DHCP failover scope to transition DHCP services from old to new.
  4. Demote the old domain controller.
  5. Remove the old domain controller from Active Directory Sites and Services.
  6. Decommission the old domain controller.

If you want to continue using the same IP address and name of the original domain controller, then perform the migration twice, with the second migration using the original name and IP.

Converting Exchange is more or less the same operation: add the new server into the Exchange infrastructure and remove the old one.

I am tempted to include Internet Information Services (IIS) in the list of “never migrate” just because moving IIS is usually very simple as well, but many of my earliest P2V experiences were with IIS and those ended well. I would not P2V SQL, though.

Whatever your application is, start with your favorite Internet search engine or the application’s support team and research migrating from one server to another. Wherever possible, always choose a data migration path over a physical-to-virtual conversion.

Problems with P2V Conversions

These are the things that you can expect to have trouble with after a P2V:

  • Hardware issues
    • Hard drives: Windows has never transitioned well from RAID to non-RAID environments. Versions prior to 2008 commonly failed when transitioning from SCSI to IDE or vice versa. Often, after a P2V, you will encounter 0x0000007b stop errors, which essentially mean that the boot loader could not find the startup files. Unfortunately, these errors are commonly insurmountable, although you might be able to use the Windows repair options from the installation media.
    • Phantom drivers: Completely removing old driver packs and supporting software might prove to be difficult. Windows will hide drivers for which it can’t find matching hardware. Some manufacturer removal routines are less than thorough. Do not be surprised if you encounter IRQL_NOT_LESS_OR_EQUAL errors after a P2V; these are hardware-related. MSDN has an article explaining how to view and remove devices that are no longer present (make certain that you perform the steps regarding the DEVMGR_SHOW_NONPRESENT_DEVICES environment variable.
    • Activation: All software, including Windows, that tracks licensing by hardware signatures will be triggered by P2V. It is against the license agreement to move an OEM copy of Windows. Other software may have similar restrictions. Not all will prevent the migration, which means that you could unknowingly be in a sticky legal situation after a successful P2V.
  • Support: many vendors will not support their software if it has been moved by P2V. I don’t like the software vendors that look for excuses any more than you do, but there’s no denying that you can’t always be certain that an issue wasn’t caused by P2V.
  • Operating system issues: as fate would have it, newer operating systems that are less likely to need to be P2Ved are more likely to survive a P2V. The older operating systems that you might need to P2V just so you can limp along to a software replacement/upgrade are more likely to fail. Windows Server 2003 had some special troubles in migration. I have an article on my own blog that talked about some issues that I found for Windows Server 2003 P2V.

Increasing the Odds of a Successful P2V Conversion

Sometimes, P2V is just what needs to be done. There are a couple of things that you can do to increase the odds that your conversion will be successful:

  • Backup! Do not even attempt a P2V unless you have a solid backup!
  • Replace OEM operating systems with fully-licensed versions. For 2003, all you had to do was use the fully-licensed media and upgrade the existing installation, using the proper key. Of course, that’s risky, and is best done prior to the migration.
  • Remove all drivers that are not essential for the move. Also remove any monitoring and maintenance software that is particular to the system’s hardware.
  • Pre-install Hyper-V Integration Services. In the C:Windows folder of your target Hyper-V host, you’ll find a vmguest sub-folder with all of the necessary files. If you prefer, there is a vmguest.iso in C:Windowssystem32.

Tools to Perform a P2V Conversion

There are a number of options for performing a P2V. These are the most common methods:

  • Microsoft Virtual Machine Converter (MVMC) version 3.0 (or later). This is the preferred method, as it will perform a true conversion.
  • Disk2VHD is provided by Sysinternals, which is now part of Microsoft. This tool converts a live hard disk to a VHDX. It is not truly a P2V operation as the operating environment is completely unmodified, but the resulting VHDX can be attached to a new virtual machine.
  • Disk clone utilities such as Clonezilla. I wrote an article about using Clonezilla that was intended for V2P, but truthfully it could be used for just about any migration type.
  • Standard backup and restore software like Altaro VM Backup. You could back up the physical environment using traditional software, build a new virtual machine with an empty copy of the operating system, and restore from backup.

[thrive_leads id=’17660′]

Altaro Hyper-V Backup
Share this post

Not a DOJO Member yet?

Join thousands of other IT pros and receive a weekly roundup email with the latest content & updates!

16 thoughts on "P2V (Physical-to-Virtual) Conversions in Hyper-V"

  • Brian Reed says:

    I’m a huge fan of your articles. However, I was a little stumped on your P2V tool recommendations.

    18 August 2016, P2V Conversions article–
    “There are a number of options for performing a P2V. These are the most common methods:
    ◦Microsoft Virtual Machine Converter (MVMC) version 3.0 (or later). This is the preferred method, as it will perform a true conversion.”

    25 August 2016, How to Use MVMC–
    “Pros and Cons of Microsoft Virtual Machine Converter
    I was not very impressed with this tool and would be unlikely to use it. Overall, I feel that Disk2VHD is better suited to what most people are going to do.”

    It sounds like you tried your recommendation and came back to Disk2VHD. Disk2VHD has not failed me yet on my migrations. I think I’ll use it again. I was just checking if anything had changed since it has been over a year since my last P2V.

    Also, I’m moving a DC. I’ve got a second DC already in the environment and it is running the FSMO roles. Is it really necessary to demote, migrate, and promote?

    Thanks.

    • Eric Siron says:

      Good catch. I was cautious to be somewhat vague about who was making that MVMC recommendation.
      On MVMC, it does perform an actual conversion. But it’s awful.
      On Disk2VHD, it doesn’t make a true conversion. But it almost always works.
      What would I use? I have successfully done everything in my power to avoid P2V for quite a while now. Truthfully, I would probably try Clonezilla first because there are no intermediary hops. The way that I do it is a serious commitment, though. I strip everything off of it that I can before doing the move, which often means that the quickest way back from a failed P2V is a restore.
      If Clonezilla didn’t work, I would probably use Disk2VHD next. MVMC would be my last resort.
      As for your DC, it is not absolutely necessary to go through all of that. I would do it anyway. I don’t have a clear enough memory, but I’m fairly certain that once you factor in all the things that you’ll want to do to ensure a successful P2V, the demote/promote process is quite a bit faster and you’ll wind up with a guaranteed clean environment.

  • Brian Reed says:

    I’m a huge fan of your articles. However, I was a little stumped on your P2V tool recommendations.

    18 August 2016, P2V Conversions article–
    “There are a number of options for performing a P2V. These are the most common methods:
    ◦Microsoft Virtual Machine Converter (MVMC) version 3.0 (or later). This is the preferred method, as it will perform a true conversion.”

    25 August 2016, How to Use MVMC–
    “Pros and Cons of Microsoft Virtual Machine Converter
    I was not very impressed with this tool and would be unlikely to use it. Overall, I feel that Disk2VHD is better suited to what most people are going to do.”

    It sounds like you tried your recommendation and came back to Disk2VHD. Disk2VHD has not failed me yet on my migrations. I think I’ll use it again. I was just checking if anything had changed since it has been over a year since my last P2V.

    Also, I’m moving a DC. I’ve got a second DC already in the environment and it is running the FSMO roles. Is it really necessary to demote, migrate, and promote?

    Thanks.

  • jpv says:

    If you get a bluescreen with 0x00000024 go to media/DVD Drive/Insert Disk and mount your Windows OS install ISO.

    Then restart and press key to boot from DVD. Run startup repair.

    basically does this:
    Set part as active Bootrec /fixmbr Bootrec /fixboot Bootrec /rebuildbcd

  • jpv says:

    Also, for this step: Remove all drivers that are not essential for the move

    Use this:
    Remove all drivers that are not essential for the move:

Leave a comment or ask a question

Your email address will not be published. Required fields are marked *

Your email address will not be published. Required fields are marked *

Notify me of follow-up replies via email

Yes, I would like to receive new blog posts by email

What is the color of grass?

Please note: If you’re not already a member on the Dojo Forums you will create a new account and receive an activation email.