Ultimatep2V: by Chris Huss and Mike Laverick
Ultimatep2V: by Chris Huss and Mike Laverick
using
Qui Hong’s FixVM-SCSI and NU2’s BartPE
&
Primary Contact:
[email protected]
Author Contacts:
[email protected]
[email protected]
Tested VMware Versions:
ESX 2.x
Technical Developer:
Qui Hong
Authors:
Chris Huss
Mike Laverick
Audience:
Recipe book style instructions suitable for even a “novice” user
Objective:
A step-by-step guide to creating a custom BartPE boot CD/ISO – used to clone a
physical machine and reconfigure the virtual machine. In short – Free P2V
Software Required:
Windows Server 2003 CD-ROM (Recommended)
Windows XP Professional with Service Pack 2
Symantec Ghost 8
Note:
Not all versions of Symantec Ghost may be supported or work with BartPE. You
might wish to investigate other cloning/copying techniques and plug-ins if this is
your situation.
This guide shows you how to generate all of these plug-ins and drivers manually
using the latest versions. Alternatively, you can download pre-configured plug-ins
from the UltimateP2V page.
Known Issues:
• Diskpart in Windows XP does not work correctly. Reboot after the clone
process if your BartPE disk is based on Windows XP
Ultimate-P2V using Qui Hong's FixVM-SCSI
Community Support Statement
• Both myself, Chris and Qui are very busy people – and much of our extra-
curricular work is done in our free-time. So please do not expect the same
level of support you would expect to enjoy from a vendor bought product
• Home Grown P2V Solutions are intended for those people who cannot
afford or justify purchasing a commercial P2V offering
• Commercially available products have features and drivers that add value
and the commercial tools are supported and updated to keep them
current. This tool is not intended to be used on production systems and if
they are—you proceed at your own risk. The authors of this paper also
feel that nothing replaces training and experience. You should work with
qualified engineers and consultants to ensure that production systems are
configured to best practices and to protect the integrity of the systems
• If after completing the P2V process, you find your virtual machine will not
boot – this might be due to stale hardware/software which is being
detected/loaded and then causes an error. You could find you have the
same errors using a commercial product (although many try to disable
devices/software which causes known issues).
• So try the P2V Forum on VMware’s website--you may get a faster and
richer set of responses from them
• Some things to try if your P2V Virtual Machine will not boot…
Document History
Version 1.3
• Removed reference to using Cybervyk’s inf file – not actually required to
make VMware “BusLogic” SCSI Driver work
Version 1.4
• Fixed the problem with the VMware Tools automatically starting
• Added limited beta support for Sherpya XPE
How does it work?
• BartPE is a boot CD which uses Windows XP or 2003 source code to give a
boot CD-ROM. It’s the ultimate replacement to the floppy boot disks of
years gone by – with a rich plethora of file system support, network
support and storage controller support and so on. It’s an open-source
project within which anyone can develop “plug-ins” to extended its
functionality
• We use a BartPE disc with drivers which allows us to clone a physical
machine to a virtual machine. Drivers are added to make virtual disks
addressable under BartPE
• Symantec Ghost is used to clone the boot disk of physical machine to
virtual machine’s virtual disk
• Qui Hong’s BartPE plug-in “injects” the appropriate driver to make the
virtual machine bootable after the cloning process has been completed
• Without it – the cloned virtual machine would give us a Blue Screen of
Death like this:
Building a Custom BartPE for P2V
Download and Install BartPE
Note:
• BartPE recommends you use Windows XP with Service Pack 2 as the
source for your boot disk. Service Pack 1 for Windows XP is minimum
requirement
• Chris and I would recommend using W2K3 instead.
• As you might recall, a Virtual Machine uses a virtual SCSI adapter,
either a BusLogic (Default for W2K) or LSILogic driver (Default for
W2K3).
• Windows XP has a built-in BusLogic driver not a LSILogic driver –
whereas Windows 2003 has a built-in LSILogic driver but not a
BusLogic driver.
• If you create a BartPE boot disk with Windows XP and run it inside a
Virtual Machine you will NOT be able to access your hard-drives
because there will be NO driver for the SCSI Controller. The only way
to make WinXP BartPE disk work is supplying a driver at boot time… or
by adding both the LSILogic Driver and VMware SCSI “BusLogic” driver
to the BartPE
• There are instructions which explain how to do this
• Whereas, if we use W2K3 as the source which contains an LSILogic
Driver – then the only storage driver you will need to add (as well as
ones for your physical machines) is the VMware SCSI “BusLogic” driver
• W2K3 works perfectly with Diskpart, whereas Windows XP does not –
and reboot is required after the cloning process to make the boot
partition accessible
• W2K3 works out of the box with any need to slipstream/integrate a
service pack
Note:
I installed BartPE to this path C:\Program Files\Pebuilder\
Adding Qui Hong’s “FixVM-SCSI” Plug-in
1. Download the ZIP file from the Software Required section at the top
of this document
2. Open the ZIP using your prefer zip utility, say WinZIP
Note:
This is a .flp file – a format like an ISO that represents an image of a
floppy disk. You can open the .flp file and extract the driver files using a
product like WinImage
C:\Program Files\Pebuilder\Drivers\Scsiadapter
Adding LSILogic Support (WinXP Only)
Note:
As mentioned earlier, if you use Windows Server 2003 as the basis of your BartPE
disc, it will have “built-in” driver for LSIlogic. If however, you use Windows
XP+SP2, you will need to add this driver to your BartPE disk. Fortunately, this is
very easy..
C:\program files\pebuilder\drivers\SCSIAdapter\lsilogic
Ghost32.exe
Ghostcdr.dll
Ghostexp.exe
GhostSrv.exe
Note:
You will generally find these files located at C:\program
files\Symantec\Ghost
2. Using Windows Explorer, copy these files to the workstation that has
the BartPE software installed to the following location:
C:\Program Files\Pebuilder\Plugin\Ghost8\Files\
Adding vmxnet Support (Optional)
Note:
• Vmxnet is VMware’s “native” network driver which is “optimized” for a
virtualised environment.
• Most boot CD's will not have support for this driver.
• For compatibility purposes, VMware created a driver called “vlance” which
emulates an AMD PC-NET Family adapter
• Vlance is the default, but if you choose vmxnet – you will not have
network support in the BartPE disk
• So this is not requirement, merely an optional component
Note:
This should mount the windows.iso which contains the files that make up
VMware Tools are located
C:\program files\pebuilder\drivers\Net
Note:
I rename the directories vmxnet-win2k and vmxnet-winnt just so I can
easily identify them. I wasn’t sure which folder to take – so I took both – it
doesn’t hurt.
Note:
If you download the Plug-in from Sherpya’s website, you will want the .cab
formats, not the zip files. The zip files are “developer” like versions of the
plug-ins.
3. Under the vmware directory, create a directory called files so the path
is:
C:\program files\pebuilder\plugin\vmware\files
Note:
This is where we will shortly copy the VMware Tools software.
4. From a working Windows Virtual machine, open a Remote Console
session
5. In the menu, choose Settings, Select Install VMware Tools
Note:
This should mount the windows.iso which contains the files that make up
VMware Tools are located
7. copy the contents to your workstation where you are building your
BartPE into the
Note:
The is no need to copy the 9x Files directory. I shared out the pefolder on
my workstation where I was building my BartPE disk – to ease the
movement of files.
Note:
To make VMware Tools start automatically, we use the “Start-Up” plug-in
BartPE. If you intend to use XPE (a plug-in shown later) then you may skip
this part, as it has own method of auto-starting services and applications
Note:
The exit closes the DOS Window down
[SourceDisksFiles]
; Redist
asycfilt.dll=2
comcat.dll=2
mfc42.dll=2
msvcp60.dll=2
msvcrt.dll=2
oleaut32.dll=2
olepro32.dll=2
stdole2.tlb=2
AutoRun_vmware.cmd=2
Adding Network Support Drivers for Physical Machines (Example)
Note:
• You may also wish this disc to offer network support on the Physical
Machine – to do this you may have to add drivers.
• For example there is no support for Intel Pro 1000 cards in the default
disc.
• Here’s how I added support for multiple Intel Pro 1000 cards on my Dell
1650’s:
Note:
These instructions would be very similar for any network card type –
say for example the BroadCom Network Cards which are popular on
some HP Proliant Servers.
1. Download from the Intel’s Website the Driver for Intel Pro
1000
2. Unzip the drivers, but cancel the message to install or create boot
disks
3. Navigate to the unzip location and PRO1000\WS03XP2K
4. Copy these files in the WS03XP2K directory to:
C:\Program Files\pebuilder\drivers\Net\IntePro1000\
Note:
IntelPro1000 is a directory I made – you can name the sub-directory off
\net anything you like.
Note:
You can use the same method to handle mass-storage device drivers.
At the end of this process – if you have added every driver and
plug-in (including the optionals), you should have directory
structure something like this… I have hidden some of the
directories in the plugin folder to make this screen capture easier
to see…
Removing BartPE Desktop Logo
Note:
• Some people have reported sluggish mouse responsiveness within the
BartPE environment.
• This can be significantly reduced by removing the desktop logo from the
background.
• This is very easy edit to a BartPE default inf file
; Set wallpaper
0x2, "Control Panel\desktop",
"WallPaper","%systemroot%\system32\bartpe.bmp"
; Set wallpaper
0x2, "Control Panel\desktop", "WallPaper", ""
Adding Support for the XPE Plug-in (Optional)
Note:
• XPE is a plug-in which adds the Windows Task Bar & Start Menu to BartPE
• It also enables the ability to run the mmc.exe for other tools under BartPE
• You can download the latest version of XPE from Sherpya’s Windows PE
Stuff
• XPE is NOT required to use Qui’s Fix-VMSCSI. It will add extra load to
your CD.
I choose to use:
Note:
Apparently, from a Microsoft’s perspective, your BartPE CD-ROM
constitutes a one license consumed. In other words they treat the BartPE
CD-ROM as if it was an installation. The path to your Windows source code
should be one directory above the i386 location.
Like so:
Note:
The VMware Plug-in will only be there if you installed the optional
component for VMware Tools support
Note:
After accepting the license agreement, there is then a lengthy log window
which shows you what BartPE is up to…
Burning your ISO File to a CD-ROM
Note:
• You can now take the ISO file and burn it to a CD-ROM for use in your
physical server.
Note:
If you added VMware Tools (Optional) to your build – you can start the
service now – by using Go, Run, net start vmtools
Note:
It is obviously much simpler if you can pick up IP address from a DHCP
server – which is what both Chris and I do. All you have to do if you're
using a DHCP server is keep on clicking OK to the Network dialog boxes
If on the other hand you prefer to use static addresses, this is how it is
done:
Choose Static IP Address (Manual) from the Network Profiles
Note:
If you are using the vmxnet driver and have installed the vmxnet drivers
inside your BartPE, the dialog box will look like this:
Peer To Peer Cloning (Copying Physical-2-Virtual)
Note:
• Historically, I’ve always cloned to a separate disk/partition or to a file
server – saving the file with the .gho extension. This because in the past
I’ve wanted to re-use that clone over-and-over again. If you still want to
do this you could. You can open a command prompt and map drive or use
BartPE GUI to map a network drive (System, Network, Map Network
Drive) if you wish…
• However, Chris put me on to a much more appropriate method which is
the Peer-to-Peer method. Where you clone directly from the physical
machine's disk to the virtual machine's virtual disk. It’s quicker and
requires fewer steps to complete!
• Chris also says “For me, ‘disk to disk’ has been the more successful
method verses “partition to partition”.
• VERY IMPORTANT:
Read this again – and understand it – before you end up with two blank
disks – and a physical machine in need of DR and backup tapes!!! ☺
Note:
If you are cloning a server with a non-standard drive letter layout – say
like something like Citrix server with it’s drive letters changed from C: D:
E: to M: N: E: You might find it useful to use Ghost32 with Force Disk
Signature Preserve Switch (-FDSP) instead. Otherwise, you won’t be
able to login or you will get ctxgina.dll error messages when the virtual
machine boots from its virtual disk.
10. In the Destination Drive Details – use this opportunity to resize the
partition if necessary.
11. At the physical machine, when you are presented with the Clone
Complete dialog box, click Restart Computer – and remove the CD-
ROM – to allow the physical machine to boot normally…
12. At the virtual machine, when your are presented with the Clone
Completed dialog box, click Continue – and close Ghost
Performing a System Reconfiguration of Virtual Machine with Qui Hong’s
Fix VMSCSI
• Now for the really clever bit…
• You are now ready to inject the LSILogic or VMware SCSI “BusLogic”
driver into the VM.
• Which driver you will use will depend very much on whether you have kept
VMware’s own defaults – or whether you have changed them.
• This guide assumes you sticking with the default SCSI driver for your
operating system.
• Although BartPE has helped us clone the physical disk to the virtual disk –
BartPE is not aware of the new disk – and will not have assigned a drive
letter to make it accessible. Normally, a reboot would fix this problem
– but we are lazy and don’t want to have to do anymore reboots than
strictly necessary.
• Warning:
Windows XP+SP2 has been shown to not support Diskpart without error.
and
Your only option if you use Windows XP as the basis of your BartPE disc is
to reboot.
• Windows 2003 does not appear to suffer from the same errors as above.☺
• We can use the Microsoft's DiskPart utility to make BartPE aware of the
disk/partition. If you want to learn more about this cute little tool see this
support article http://support.microsoft.com/kb/300415/en-us .
• Without this, the FIX-VMSCSI plug-in would not display the newly Ghosted
boot partition in its utility, as shown in this diagram here:
Note:
This runs the diskpart command on disk0, partition1 and assigns a drive
letter of c:
Depending on your OS and whether you have obeyed the defaults from
VMware choose:
Note:
Qui Hung’s plug-in will work if you have deviated from the default VMware
settings when you created your virtual machine. Notice also, that there
are options for V2P – however, currently only Compaq/HP Raid Controller
drivers are supported.
Post-Configuration Stages
• The next steps are up to you…
• Personally I would
1. Switch over to vmxnet
2. Install VMware Tools
3. Configure a static IP address
4. Remove Stale Software
5. Remote Stale Hardware
6. Change the ACPI Settings as appropriate – downgrade/upgrade
ACPI and HAL.DLL appropriate to Uni-Processor or Multi-
Processor VM
• These post-configuration stages are documented in the main P2V
Document from both VMware and in RTFM Education Guides.
• Additionally you may wish to look at scripting the above bulleted list.
Sample scripts are available on http://www.rtfm-ed.co.uk in the
White Papers section.