How to virtualize PC

Have you ever come to the point when you had to perform a clean Windows installation on the working computer? However, you have all the software, you use on the daily basis, installed and configured. Reinstalling the Windows and all the software again usually takes you at least a week. Can’t afford to stay offline this long?

How about virtualizing your working copy of Windows, and make it run as the virtual computer? Once you have it running on the virtual server, you can safely reformat your physical one. This way you have time to do the installation and setup of the new environment, while you can always log in to the virtualized old computer and do all the regular tasks that come in meanwhile.

This procedure is also referred as physical to virtual conversion or P2V for short.

Perform the following procedure at your own risk. The procedure is still quite safe, since it means creating a full backup image of your computer and playing with the backup image afterwards. However, the author takes no responsibility for any damage or data loss.

Glossary

  • physical computer – the source computer, you’re trying to virtualize
  • virtual server – the computer that has Microsoft Virtual Server or Microsoft Virtual PC installed; the computer where you’ll host the virtual one
  • virtual computer – the destination virtual computer running on the virtual server

Requirements

  • A separate computer running Microsoft Virtual Server or Microsoft Virtual PC, namely the virtual server
  • Symantec Ghost or similar software that supports performing an offline entire disk copy with partitions layout to a remote disk over the network
  • VHDMount utility, which Microsoft distributes as a part of Microsoft Virtual Server but you can install it separately
  • The setup media of the Windows installation you’re trying to virtualize, or even better: an ISO image of it

The procedure

Copy the hard drives

I wrote a separate article describing in detail how to perform this task here. To keep you focused, the short summary follows. The following procedure is actually making a backup of your hard drive layout to VHD files situated on remote virtual server over the network.

On virtual server:

  1. Create a VHD file for each physical disk/volume installed in your physical computer. Symantec Ghost can resize the partitions so you can use this opportunity to adjust disk drive sizes.
  2. Mount all the newly created VHD files using VHDMount utility. You don’t need to enable the Undo disk feature yet, to provide a better transfer rate. I suggest you run GDISK32.EXE utility to determine the number of each VHD file mounted. Selecting the wrong destination drive later can easily overwrite any of your local disk drives on your virtual server.
  3. Run GHOST32.EXE utility on your virtual server and configure it as a network slave mode (Peer to peerTCP/IPSlave). Remember the IP displayed.

On physical computer:

  1. If you don’t remember the physical computer Administrator’s account password, you should reset it first.
  2. Prepare a bootable media (diskette or USB flash drive) with networking support using Symantec Ghost Boot Wizard. Make sure you include proper network driver of your physical computer network interface card (NIC). If you can’t find the driver on the list, look for the DOS drivers of your NIC on the internet. You can prepare the bootable media on another computer.
  3. Boot the physical computer using the prepared bootable media. Verify the network driver loaded successfully. If the network works, the Peer to peer option in Symantec Ghost is enabled.
  4. Configure Symantec Ghost as a network master (Peer to peerTCP/IPMaster). Enter the IP of the virtual server displayed before.
  5. Using the Symantec Ghost, copy all the disk drives from the physical computer to the mounted VHD files on the virtual server.
  6. When the transfer is complete, I consider a good practice to turn off the physical computer and leave it turned off. If this procedure doesn’t work for you, you can always discard the virtual computer and turn back on the physical one to resume your work.

Back on virtual server:

  1. Once the transfer is complete, you can safely choose not to restart the virtual server and just exit the GHOST32.EXE there. Unmouting the VHD files is sufficient.

Replace HAL.DLL on virtual computer

Since the hardware abstraction layer on the virtual computer is most probably different from the physical one, you must replace the HAL.DLL file of your Windows installation to make the virtual computer start. You can read more details here.

  1. Mount the VHD file that has a copy of partition with the Windows installation using VHDMount utility.
  2. Extract the HALACPI.DLL file from your Windows setup media to the System32 folder and replace the HAL.DLL with it. You should find the HALACPI.DL_ file in the i386 folder on your Windows setup media. Use the following lines in your command prompt (assuming F: is the drive of the mounted VHD file partition with the Windows installation, and D: is the drive with the Windows setup media):
    cd F:\WINDOWS\system32
    expand D:\i386\HALACPI.DL_
    ren HAL.DLL HAL-ORIG.DLL
    ren HALACPI.DLL HAL.DLL
  3. Unmount the VHD file and commit the changes.

