Wednesday 16 May 2012

upgrade-profile fail com.ibm.websphere.management.exception.InvalidConfigDataTypeException


Running Configuration Engine task 'upgrade-profile'
propertiesPath is ConfigEngine_temp.prop
rootDir is .
Executing native2ascii with native encoding 'Cp1252': ConfigEngine_temp.prop_ ->
 ConfigEngine_temp_ascii.prop_
Native2ascii execution was successful!
Loading system properties from ConfigEngine_temp_ascii.prop_
ConfigEngine: setting system property JAVA_HOME=C:/IBM/WebSphere/AppServer/java
ConfigEngine: setting system property local.cell=DefaultNode
ConfigEngine: setting system property was.root=C:/IBM/WebSphere/AppServer
ConfigEngine: setting system property NodeName=DefaultNode
ConfigEngine: setting system property local.node=DefaultNode
ConfigEngine: setting system property ws.ext.dirs=C:/IBM/WebSphere/AppServer/jav
a/lib;C:/IBM/WebSphere/AppServer/classes;C:/IBM/WebSphere/AppServer/lib;C:/IBM/W
ebSphere/AppServer/installedChannels;C:/IBM/WebSphere/AppServer/lib/ext;C:/IBM/W
ebSphere/AppServer/web/help;C:/IBM/WebSphere/AppServer/deploytool/itp/plugins/co
m.ibm.etools.ejbdeploy/runtime;./lib;./shared/app
ConfigEngine: setting system property jvmArgFor64bit=-D64bit.args=none
ConfigEngine: setting system property was.install.root=C:/IBM/WebSphere/AppServe
r
ConfigEngine: setting system property cfg.trace=./log/ConfigTrace.log
ConfigEngine: setting system property CellName=DefaultNode
ConfigEngine: setting system property server.root=C:/IBM/WebSphere/AppServer
ConfigEngine: setting system property was.repository.root=C:/IBM/WebSphere/wp_pr
ofile/config
RegistrySynchronized: false
Registry out of sync with WebSphere... synchronizing...
[05/15/12 12:19:14.028 EDT] ssl.default.password.in.use.CWPKI0041W
[05/15/12 12:19:14.372 EDT] ssl.disable.url.hostname.verification.CWPKI0027I
[05/15/12 12:19:14.388 EDT] Client code attempting to load security configuratio
n
[05/15/12 12:19:15.373 EDT] Client code attempting to load security configuratio
n
Created admin client: com.ibm.ws.management.AdminClientImpl@1ea41ea4
Created config Service Proxy: com.ibm.websphere.management.configservice.ConfigS
erviceProxy@6f686f68
CELL: DefaultNode
NODE: DefaultNode
com.ibm.websphere.management.exception.InvalidConfigDataTypeException: ADMG0007E
: The configuration data type CellCompRegistryCollection is not valid.
        at com.ibm.ws.management.configservice.TypeRegistry.getMetaObject(TypeRe
gistry.java:166)



Solution:
Following IBM Technote helped and resolved the issue.
http://www-01.ibm.com/support/docview.wss?uid=swg21501183

A WebGroup/Virtual Host to handle /wps/config/ has not been defined. upgrade-profile task fail

I was migrating from IBM Websphere Portal v6.x to v7.x and encounter following issue in upgrade-profile task.


action-modify-HTTP-Inbound-Channel-timeout:
Fri May 11 17:04:13 EDT 2012
[xmlaccess] EJPXB0006I: Connecting to URL http://localhost:10040/wps/config/
[xmlaccess] EJPXB0004I: Writing output file C:\IBM\WebSphere\wp_profile\ConfigEn
gine\config\work\deployedWebAppXmlAccess-PTF\preExistingWebApps.xml
[xmlaccess] EJPXB0009E: Could not connect to portal.
[xmlaccess] java.net.ConnectException: Connection refused: connect
[xmlaccess] EJPXB0016E: An error occurred on the client: Connection refused: con
nect
**********************************************************************
Migration extension 'deploy-apps' execution failed
**********************************************************************

