title: Weblogic is slow to start (11mins) under VM (VirtualBox and VMware)
body: <p><strong>(SOLVED! BY FAKING SYSTEM RANDOM GENERATOR, SEE BELOW)</strong></p>
  
  <p>I'm setting up a VM image for my dev/build team. Inside that VM a Weblogic domain should be running. I use Ububtu server distro, WLS 9.2MP3 + ALSB. </p>
  
  <p>Everything works OK, quite fast, but at the start time the WLS stops twice for a measurable amounts of time. Two stops in total amount to about 10 minutes delay. For tasks where deployment requires server restart it's very annoying. :-(</p>
  
  <p>Sleeping time is not constant, sometimes the server starts very fast, sometimes so-so, sometimes 10 minutes or more.</p>
  
  <p>Interesting that if I press Enter while looking at the stopped server, it wakes up much faster, sometimes after a few seconds. WLST (Weblogic Jython shell) is also hanging for quite a time when executed in VM. It doesn't react to Enter though.</p>
  
  <p><strong>Here must be some developers who run WLS with a VM. I wonder if others have the same problem? Was someone able to solve it?</strong></p>
  
  <p>Here's the server output (just for a case):</p>
  
  <pre><code>Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_12-b04)
  Java HotSpot(TM) Client VM (build 1.5.0_12-b04, mixed mode)
  Starting WLS with line:
  /shared2/beahome/jdk150_12/bin/java -client   -Xmx256m  -XX:MaxPermSize=128m  -Xverify:none  -da -Dplatform.home=/shared2/beahome/weblogic92
   -Dwls.home=/shared2/beahome/weblogic92/server -Dwli.home=/shared2/beahome/weblogic92/integration  -Dweblogic.management.discover=true  -Dwl
  w.iterativeDev= -Dwlw.testConsole= -Dwlw.logErrorsToConsole= -Dweblogic.ext.dirs=/shared2/beahome/patch_weblogic923/profiles/default/sysext_
  manifest_classpath -Dweblogic.management.username=admin -Dweblogic.management.password=wlsadmin -Dweblogic.Name=LOGMGR-admin -Djava.security
  .policy=/shared2/beahome/weblogic92/server/lib/weblogic.policy   weblogic.Server
  &lt;1-Apr-2010 12:47:22 o'clock PM GMT-05:00&gt; &lt;Notice&gt; &lt;WebLogicServer&gt; &lt;BEA-000395&gt; &lt;Following extensions directory contents added to the end
  of the classpath:
  /shared2/beahome/weblogic92/platform/lib/p13n/p13n-schemas.jar:/shared2/beahome/weblogic92/platform/lib/p13n/p13n_common.jar:/shared2/beahom
  e/weblogic92/platform/lib/p13n/p13n_system.jar:/shared2/beahome/weblogic92/platform/lib/wlp/netuix_common.jar:/shared2/beahome/weblogic92/pl
  atform/lib/wlp/netuix_schemas.jar:/shared2/beahome/weblogic92/platform/lib/wlp/netuix_system.jar:/shared2/beahome/weblogic92/platform/lib/wl
  p/wsrp-common.jar&gt;
  &lt;1-Apr-2010 12:47:22 o'clock PM GMT-05:00&gt; &lt;Info&gt; &lt;WebLogicServer&gt; &lt;BEA-000377&gt; &lt;Starting WebLogic Server with Java HotSpot(TM) Client VM Ve
  rsion 1.5.0_12-b04 from Sun Microsystems Inc.&gt;
  &lt;1-Apr-2010 12:47:23 o'clock PM GMT-05:00&gt; &lt;Info&gt; &lt;Management&gt; &lt;BEA-141107&gt; &lt;Version: WebLogic Server 9.2 MP3  Mon Mar 10 08:28:41 EDT 2008
  1096261 &gt;
  &lt;1-Apr-2010 12:47:25 o'clock PM GMT-05:00&gt; &lt;Info&gt; &lt;WebLogicServer&gt; &lt;BEA-000215&gt; &lt;Loaded License : /shared2/beahome/license.bea&gt;
  &lt;1-Apr-2010 12:47:25 o'clock PM GMT-05:00&gt; &lt;Notice&gt; &lt;WebLogicServer&gt; &lt;BEA-000365&gt; &lt;Server state changed to STARTING&gt;
  &lt;1-Apr-2010 12:47:25 o'clock PM GMT-05:00&gt; &lt;Info&gt; &lt;WorkManager&gt; &lt;BEA-002900&gt; &lt;Initializing self-tuning thread pool&gt;
  &lt;1-Apr-2010 12:47:25 o'clock PM GMT-05:00&gt; &lt;Notice&gt; &lt;Log Management&gt; &lt;BEA-170019&gt; &lt;The server log file /shared2/wldomains/beaadmd/LOGMGR/ser
  vers/LOGMGR-admin/logs/LOGMGR-admin.log is opened. All server side log events will be written to this file.&gt;
  </code></pre>
  
  <p>Here we have the first delay, up to 5 mins...</p>
  
  <pre><code>&lt;1-Apr-2010 12:53:21 o'clock PM GMT-05:00&gt; &lt;Notice&gt; &lt;Security&gt; &lt;BEA-090082&gt; &lt;Security initializing using security realm myrealm.&gt;
  &lt;1-Apr-2010 12:53:24 o'clock PM GMT-05:00&gt; &lt;Notice&gt; &lt;WebLogicServer&gt; &lt;BEA-000365&gt; &lt;Server state changed to STANDBY&gt;
  &lt;1-Apr-2010 12:53:24 o'clock PM GMT-05:00&gt; &lt;Notice&gt; &lt;WebLogicServer&gt; &lt;BEA-000365&gt; &lt;Server state changed to STARTING&gt;
  &lt;1-Apr-2010 12:53:25 o'clock PM GMT-05:00&gt; &lt;Notice&gt; &lt;Log Management&gt; &lt;BEA-170027&gt; &lt;The server initialized the domain log broadcaster success
  fully. Log messages will now be broadcasted to the domain log.&gt;
  &lt;1-Apr-2010 12:53:25 o'clock PM GMT-05:00&gt; &lt;Notice&gt; &lt;WebLogicServer&gt; &lt;BEA-000365&gt; &lt;Server state changed to ADMIN&gt;
  &lt;1-Apr-2010 12:53:25 o'clock PM GMT-05:00&gt; &lt;Notice&gt; &lt;WebLogicServer&gt; &lt;BEA-000365&gt; &lt;Server state changed to RESUMING&gt;
  &lt;1-Apr-2010 12:53:28 o'clock PM GMT-05:00&gt; &lt;Notice&gt; &lt;Security&gt; &lt;BEA-090171&gt; &lt;Loading the identity certificate and private key stored under t
  he alias adminuialias from the jks keystore file /shared2/wldomains/beaadmd/LOGMGR/CustomIdentity.jks.&gt;
  </code></pre>
  
  <p>And here is the second, again up to 5 mins.</p>
  
  <pre><code>&lt;1-Apr-2010 12:58:56 o'clock PM GMT-05:00&gt; &lt;Notice&gt; &lt;Security&gt; &lt;BEA-090169&gt; &lt;Loading trusted certificates from the jks keystore file /shared
  2/wldomains/beaadmd/LOGMGR/CustomTrust.jks.&gt;
  &lt;1-Apr-2010 12:58:57 o'clock PM GMT-05:00&gt; &lt;Notice&gt; &lt;Server&gt; &lt;BEA-002613&gt; &lt;Channel "DefaultSecure" is now listening on 192.168.56.102:7002 f
  or protocols iiops, t3s, ldaps, https.&gt;
  &lt;1-Apr-2010 12:58:57 o'clock PM GMT-05:00&gt; &lt;Notice&gt; &lt;Server&gt; &lt;BEA-002613&gt; &lt;Channel "Default" is now listening on 192.168.56.102:8012 for pro
  tocols iiop, t3, ldap, http.&gt;
  &lt;1-Apr-2010 12:58:57 o'clock PM GMT-05:00&gt; &lt;Notice&gt; &lt;WebLogicServer&gt; &lt;BEA-000331&gt; &lt;Started WebLogic Admin Server "LOGMGR-admin" for domain "
  LOGMGR" running in Development Mode&gt;
  &lt;1-Apr-2010 12:58:57 o'clock PM GMT-05:00&gt; &lt;Notice&gt; &lt;WebLogicServer&gt; &lt;BEA-000365&gt; &lt;Server state changed to RUNNING&gt;
  &lt;1-Apr-2010 12:58:57 o'clock PM GMT-05:00&gt; &lt;Notice&gt; &lt;WebLogicServer&gt; &lt;BEA-000360&gt; &lt;Server started in RUNNING mode&gt;
  </code></pre>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I think I've got the track: it must be the randon seed initialization. That may explain why generating keyboard events release the server. I've made the thread dump, and one thread is in runnable state, but waiting:</p>
  
  <pre><code>"[STANDBY] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'" daemon prio=1 tid=0x0a7b06e8 nid=0xeda runnable [0x728a500
  0..0x728a6d80]
          at java.io.FileInputStream.readBytes(Native Method)
          at java.io.FileInputStream.read(FileInputStream.java:194)
          at sun.security.provider.NativePRNG$RandomIO.readFully(NativePRNG.java:185)
          at sun.security.provider.NativePRNG$RandomIO.implGenerateSeed(NativePRNG.java:202)
          - locked &lt;0x7d928c78&gt; (a java.lang.Object)
          at sun.security.provider.NativePRNG$RandomIO.access$300(NativePRNG.java:108)
          at sun.security.provider.NativePRNG.engineGenerateSeed(NativePRNG.java:102)
          at java.security.SecureRandom.generateSeed(SecureRandom.java:475)
          at weblogic.security.AbstractRandomData.ensureInittedAndSeeded(AbstractRandomData.java:83)
  </code></pre>