Create a virtual computer

Use Microsoft Virtual Server or Virtual PC to create a new virtual computer. Attach the VHD files created to it in the same order as they appeared as disks in physical computer.

Since Microsoft Virtual Server performs faster emulation for SCSI drives than IDE, you can choose to attach VHD files as SCSI drives. Believe me; the migration imposes much more radical hardware changes to Windows installation than this.

If your Windows licence requires activation, you’ll have to reactivate it anyway. So now it’s time to do all the hardware changes you need.

I strongly suggest you enable Undo disks option now.

Enable/disable drivers

  1. Boot the virtual computer from the Windows setup media for the first time. When the Windows installation offers you a choice, choose “R – Rescue”. The rescue mode will ask you about the desired keyboard, the path to the Windows installation you would like to repair and the Administrator account’s password.
  2. Once in rescue console, use LISTSVC, ENABLE and DISABLE commands to manipulate the start-up type of each service. Concentrate on the services that have or should have the start-up type set to Boot or System. Those are the drivers.
    A single Boot or System class driver of the hardware, which is installed on the physical computer and is absent on virtual one, can prevent Windows from booting up. Therefore, make sure, you disable all the services of Boot or System class not needed anymore.
    On the other hand, you need to enable the drivers of the hardware the Microsoft Virtual Server emulates in order to boot the virtual computer. For example, you should set the aic78xx service start-up type to Boot, if you attached the VHD files as SCSI drives. You’ll get a blue screen on boot otherwise.
    I appended a typical services start-up setup on a virtual computer for your reference.
  3. You can try to boot the virtual computer after a change or two, to see if it already boots. If it doesn’t boot the normal way, try the Safe mode. If Windows doesn’t start in the safe mode either, return to rescue console, enable/disable some more drivers and retry.

After you get the virtual computer running

Please consider following notes, after you get the virtual computer running:

  • Congratulations!
  • You will probably have to re-activate your Windows installation if your Windows licence requires activation.
  • If you use fixed DHCP assigned IP addresses on your network, you should replace the MAC address of the physical computer with the virtual computer’s one in the DHCP server’s settings. This way the cloned virtual computer should get the same IP address assigned.
  • Do not boot the physical computer on the same network, since the IP and/or computer name collision might occur. If the purpose of your virtualization was to make a permanent virtual clone of the physical computer rather than migration, you should change the virtual computer’s name and IP address to avoid collision.

Appendix: Default service start-up setup of virtual computer running Windows XP

Driver/service

Start-up type

Description