BUILD FAILED
C:\IBM\WEBSPH~1\PORTAL~1\installer\wp.migration.framework\config\includes\mig_cf
g.xml:84: The following error occurred while executing this line:
C:\IBM\WEBSPH~1\PORTAL~1\installer\wp.migration.framework\config\includes\mig_cf
g.xml:1011: The following error occurred while executing this line:
C:\IBM\WebSphere\wp_profile\ConfigEngine\config\actions\upgrade_cfg.xml:100: EJP
XB0016E: An error occurred on the client: Connection refused: connect

Total time: 39 minutes 48 seconds
FAILURE_LOG_DIR=null
isIseries currently set to: null
uploading registry
Created admin client: com.ibm.ws.management.AdminClientImpl@7b6c7b6c
Created config Service Proxy: com.ibm.websphere.management.configservice.ConfigS
erviceProxy@240024
CELL: DefaultNode
NODE: DefaultNode
Websphere:_Websphere_Config_Data_Type=Registry,_Websphere_Config_Data_Id=cells/D
efaultNode|registry.xml#Registry_1247599550767,_WEBSPHERE_CONFIG_SESSION=anonymo
us1336770255141










Output in C:\IBM\WebSphere\wp_profile\ConfigEngine\config\work\deployedWebAppXmlAccess-PTF\preExistingWebApps.xml:

<H1>SRVE0255E: A WebGroup/Virtual Host to handle /wps/config/ has not been defined.</H1><BR><H3>SRVE0255E: A WebGroup/Virtual Host to handle localhost:<port> has not been defined.</H3><BR><I>IBM WebSphere Application Server</I>

Solution:

Applied the CF12 on IBM Websphere Portal and executed upgradeConfigEngine.bat task again and re executed the upgrade-profile task



com.ibm.websphere.management.filetransfer.client.TransferFailedException: 404 Not Found upgrade-profile

I was running upgrade-profile task for migrating IBM Websphere Portal server 6.x to 7.x I had following error :
  [wsadmin] WASX7017E: Exception received while running file "C:\IBM\WebSphere\wp_profile\ConfigEngine\config\work\was\curJaclScript.jacl"; exception information: com.ibm.websphere.management.filetransfer.client.TransferFailedException: 404 Not Found (for: C:\Users\WASI-A~1\AppData\Local\Temp\2\app137385f0f7e.ear).


Solution:

On Source server :

1) Make sure all application servers are stopped.

2) Locate the systemApps.xml file under the source installation. It is located at <WAS_Install>\wp_profile\config\cells\<cellname>\nodes\<nodename>

3) Edit this file and copy the following statement from under the servername=WebSphere_Portal entry.

<deployedApplications>${WAS_INSTALL_ROOT}/systemApps/filetransfer.ear</deployedApplications>

4). Close this file


On Target server :

1) Locate the systemApps.xml file under the migrated V7x installation.
It is located at <WAS_Install>\wp_profile\config\cells\<cellname>\nodes\<nodename>

2) Edit this file and paste the copied statement under the
servername=WebSphere_Portal entry as shown below.

<serverEntries xmi:id="ServerEntry_1318609547618"
serverDisplayName="WebSphere_Portal"
serverName="WebSphere_Portal"
serverType="APPLICATION_SERVER">

<deployedApplications>${WAS_INSTALL_ROOT}/systemApps/wimwmm.ear</deployedApplications>

<deployedApplications>${WAS_INSTALL_ROOT}/systemApps/filetransfer.ear</deployedApplications>
</serverEntries>

3) Save and close this file
4) Started the WebSphere_Portal server

Now re-run the upgrade-profile task.









Details of problem:

C:\IBM\WebSphere\PortalServer\ui\wp.mashup.widgets.deploy\config\includes\wp.mwidgets.deploy_cfg.xml


update-registry-property-create-ear-applyMIGStatic-wp.theme.dojo:
Target finished: update-registry-property-create-ear-applyMIGStatic-wp.theme.dojo
Thu May 10 16:09:27 EDT 2012
Target started: action-create-ear-wp.mashup.widgets.deploy

