- Community Home
- >
- Servers and Operating Systems
- >
- HPE ProLiant
- >
- Server Management - Systems Insight Manager
- >
- Helpful script for P2V cleanup
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-16-2007 04:44 AM
тАО05-16-2007 04:44 AM
Helpful script for P2V cleanup
I originally posted this on the VMware forums, and I personally don't use HP to do P2Vs, but I thought some of you might find this useful:
@ECHO OFF
ECHO HP Physcial to Virtual Cleaner Utility (Version 02-14-2007)
ECHO Author: Nelson Kaeppel
ECHO.
ECHO ************************************************************
ECHO * This batch file semi-automates the removal of management *
ECHO * agents and drivers from a virtual server that has been *
ECHO * virtualized from an HP or Compaq physical server using *
ECHO * P2V Helper, VMware Converter, or similar software. This *
ECHO * batch file assumes relatively newer versions of the HP *
ECHO * support software, and may not completely remove all the *
ECHO * software for older versions. *
ECHO ************************************************************
ECHO.
ECHO Note - The VMware Converter may leave some HP files corrupt.
ECHO You may want to run a "chkdisk" on the system drive
ECHO to fix any bad files before running this batch file.
ECHO.
ECHO USE AT YOUR OWN RISK!!!
ECHO.
ECHO *****************************
ECHO Type "ctrl-c" to quit now!!!
ECHO *****************************
ECHO.
ECHO USE AT YOUR OWN RISK!!!
Pause
cls
ECHO Removing the "HP Array Configuration Utility"...
"%PROGRAMFILES%\Compaq\Cpqacuxe\hpuninst.exe" /s
ECHO Removing the "HP Array Configuration Utility CLI"...
"%PROGRAMFILES%\Compaq\Hpacucli\hpuninst.exe" /s
ECHO Removing the "HP Array Diagnostic Utility"...
"%PROGRAMFILES%\Compaq\hpadu\hpuninst.exe" /s
ECHO Removing the "HP Insight Diagnostics Online Edition for Windows"...
If NOT Exist "%PROGRAMFILES%\InstallShield Installation Information\{3754251E-100C-47D4-AB86-DC34047EE3C4}\setup.exe" GOTO NEWDIAG
RunDll32 C:\PROGRA~1\COMMON~1\INSTAL~1\engine\6\INTEL3~1\Ctor.dll,LaunchSetup "C:\Program Files\InstallShield Installation Information\{3754251E-100C-47D4-AB86-DC34047EE3C4}\setup.exe" -l0x9 UNINSTALL
GOTO HPAGENTS
:NEWDIAG
MsiExec.exe /X{04DDF575-93A4-4682-A4F1-ABD29ECDFE04} /quiet
:HPAGENTS
ECHO Removing the "HP Insight Management Agents"...
IF NOT Exist %SYSTEMROOT%\system32\CPQMgmt\aguninst.exe GOTO NEWAGENTS
%SYSTEMROOT%\system32\CPQMgmt\aguninst.exe /s
GOTO CHECKMP
:NEWAGENTS
MsiExec.exe /X{DFB7A687-8111-4CC2-B175-9431708F7902} /quiet
:CHECKMP
ECHO Removing the "HP Lights-Out Online Configuration Utility"...
If NOT Exist "%PROGRAMFILES%\HP\hponcfg" GOTO CHECKIML
If NOT Exist "%PROGRAMFILES%\HP\hponcfg\hpuninst.exe" GOTO NEWMP
"%PROGRAMFILES%\HP\hponcfg\hpuninst.exe" /s
GOTO CHECKIML
:NEWMP
MsiExec.exe /X{F8C40C34-FF8A-4A4D-8FA4-8DFF4503A61C} /quiet
:CHECKIML
ECHO Removing the "HP ProLiant Integrated Management Log Viewer"...
If NOT Exist "%PROGRAMFILES%\Compaq\Cpqimlv\hpuninst.exe" GOTO NEWIML
"%PROGRAMFILES%\Compaq\Cpqimlv\hpuninst.exe" /s
GOTO CHECKLPC
:NEWIML
MsiExec.exe /X{B03AAFA3-07B7-4D93-8ECD-12B977BF861E} /quiet
:CHECKLPC
IF NOT Exist "%PROGRAMFILES%\Compaq\CpqLpcc\hpuninst.exe" GOTO NOLPC
ECHO Removing the "HP ProLiant Legacy Port Configuration Component"...
"%PROGRAMFILES%\Compaq\CpqLpcc\hpuninst.exe" /s
:NOLPC
If NOT Exist "%PROGRAMFILEs%\HPWBEM\IPMI" GOTO NOIPMI
ECHO Removing the "HP ProLiant IPMI WMI Provider"...
MsiExec.exe /X{DF6412FA-0E25-4B23-9E80-116C061B4FD1} /quiet
MsiExec.exe /X{6BD49497-AFE5-43D4-9B7B-AAD7B405E110} /quiet
:NOIPMI
ECHO Removing the "HP ProLiant Remote Monitor Service"...
If NOT Exist %SYSTEMROOT%\system32\hpuninst.exe GOTO NEWRMS
%SYSTEMROOT%\system32\hpuninst.exe /s
GOTO CHECKDP
:NEWRMS
MsiExec.exe /X{0DEE841C-14D1-4497-8204-31B04370FDB7} /quiet
:CHECKDP
If NOT Exist C:\hp\hpsmh\data\htdocs\DataProtection\UnInstall.exe GOTO NODATAPROTECT
ECHO Removing the "HP Protect Your Data"...
C:\hp\hpsmh\data\htdocs\DataProtection\UnInstall.exe >Nul: 2>&1
:NODATAPROTECT
ECHO Removing the "HP Version Control Agent"...
IF NOT Exist C:\hp\hpsmh\data\cgi-bin\vcagent\vcaremov.exe GOTO NEWVCA
C:\hp\hpsmh\data\cgi-bin\vcagent\vcaremov.exe /silent C:\hp\hpsmh\data\cgi-bin\vcagent\vcagent.inf
GOTO CHECKSMH
:NEWVCA
MsiExec.exe /X{5A5F45AE-0250-4C34-9D89-F10BDDEE665F} /quiet
:CHECKSMH
ECHO Removing the "HP System Management Homepage"...
RunDll32 C:\PROGRA~1\COMMON~1\INSTAL~1\PROFES~1\RunTime\11\00\Intel32\Ctor.dll,LaunchSetup "C:\Program Files\InstallShield Installation Information\{3C4DF0FD-95CF-4F7B-A816-97CEF616948F}\setup.exe" -l0x9 -removeonly
If NOT Exist "%PROGRAMFILES%\VMware\VMware Converter\InstMsi.exe" GOTO NOCONVERTER
ECHO Removing the "VMware Converter"...
MsiExec.exe /X{A4D04B1A-DCF1-4C8C-8FFE-07D145812742} /quiet
:NOCONVERTER
ECHO Removing the "HP Network Congifuration Utility"...
snetcfg.exe -v -u cq_cpqteam >Nul: 2>&1
ECHO Removing registry keys for services without a "Removal Option"...
regedit /s p2vcleaner.reg
ECHO Deleting old HP and Compaq directories that are not needed...
rd /s/q c:\hp >Nul: 2>&1
rd /s/q c:\compaq >Nul: 2>&1
rd /s/q c:\cpqsystem >Nul: 2>&1
rd /s/q "%PROGRAMFILES%\compaq" >Nul: 2>&1
rd /s/q "%PROGRAMFILES%\hp" >Nul: 2>&1
rd /s/q %SYSTEMROOT%\system32\CPQMgmt >Nul: 2>&1
ECHO.
ECHO All software has been removed...please reboot.
PAUSE
You will also need to create a REG file that must be in the same directory and called "p2vcleaner.reg":
Windows Registry Editor Version 5.00
[-HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\sysdown\]
[-HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\sysmgmt\]
Finally, also in the same directory, you will need the snetcfg.exe utility. This can be downloaded from http://www.jsifaq.com/docs/files/76011/snetcfg.zip
So what I do is copy all three files (batch file, reg file, and snetcfg) to a temp location on the server. Run the P2V, and then after the conversion run this batch file on the new VM to clean all the HP junk off the VM. I do this AFTER the P2V instead of before (on the physical server) so that if I need to go back to the physical server, it will still have all the HP stuff on it.
Hope this helps some folks out there.
Nelson
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-16-2007 06:47 AM
тАО05-16-2007 06:47 AM
Re: Helpful script for P2V cleanup
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-16-2007 06:56 AM
тАО05-16-2007 06:56 AM
Re: Helpful script for P2V cleanup
Thanks for the update.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-16-2007 08:52 AM
тАО05-16-2007 08:52 AM
Re: Helpful script for P2V cleanup
What do you use to do the P2V's?
I've tried the new VMware Converter but that seemed to leave a lot of services from the agents.
I might give this a go along with vmware convertor.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-16-2007 08:59 AM
тАО05-16-2007 08:59 AM
Re: Helpful script for P2V cleanup
My script takes care of "automating" the removal of these. You can always remove this stuff by hand, but this script automates it.
Apparently HP has this built into the tool they sell - but I have never used it, so I was not aware of that.
Nelson
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-16-2007 07:43 PM
тАО05-16-2007 07:43 PM
Re: Helpful script for P2V cleanup
I have used HP's P2V up until now, but on the most recent Server I tried it would just BSOD and reboot at startup - it's W2K3 so it's not the know W2K BSOD issue with the ntoskrnl. Also it would BSOD and then immediately reboot so I had no way of catching the error.
But, the VMware Converter plus your script gave me a nice clean conversion.
I'd like to award points for it but...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-17-2007 02:51 AM
тАО05-17-2007 02:51 AM
Re: Helpful script for P2V cleanup
Nelson
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-19-2007 01:21 PM
тАО05-19-2007 01:21 PM
Re: Helpful script for P2V cleanup
After that your still left with the SMH and various other utilities, so running it after an HP P2V gave me an even cleaner virtual server.
With the servers I converted using VMware Converter and then using the script there's a remaining advanced ilo management driver that's been left behind. I'll dig a bit deeper when I'm back in the office and if I can enhance the script I'll post the updates.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-21-2007 01:59 AM
тАО05-21-2007 01:59 AM
Re: Helpful script for P2V cleanup
Thanks
Nelson
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-21-2007 12:06 PM
тАО05-21-2007 12:06 PM
Re: Helpful script for P2V cleanup
Great script Nelson, there are many that could use this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-22-2007 01:02 AM
тАО05-22-2007 01:02 AM
Re: Helpful script for P2V cleanup
Nelson