Abiosdsk Disabled
abp480n5 Disabled
ACPI Boot Microsoft ACPI Driver
ACPIEC Disabled
adpu160m Disabled
aec Manual Microsoft Kernel Acoustic Echo Canceller
AFD System AFD Networking Support Environment
Aha154x Disabled
aic78u2 Disabled
aic78xx Boot
Alerter Disabled Alerter
ALG Manual Application Layer Gateway Service
AliIde Disabled
amsint Disabled
AppMgmt Manual Application Management
asc Disabled
asc3350p Disabled
asc3550 Disabled
AsyncMac Manual RAS Asynchronous Media Driver
atapi Boot Standard IDE/ESDI Hard Disk Controller
Atdisk Disabled
Atmarpc Manual ATM ARP Client Protocol
AudioSrv Auto Windows Audio
audstub Manual Audio Stub Driver
Beep System
BITS Manual Background Intelligent Transfer Service
Browser Auto Computer Browser
cbidf2k Disabled
cd20xrnt Disabled
Cdaudio System
Cdfs Disabled
Cdrom System CD-ROM Driver
Changer System
CiSvc Manual Indexing Service
ClipSrv Disabled ClipBook
CmdIde Disabled
COMSysApp Manual COM+ System Application
Cpqarray Disabled
CryptSvc Auto Cryptographic Services
ctlsb16 Manual Creative SB16/AWE32/AWE64 Driver (WDM)
dac2w2k Disabled
dac960nt Disabled
DC21x4 Manual DC21x4 Based Network Adapter Driver
DcomLaunch Auto DCOM Server Process Launcher
Dhcp Auto DHCP Client
Disk Boot Disk Driver
dmadmin Manual Logical Disk Manager Administrative Service
dmboot Disabled
dmio Boot Logical Disk Manager Driver
dmload Boot
dmserver Auto Logical Disk Manager
DMusic Manual Microsoft Kernel DLS Syntheiszer
Dnscache Auto DNS Client
dpti2o Disabled
drmkaud Manual Microsoft Kernel DRM Audio Descrambler
ERSvc Auto Error Reporting Service
Eventlog Auto Event Log
EventSystem Manual COM+ Event System
Fastfat Disabled
FastUserSwitching Compatibility Manual Fast User Switching Compatibility
Fdc Manual Floppy Disk Controller Driver
Fips System
Flpydisk Manual Floppy Disk Driver
FltMgr Boot FltMgr
Fs_Rec System
Ftdisk Boot Volume Manager Driver
gameenum Manual Game Port Enumerator
Gpc Manual Generic Packet Classifier
helpsvc Auto Help and Support
HidServ Disabled Human Interface Device Access
hpn Disabled
HTTP Manual HTTP
HTTPFilter Manual HTTP SSL
i2omgmt System
i2omp Disabled
i8042prt System i8042 Keyboard and PS/2 Mouse Port Driver
Imapi System CD-Burning Filter Driver
ImapiService Manual IMAPI CD-Burning COM Service
ini910u Disabled
IntelIde Boot
intelppm System Intel Processor Driver
ip6fw Manual IPv6 Windows Firewall Driver
IpFilterDriver Manual IP Traffic Filter Driver
IpInIp Manual IP in IP Tunnel Driver
IpNat Manual IP Network Address Translator
IPSec System IPSEC driver
IRENUM Manual IR Enumerator Service
isapnp Boot PnP ISA/EISA Bus Driver
Kbdclass System Keyboard Class Driver
kmixer Manual Microsoft Kernel Wave Audio Mixer
KSecDD Boot
LanmanServer Auto Server
lanmanworkstation Auto Workstation
lbrtfdc System
LmHosts Auto TCP/IP NetBIOS Helper
Messenger Disabled Messenger
mnmdd System
mnmsrvc Manual NetMeeting Remote Desktop Sharing
Modem Manual
Mouclass System Mouse Class Driver
MountMgr Boot Mount Point Manager
mraid35x Disabled
MRxDAV Manual WebDav Client Redirector
MRxSmb System MRXSMB
MSDTC Manual Distributed Transaction Coordinator
Msfs System
MSIServer Manual Windows Installer
MSKSSRV Manual Microsoft Streaming Service Proxy
MSPCLOCK Manual Microsoft Streaming Clock Proxy
MSPQM Manual Microsoft Streaming Quality Manager Proxy
mssmbios Manual Microsoft System Management BIOS Driver
Mup Boot Mup
NDIS Boot NDIS System Driver
NdisTapi Manual Remote Access NDIS TAPI Driver
Ndisuio Manual NDIS Usermode I/O Protocol
NdisWan Manual Remote Access NDIS WAN Driver
NDProxy Manual NDIS Proxy
NetBIOS System NetBIOS Interface
NetBT System NetBios over Tcpip
NetDDE Disabled Network DDE
NetDDEdsdm Disabled Network DDE DSDM
Netlogon Manual Net Logon
Netman Manual Network Connections
Nla Manual Network Location Awareness (NLA)
Npfs System
Ntfs Disabled
NtLmSsp Manual NT LM Security Support Provider
NtmsSvc Manual Removable Storage
Null System
NwlnkFlt Manual IPX Traffic Filter Driver
NwlnkFwd Manual IPX Traffic Forwarder Driver
Parport Manual Parallel port driver
PartMgr Boot Partition Manager
ParVdm Auto
PCI Boot PCI Bus Driver
PCIDump System
PCIIde Disabled
Pcmcia Disabled
PDCOMP Manual
PDFRAME Manual
PDRELI Manual
PDRFRAME Manual
perc2 Disabled
perc2hib Disabled
PlugPlay Auto Plug and Play
PolicyAgent Auto IPSEC Services
PptpMiniport Manual WAN Miniport (PPTP)
Processor System Processor Driver
ProtectedStorage Auto Protected Storage
PSched Manual QoS Packet Scheduler
Ptilink Manual Direct Parallel Link Driver
ql1080 Disabled
Ql10wnt Disabled
ql12160 Disabled
ql1240 Disabled
ql1280 Disabled
RasAcd System Remote Access Auto Connection Driver
RasAuto Manual Remote Access Auto Connection Manager
Rasl2tp Manual WAN Miniport (L2TP)
RasMan Manual Remote Access Connection Manager
RasPppoe Manual Remote Access PPPOE Driver
Raspti Manual Direct Parallel
Rdbss System Rdbss
RDPCDD System
rdpdr Manual Terminal Server Device Redirector Driver
RDPWD Manual
RDSessMgr Manual Remote Desktop Help Session Manager
redbook System Digital CD Audio Playback Filter Driver
RemoteAccess Disabled Routing and Remote Access
RemoteRegistry Auto Remote Registry
RpcLocator Manual Remote Procedure Call (RPC) Locator
RpcSs Auto Remote Procedure Call (RPC)
RSVP Manual QoS RSVP
s3legacy Manual
SamSs Auto Security Accounts Manager
SCardSvr Manual Smart Card
Schedule Auto Task Scheduler
Secdrv Manual Secdrv
seclogon Auto Secondary Logon
SENS Auto System Event Notification
serenum Manual Serenum Filter Driver
Serial System Serial port driver
Sfloppy System
SharedAccess Auto Windows Firewall/Internet Connection Sharing (ICS)
ShellHWDetection Auto Shell Hardware Detection
Simbad Disabled
Sparrow Disabled
splitter Manual Microsoft Kernel Audio Splitter
Spooler Auto Print Spooler
sr Disabled System Restore Filter Driver
srservice Auto System Restore Service
Srv Manual Srv
SSDPSRV Manual SSDP Discovery Service
stisvc Manual Windows Image Acquisition (WIA)
swenum Manual Software Bus Driver
swmidi Manual Microsoft Kernel GS Wavetable Synthesizer
SwPrv Manual MS Software Shadow Copy Provider
symc810 Disabled
symc8xx Disabled
sym_hi Disabled
sym_u3 Disabled
sysaudio Manual Microsoft Kernel System Audio Device
SysmonLog Manual Performance Logs and Alerts
TapiSrv Manual Telephony
Tcpip System TCP/IP Protocol Driver
TDPIPE Manual
TDTCP Manual
TermDD System Terminal Device Driver
TermService Manual Terminal Services
Themes Auto Themes
TlntSvr Disabled Telnet
TosIde Disabled
TrkWks Auto Distributed Link Tracking Client
Udfs Disabled
ultra Disabled
UMWdf Auto Windows User Mode Driver Framework
Update Manual Microcode Update Driver
upnphost Manual Universal Plug and Play Device Host
UPS Manual Uninterruptible Power Supply
VgaSave System VGA Display Controller.
ViaIde Disabled
VolSnap Boot
VSS Manual Volume Shadow Copy
W32Time Auto Windows Time
Wanarp Manual Remote Access IP ARP Driver
WDICA Manual
wdmaud Manual Microsoft WINMM WDM Audio Compatibility Driver
WebClient Auto WebClient
winmgmt Auto Windows Management Instrumentation
Winsock Manual
WmdmPmSN Manual Portable Media Serial Number Service
Wmi Manual Windows Management Instrumentation Driver Extensions
WmiApSrv Manual WMI Performance Adapter
wscsvc Auto Security Center
wuauserv Auto Automatic Updates
WZCSVC Auto Wireless Zero Configuration
xmlprov Manual Network Provisioning Service

1 thought on “How to virtualize PC”

  1. This article is rather old science, since it took me more than a year to gather my notes and make a head and tail out of it.

    Lately, I discovered many new utilities automating this procedure emerged meanwhile. One of them is Microsoft System Center Virtual Machine Manager for example. If you believe doing things manually, that you could perform automatically, is a waste of time, I encourage you to explore the web and find the utility that does the job for you best.

Leave a Reply

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