action-create-ear-wp.mashup.widgets.deploy:
[wplc-create-ear] Task parameters:
[wplc-create-ear]   Global attributes:
[wplc-create-ear]     cell="DefaultNode"
[wplc-create-ear]     engineinstalllocation="C:/IBM/WebSphere/wp_profile/ConfigEngine"
[wplc-create-ear]     osarch="amd64"
[wplc-create-ear]     pathseparator=";"
[wplc-create-ear]     node="DefaultNode"
[wplc-create-ear]     server="WebSphere_Portal"
[wplc-create-ear]   Instance attributes (Set 1 of 1):
[wplc-create-ear]     cluster= *** NOT_SPECIFIED ***
[wplc-create-ear]     startingweight="50"
[wplc-create-ear]     appname="feedReader"
[wplc-create-ear]     options
[wplc-create-ear]       -installed.ear.destination="${WPS_HOME}/ui/wp.mashup.widgets.deploy/installedApps"
[wplc-create-ear]       -defaultbinding.force
[wplc-create-ear]       -zeroEarCopy
[wplc-create-ear]       -usedefaultbindings
[wplc-create-ear]       -CtxRootForWebMod=[""FeedReader" feedReader.war,WEB-INF/web.xml /mccfeedReader"]
[wplc-create-ear]       -defaultbinding.virtual.host="default_host"
[wplc-create-ear]     attribute=[ *** NONE_SPECIFIED *** ]
[wplc-create-ear]     classloadermode= *** NOT_SPECIFIED ***
[wplc-create-ear]     earfile="C:/IBM/WEBSPH~1/PORTAL~1/ui/wp.mashup.widgets.deploy/installedApps/feedReader.ear"
[wplc-create-ear]     contextroot= *** NOT_SPECIFIED ***
[wplc-create-ear] false
[wplc-create-ear] Task parameters:
[wplc-create-ear]   Global attributes:
[wplc-create-ear]     cell="DefaultNode"
[wplc-create-ear]     engineinstalllocation="C:/IBM/WebSphere/wp_profile/ConfigEngine"
[wplc-create-ear]     osarch="amd64"
[wplc-create-ear]     pathseparator=";"
[wplc-create-ear]     node="DefaultNode"
[wplc-create-ear]     server="WebSphere_Portal"
[wplc-create-ear]   Instance attributes (Set 1 of 1):
[wplc-create-ear]     cluster= *** NOT_SPECIFIED ***
[wplc-create-ear]     startingweight="50"
[wplc-create-ear]     appname="eventExplorer"
[wplc-create-ear]     options
[wplc-create-ear]       -installed.ear.destination="${WPS_HOME}/ui/wp.mashup.widgets.deploy/installedApps"
[wplc-create-ear]       -defaultbinding.force
[wplc-create-ear]       -zeroEarCopy
[wplc-create-ear]       -usedefaultbindings
[wplc-create-ear]       -CtxRootForWebMod=[""EventExplorer" eventExplorer.war,WEB-INF/web.xml /mcceventExplorer"]
[wplc-create-ear]       -defaultbinding.virtual.host="default_host"
[wplc-create-ear]     attribute=[ *** NONE_SPECIFIED *** ]
[wplc-create-ear]     classloadermode= *** NOT_SPECIFIED ***
[wplc-create-ear]     earfile="C:/IBM/WEBSPH~1/PORTAL~1/ui/wp.mashup.widgets.deploy/installedApps/eventExplorer.ear"
[wplc-create-ear]     contextroot= *** NOT_SPECIFIED ***
[wplc-create-ear] false
[wplc-create-ear] Task parameters:
[wplc-create-ear]   Global attributes:
[wplc-create-ear]     cell="DefaultNode"
[wplc-create-ear]     engineinstalllocation="C:/IBM/WebSphere/wp_profile/ConfigEngine"
[wplc-create-ear]     osarch="amd64"
[wplc-create-ear]     pathseparator=";"
[wplc-create-ear]     node="DefaultNode"
[wplc-create-ear]     server="WebSphere_Portal"
[wplc-create-ear]   Instance attributes (Set 1 of 1):
[wplc-create-ear]     cluster= *** NOT_SPECIFIED ***
[wplc-create-ear]     startingweight="50"
[wplc-create-ear]     appname="websiteDisplayer"
[wplc-create-ear]     options
[wplc-create-ear]       -installed.ear.destination="${WPS_HOME}/ui/wp.mashup.widgets.deploy/installedApps"
[wplc-create-ear]       -defaultbinding.force
[wplc-create-ear]       -zeroEarCopy
[wplc-create-ear]       -usedefaultbindings
[wplc-create-ear]       -CtxRootForWebMod=[""WebsiteDisplayer" websiteDisplayer_v201.war,WEB-INF/web.xml /mccwebsiteDisplayer"]
[wplc-create-ear]       -defaultbinding.virtual.host="default_host"
[wplc-create-ear]     attribute=[ *** NONE_SPECIFIED *** ]
[wplc-create-ear]     classloadermode= *** NOT_SPECIFIED ***
[wplc-create-ear]     earfile="C:/IBM/WEBSPH~1/PORTAL~1/ui/wp.mashup.widgets.deploy/installedApps/websiteDisplayer.ear"
[wplc-create-ear]     contextroot= *** NOT_SPECIFIED ***
[wplc-create-ear] false
Target finished: action-create-ear-wp.mashup.widgets.deploy
Thu May 10 16:09:27 EDT 2012
Target started: action-create-ear-applyMIGStatic-wp.mashup.widgets.deploy

