What is P2V?

P2V is the act of converting a bare-metal OS+Software into virtualized environment.

Why Virtualize?

Using virtualization technology, we are introducing a layer of software in the middle of hardware and existing software. So, why do we virtualize?

What I think, is virtualization doesn’t help much when we are running lean (e.g. only 1 server for everything). It will help when we have multiple services running. Some benefits on top of my heads:

BaremetalVirtualized
LocationDown-time is unavoidable when we need to move from one physical location to anotherWe can set-up a link to migrate VM from one location to another, with minimal down-time
HostingLocked to single physical hardware. Any redundancy will need to be accommodated on software level.Hardware independent (i.e. can be shifted to other hardware on same “stack”)
LicensingEasier licensing for software as hardware is lockedMore complicated licensing may curtail
Hardware managementHarder to maintain (e.g. increasing RAM capacity) will require service to be shut-down.Easier to maintain as we can move services to other bare-metal before performing hardware upgrade/maintenance.
ProcurementWill need to purchase hardware with different specs for different services (e.g. Historian will require less processing but faster hard disk)We can get multiple hardware with similar specs and then carve-out the VM as per required
Number of serverGenerally speaking, will require one hardware for each servicesWe can combine multiple services (with slightly different requirement) on single more powerful server. Thus, saving footprint and utility
Bare-metal vs Virtualized

Preparation

Things to check before we start virtualization

Specs requirement

We’ll need several specification to make sure we have enough space for virtualization for the whole stack of services:

  1. Hard disk
    • Space
    • IOPS
  2. RAM
    • Total number of RAM of running OS+Services
    • Spare RAM in case there is a spike in service requirement
  3. CPU
    • For easier calculation, take note of the MHz that is “consumed” for each stack, then we add some spare
    • We’ll also need to note if the software work better with more cores.

Virtual Server

For VMWare, we’ll need to check the following

We’ll need to plan for the following

  • RAM
    • * Transparent Page Sharing
      Beware of vulnerabilities on memory
    • Deallocate / Ballooning
      We’ll discuss more about this on post-migration
    • Please make sure we have 20-30% of free memory after deducting required RAM
  • CPU
    • Some OS edition (e.g. Windows 7 Pro) can only use one CPU socket.
    • lease make sure we have 20-30% of free memory after deducting required CPU
  • Reservations
    • Do for CRITICAL VMs only
    • Applicable only before boot-up
  • Limits
    • Do for resource hungry VMs only

P2V Steps

  1. Restart physical server with end-user.
    Beware, some servers will not start back and may result in loss of service
  2. Do system backup
  3. Test the backup on separate system
  4. Stop services
    If not possible, change to read-only mode
  5. P2V with utility
  6. Restore file to Virtual Server
    DO NOT BOOT UP before steps below
  7. Connect to internal vSwitch
  8. Boot-up
  9. Install VMWare Tools on restored VM
  10. Check for software licensing
  11. Disconnect live physical server
  12. Connect to live network, leaving internal vSwitch

Post-Migration

  1. Leave the service running for data collection
    • CPU usage
    • RAM usage
  2. Resize RAM as per needed
  3. Drop or increase resource allocation (should be below peak usage) if VM is critical
  4. Do resource limit if needed

DRS

For the following types of services, exclude from DRS

  • Database server
  • VCenter
  • Active Directory
  • SAP System (due to licensing issue)
  • Busy VM
  • network routing

HA (High Availability)

  • Utilizes ping to guest VM
  • For low mission-critical services
  • Different from MS clustering or software redundancy
Last modified: 1 March 2022