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:
| Baremetal | Virtualized | |
| Location | Down-time is unavoidable when we need to move from one physical location to another | We can set-up a link to migrate VM from one location to another, with minimal down-time |
| Hosting | Locked 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”) |
| Licensing | Easier licensing for software as hardware is locked | More complicated licensing may curtail |
| Hardware management | Harder 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. |
| Procurement | Will 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 server | Generally speaking, will require one hardware for each services | We can combine multiple services (with slightly different requirement) on single more powerful server. Thus, saving footprint and utility |
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:
- Hard disk
- Space
- IOPS
- RAM
- Total number of RAM of running OS+Services
- Spare RAM in case there is a spike in service requirement
- 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
- Configuration maximums
- Capacity planner
- VCenter
- if required, storage server is accessible from processing servers
- DRS (Distributed Resource Scheduler) configuration
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
- * Transparent Page Sharing
- 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
- Restart physical server with end-user.
Beware, some servers will not start back and may result in loss of service - Do system backup
- Test the backup on separate system
- Stop services
If not possible, change to read-only mode - P2V with utility
- Restore file to Virtual Server
DO NOT BOOT UP before steps below - Connect to internal vSwitch
- Boot-up
- Install VMWare Tools on restored VM
- Check for software licensing
- Disconnect live physical server
- Connect to live network, leaving internal vSwitch
Post-Migration
- Leave the service running for data collection
- CPU usage
- RAM usage
- Resize RAM as per needed
- Drop or increase resource allocation (should be below peak usage) if VM is critical
- 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