action-create-ear-applyMIGStatic-wp.mashup.widgets.deploy:
Target finished: action-create-ear-applyMIGStatic-wp.mashup.widgets.deploy
Thu May 10 16:09:27 EDT 2012
Target started: update-registry-property-create-ear-applyMIGStatic-wp.mashup.widgets.deploy

update-registry-property-create-ear-applyMIGStatic-wp.mashup.widgets.deploy:
Target finished: update-registry-property-create-ear-applyMIGStatic-wp.mashup.widgets.deploy
Thu May 10 16:09:27 EDT 2012
Target started: consolidate-config-extension-create-ear-applyMIG7000,-applyMIGStatic

consolidate-config-extension-create-ear-applyMIG7000,-applyMIGStatic:
Target finished: consolidate-config-extension-create-ear-applyMIG7000,-applyMIGStatic
Target finished: create-ear
Executing final configuration for consolidated config
[wplc-consolidate-wsadmin] Task parameters:
[wplc-consolidate-wsadmin]   Global attributes:
true
  [wsadmin] WASX7209I: Connected to process "WebSphere_Portal" on node DefaultNode using SOAP connector;  The type of process is: UnManagedProcess
  [wsadmin] AppName JavaContentRepository
  [wsadmin] Enterprise application JavaContentRepository does not exist.
  [wsadmin] AppName WSPolicyManager
  [wsadmin] Ear File C:/IBM/WEBSPH~1/PORTAL~1/ap/wp.policy.webservices/ear.prod/WSPolicyManager.ear
  [wsadmin] Install Options -update -appname "WSPolicyManager" 
  [wsadmin] WASX7017E: Exception received while running file "C:\IBM\WebSphere\wp_profile\ConfigEngine\config\work\was\curJaclScript.jacl"; exception information: com.ibm.websphere.management.filetransfer.client.TransferFailedException: 404 Not Found (for: C:\Users\WASI-A~1\AppData\Local\Temp\2\app137385f0f7e.ear).

C:\IBM\WebSphere\wp_profile\ConfigEngine\config\includes\apply_PTF.xml:59: Java returned: 105
    at org.apache.tools.ant.taskdefs.Java.execute(Java.java:87)
    at com.ibm.websphere.ant.tasks.WsAdmin.execute(WsAdmin.java:406)
    at com.ibm.wplc.deploy.tasks.AbstractBaseWsAdminWrapperTask.executeTask(AbstractBaseWsAdminWrapperTask.java:290)
    at com.ibm.wplc.deploy.tasks.ConsolidateWsAdminTask.execute(ConsolidateWsAdminTask.java:34)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
    at org.apache.tools.ant.Task.perform(Task.java:364)
    at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:64)
    at com.ibm.wps.config.If.execute(If.java:67)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
    at org.apache.tools.ant.Task.perform(Task.java:364)
    at org.apache.tools.ant.Target.execute(Target.java:341)
    at org.apache.tools.ant.Target.performTasks(Target.java:369)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
    at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:37)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
    at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382)
    at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
    at org.apache.tools.ant.Task.perform(Task.java:364)
    at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:64)
    at com.ibm.wps.config.If.execute(If.java:77)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
    at org.apache.tools.ant.Task.perform(Task.java:364)
    at org.apache.tools.ant.Target.execute(Target.java:341)
    at org.apache.tools.ant.Target.performTasks(Target.java:369)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
    at org.apache.tools.ant.Main.runBuild(Main.java:668)
    at org.apache.tools.ant.Main.startAnt(Main.java:187)
    at org.apache.tools.ant.Main.start(Main.java:150)
    at com.ibm.wps.config.ConfigEngine.process(ConfigEngine.java:819)
    at com.ibm.wps.config.ConfigEngine.main(ConfigEngine.java:247)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
    at java.lang.reflect.Method.invoke(Method.java:611)
    at com.ibm.ws.bootstrap.WSLauncher.main(WSLauncher.java:267)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
    at java.lang.reflect.Method.invoke(Method.java:611)
    at com.ibm.wps.config.launch.ConfigEngineLauncher.process(ConfigEngineLauncher.java:269)
    at com.ibm.wps.config.launch.ConfigEngineLauncher.main(ConfigEngineLauncher.java:311)
C:\IBM\WebSphere\wp_profile\ConfigEngine\config\includes\apply_PTF.xml:59: Java returned: 105

Resume migration upgrade-profile task

You can resume the task from a particular point of failure. This will save your a lot of time if you are failing on the task and re executing it again and again after doing fixes.

Re-run the upgrade-profile with the flag
-Dwp.migration.framework.resume=<last failing task name>

like :
-Dwp.migration.framework.resume=deploy-apps

upgrade-profile BUILD FAILED create-resource-environment-provider-custom-property

I upgraded the CF level to CF12 on IBM WebSphere Portal 7.0.0.2  after WASPostUpgrade and database validation and connection task.
But the ConfigEngine.bat upgrade-profile  task failed on the following line:


create-resource-environment-provider-custom-property:
Tue May 15 14:28:53 EDT 2012
     [echo] ,people.api/common,wp.search.webscanner
     [echo] ,prereq.wcm
     [null] !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!   ERROR !!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!
     [null] The extension create-resource-environment-provider-custom-property i
s registered for component prereq.wcm but the implementation does not exist.
     [null] The component prereq.wcm must implement the target action-create-res
ource-environment-provider-custom-property-applyMIGStatic-prereq.wcm
**********************************************************************
Migration extension 'create-resource-environment-provider-custom-property' execu
tion failed
**********************************************************************

BUILD FAILED
C:\IBM\WEBSPH~1\PORTAL~1\installer\wp.migration.framework\config\includes\mig_cf
g.xml:85: The following error occurred while executing this line:
C:\IBM\WebSphere\wp_profile\ConfigEngine\config\actions\adv_cfg_mgr.xml:1789: Co
mponent prereq.wcm is missing implementation target action-create-resource-envir
onment-provider-custom-property-applyMIGStatic-prereq.wcm

Total time: 19 minutes 59 seconds
FAILURE_LOG_DIR=null
isIseries currently set to: null
uploading registry
CELL: DefaultNode
NODE: DefaultNode
Websphere:_Websphere_Config_Data_Type=Registry,_Websphere_Config_Data_Id=cells/D
efaultNode|registry.xml#Registry_1247599550767,_WEBSPHERE_CONFIG_SESSION=anonymo
us1337106535621
 

update-registry-sync-property:
Tue May 15 14:28:56 EDT 2012
     [echo] updated RegistrySynchronized in file wkplc.properties with value: tr
ue
Return Value: 1



Solution:
After upgrading to CF12 we need to run upgradeConfigEngine.bat again. This will resolve the issue.

Tuesday 8 May 2012

WASPostUpgrade.bat hangs for long time MIGR0344I

Migration task: WASPostUpgrade.bat hangs for a long time on the following line:

MIGR0344I: Processing configuration file C:\IBM\WebSphere\wp_profile\ConfigEngine\was\config\repository\metadata_wkplc.xml.

Solution:

Important Note: Please, take a backup of your backupDirectory and only delete files which are safe to delete like i mentioned below.


Check the traces in the log folder and check on which line it is stuck. it stuck on temporary files which were retrieved from the older environment. You can delete those files. Copy the path from traces files delete those files on which the task is hanging. Re execute the task. Keep doing this until the task is finished successfully.

The files on which this task stuck are like: wstemp folder/temp folder/search collection indexes/jcr indexes/Big logs/Config engine logs and traces.
In my case I deleted these things and the task ran smooth.




Friday 4 May 2012

Windows could not start the IBM HTTP Server

I installed IBM HTTP Server and tried to start the IBM HTTP Server service. But got following error:

"Windows could not start the IBM HTTP Server on local computer".

Solution:

The failure was due to port 80 which was not available. As IIS (Microsoft Web Server) was running and it was holding port 80 so IBM HTTP Server was unable to start. I uninstalled IIS and restarted machine it resolved the issue.
Note: If your HTTP Server is not a fresh installation then it might be due to some syntax error in the configuration files.


Wednesday 2 May 2012

Register Web Sphere Portal as windows service


We can register websphere portal / nodeagent as windows service using WASService tool given in Websphere application server under the "bin" folder.




Execute following command from c:\ibm\websphere\appserver\bin


FOR PORTAL SERVER:
WASService.exe -add nodeagent -serverName nodeagent -profilePath C:\IBM\WebSphere\wp_profile -wasHome C:\IBM\WebSphere\AppServer -startType automatic

FOR NODEAGENT:
WASService.exe -add WebSphere_Portal -serverName WebSphere_Portal -profilePath C:\IBM\WebSphere\wp_profile -wasHome C:\IBM\WebSphere\AppServer\ -startType automatic

Tuesday 1 May 2012

WPmigrate.bat Build fail

I had a problem in preparing the supplementary files for before WASPreUpgrade task.
After preparing the suppdir as said in document the WPmigrate.bat task fails with Build Failed message.
This was due to incorrect supplementary files prepared after generating PortalRemMigPkg.zip.
Here is the solution:


First of all copy the contents of the WebSphere Application Server Network Deployment Supplements Disc 2 for your operating system to supp_dir where supp_dir is an existing directory on the source portal server.

Now Copy the PortalMigration folder from PortalRemMigPkg.zip to the suppdir.

Copy the jar files from PortalRemMigPkg.zip\migration\plugins into plugins folder under suppdir\migration\plugins (You don't need to copy the whole migration folder. this folder already exists there in the suppdir as it was part of Supplements you got for IBM setup. So, you just need to copy the jar files)




IBM WebSphere Portal Search Collection with Virutal Portals


Integrating IBM WebSphere Portal Search with IBM Workplace Web Content Management

Description for the confusion we had in search collections:
When we login to the portal admin site we have default portal, Virtual Portal 1 and Virtual Portal 2. WCM library is shared across all the portals, but if we see Search Collections for Search Management portlet of Virtual Portal 1, it would not show Virtual Portal 2 Collection. And, if you edit the Site in WCM Admin, it would show the collection is missing if the Virtual Portal 2 Collection is being used in WCM.
Crawler for both the collections would be working fine irrespective of what collection is being used in WCM site, even once the content Source is generated and crawler is working, the collection can be removed from the WCM site, it would not affect anything.
The Search portlet uses the collection from the physical path that needs to be set in Search and Brows Portlet’s parameter.


Default Search Collection for VirtualPortal1: VirtualPortal1Collection
C:\IBM\WebSphere\wp_profile\PortalServer\collections\VirtualPortal1Collection
Default Search Collection for VirtualPortal2: VirtualPortal2Collection
C:\IBM\WebSphere\wp_profile\PortalServer\collections\VirtualPortal2Collection


Setting up Search Service and collection