Skip Headers
Oracle® Fusion Middleware WebLogic Server on JRockit Virtual Edition Installation and Configuration Guide
11g Release 1 (10.3.4)

Part Number E15219-03
Go to Documentation Home
Home
Go to Table of Contents
Contents
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

3 Deploying WebLogic Virtual Machines

These sections explain how to use the Image Tool to create new single-server domain in the VM image, migrate a physical, multi-server domain to the VM image, or transform an entire, physical, multi-server WebLogic Server environment into the VM image.

3.1 Deploying WebLogic Server VMs On Oracle VM Server

Depending on how you intend to use WebLogic Server on JRockit VE, you can use the Image Tool to create new single-server domain in the VM image, using either the template's default "Admin Server" names or using names of your choosing. You can also migrate a physical multi-server domain to VM image, or transform an entire, physical, multi-server WebLogic Server environment into a VM image.

After the configured VM image is uploaded and started on Oracle VM, you can use the Administration Console or WLST online to deploy and manage applications and managed servers in a domain, much like you would in a physical WebLogic Server environment.

Caution! As a security precaution, VM templates containing WebLogic Server domains should not be used as templates to clone new domains.

Default Administration Server Domain Name and Password

After initially starting the VM in your Oracle VM environment, which causes the new domain to be created, for security purposes Oracle recommends modifying the Java command-line in the wlsve.xml file to remove the settings for the username and password you specified. Instead, the boot.properties file should be used for username and password retrieval upon server startup. For more information, refer to Section 6.2, "Starting a WebLogic Server VM Domain With the boot.properties File".

To log into the Administration Server, use the username and password values specified in the <java-arguments> section of the wlsve.xml file, which is explained in Section 3.2, "Deploying the Base VM Image With a New Single-Server Domain.".

Production vs. Development Mode

Newly created domains are always created in Development mode. And although full support for WebLogic Server on JRockit VE is only provided when running in Production mode, you may want to experiment with the product while using Development mode, which allows you to, for example, use the autodeploy feature. You can change the domain to Production mode using the Administration Console or WLST. Production mode is enabled in the console in the domain configuration section. For more information, see "Development vs. Production Mode Default Tuning Values" in Performance and Tuning for Oracle WebLogic Server.

Directly Editing the wlsve.xml Configuration versus Using the Image Tool Commands

The WebLogic Server VM image configuration tasks in this section focus on configuring a VM image for the first time, and, therefore, use the extraction/injection method for updating the image's wlsve.xml configuration file with a text editor. However, the Image Tool commands can be used for all these tasks as well, without having to extract the configuration file, which is particularly useful for updating non-running, configured VM images.

3.2 Deploying the Base VM Image With a New Single-Server Domain

On your development machine, you can use the Image Tool to create a new, single-server WebLogic Server 11g Release 10.3.4 domain in the VM image. This will require updating the wlsve.xml file, which represents the configuration file for the virtual image.

Best Practice Tip: The WebLogic Server image template represents a WebLogic Server VM instance; however, a default domain is not included in the installation package. To simplify the domain creation process, the wlsve.xml configuration file in the VM image has placeholders for a new domain to be created under the /application/user_projects/domains/wlsve_domain/ directory, with an Administration Server name of "WlsveAdmin" and a domain name of "wlsve_domain." This way, you can use the Image Tool to quickly create a new single-server domain in the VM image, so you can experiment with the product while using Development mode, which allows you to, for example, use the autodeploy feature, using either the default names or names of your choosing.

  1. From the directory where you unzipped the WebLogic Server on JRockit VE package, use the following Image Tool command to extract a copy of the wlsve.xml configuration file from the original VM image:

    $java -jar wlsveimagetool.jar -r vm.cfg get config wlsve.xml
    

    Here are the default settings in the wlsve.xml file:

    <jrockitve-imagetool-config
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="jrockitve-imagetool-config.xsd" version="5.1">
    <jrockitve-config memory="1024" cpus="1">
       <storage>
         <disks>
           <disk id="root" size="1024 MB"/>
         </disks>
         <mounts>
           <mount>
             <mount-point>/</mount-point>
             <disk>root</disk>
           </mount>
         </mounts>
       </storage>
       <vm-name>wlsve_domain_WlsveAdmin</vm-name>
       <working-dir>/application/user_projects/domains/wlsve_domain</working-dir>
       <java-arguments>
       -cp $JAVA_HOME/lib/tools.jar:/jrockitve/lib/common.jar:
       /application/patch_wls1034/profiles/default/sys_manifest_classpath/
       weblogic_patch.jar:/application/wlserver_10.3/server/lib/weblogic.jar
       -Dweblogic.Name=WlsveAdmin -Dweblogic.Domain=wlsve_domain weblogic.Server
       </java-arguments>
       <network>
         <nics>
           <nic type="bridged"/>
         </nics>
       </network>
       <locale-data>
         <locale>en_US</locale>
         <timezone>America/New_York</timezone>
         <encoding>ISO-8859-1</encoding>
       </locale-data>
     </jrockitve-config>
    </jrockitve-imagetool-config>
    
  2. Using a text editor, update the working-dir tag in the wlsve.xml file to point the virtual image to the new domain you will be using. For example:

    <working-dir>/application/user_projects/domains/domain_name</working-dir>
    

    where domain_name represents the name of the WebLogic Server domain (for example, mywlsve_domain).

    Tip: You can use the Image Tool to create new single-server domain in the VM image outside the default /application directory with a name of your choice. For more information, see Section 5.7, "Creating a Root Domain Directory Other Then the Default "/application" Domain Directory."

  3. With the wlsve.xml file open in your text editor, update the <java-arguments> section for the -Dweblogic.Name, -Dweblogic.Domain, -Dweblogic.management.username, and -Dweblogic.managment.password arguments to specify the server name, domain name, and username/password for the new domain. You also need to add the -Dweblogic.management.GenerateDefaultConfig=true argument to create the new domain upon booting the VM, as shown in the following example:

    -Dweblogic.Name=adminServerName
    -Dweblogic.Domain=domainName
    -Dweblogic.management.username=username
    -Dweblogic.management.password=password
    -Dweblogic.management.GenerateDefaultConfig=true
    

    where adminServerName is the name of the Administration Server (for example, WlsveAdmin), domainName represents the name of the WebLogic Server domain (for example, wlsve_domain), and username and password are the user name and password for the domain.

  4. Update the vm-name tag in the wlsve.xml file to the name of your virtual machine.

    <vm-name>wlsve-name</vm-name>
    

    This name represents the name of the WebLogic Server VM seen by the Oracle VM frameworks and must be unique.

  5. If your environment requires static IP addresses, which is recommended in virtualized environments, you need to update the network settings in the wlsve.xml configuration file; specifically, the network information of the virtual host where the WebLogic Server virtual machine will be running must be added, including:

    • DNS server(s) and IP address

    • IP address for the virtual host

    • Gateway

    • Mask

    An updated <network> section in the wlsve.xml configuration file should look like this:

    <network>
       <dns>
         <server-order>
           <server ip="17.11.10.2"/>
         </server-order>
       <lookup-order>
         <name suffix="us.oracle.com"/>
       </lookup-order>
       </dns>
       <nics>
         <nic type="bridged">
           <ip>17.22.20.20</ip>
           <netmask>255.255.255.0</netmask>
           <gateway>17.22.20.1</gateway>
           <mac>12:ab:34:cd:56:ef</mac>
         </nic>
       </nics>
    </network>
    

    Note: If any <nic> network tag is not specified, the hypervisor will attempt to retrieve any unspecified network configuration using DHCP, if available.

    If your network does use DHCP, you do not need to update the network settings.

    Tip: When working in a virtualized environment, Oracle recommends using static IPs for virtual machines and letting DHCP handle the other network parameters. This makes it easier to find your server and is required when working with clusters. Please work with your network administrator and have them configure the DHCP server to lock an IP number to your specific MAC address. For more information, see "Creating a Guest Using a Template" in the Oracle VM Server User's Guide.

  6. Use the Image Tool to inject the updated wlsve.xml file inside the VM image with the following command:

    $java -jar wlsveimagetool.jar -r vm.cfg set config wlsve.xml
    
  7. Transfer the VM image to your Oracle VM environment, and then start the virtual machine, as described in Table 1-1, "Roadmap for Starting and Running WebLogic Server VMs on Oracle VM".

    For more detailed directions on how to deploy, register, and start a virtual machine on Oracle VM, see the Oracle VM Server Documentation.

  8. Starting the virtual machine automatically creates a new single-server domain with the name that you specified in the Java arguments.

    To connect to the Administration Server using the Administration Console:

    1. From a browser, connect to the server address at this URL:

      http://virtual.host.ip.address:7001/console
      

      where virtual.host.ip.address is the IP address assigned to your virtual machine

    2. When prompted for your credentials, enter the username and password that you specified in the Java arguments in the wlsve.xml file.

      Once you are logged in to WebLogic Server, you can change these credentials. For more information, see Section 6.2, "Starting a WebLogic Server VM Domain With the boot.properties File."

  9. For instructions on configuring the SSH/WebLogic Server security integration startup class in the newly created domain, refer to Section 4.2, "Accessing Running Virtual Machines Using SSH.".

  10. You can use the Administration Console on the running Administration Server VM to add any Managed Server VMs to your domain. For more information, see Section 5.1, "Adding Managed Servers to a Domain on a Running Administration Server VM."

3.3 Migrating a Physical, Multi-server Domain to a VM Image

On your development machine, you can use the Image Tool to migrate a physical WebLogic Server 11g Release 10.3.4 domain to a WebLogic Server VM image. This will require updating the wlsve.xml file, which represents the configuration file for the virtual image.

Note:

Using the Image Tool for physical-to-virtual domain migrations is not supported on Windows platforms. Windows users should instead use a Linux machine for physical-to-virtual domain migrations.
  1. On your development machine, install WebLogic Server 11g Release 10.3.4 into an MW_Home directory. You can create a MW_Home directory named /application/ to match the default MW_Home directory in the image template, or you can create a MW_Home using a name of your choice.

  2. Use the Configuration Wizard Create to create a WebLogic Server domain in your MW_HOME directory.

    You can also migrate a physical domain into the VM image outside the default /application directory, using a name of your choice. See Section 5.7, "Creating a Root Domain Directory Other Then the Default "/application" Domain Directory."

  3. Use the WebLogic Server pack and unpack commands to migrate the domain from the source directory on the development machine to the target directory on the machine where you will be packaging up your VM image. The pack and unpack commands are available in the /common/bin subdirectory of the product installation directory.

    1. Use the pack command to create a snapshot "template" of the domain in one simple step.

    2. Use the unpack command to recreate the domain in the directory on the machine where you will be packaging up your VM image.

    For more information about the pack and unpack commands, see Creating Templates and Domains Using the Pack and Unpack Commands.

  4. Access the migrated domain using the WLST readDomain('/path/to/domain') command, and then update the domain's configuration file (config.xml), as follows:

    For more information about using WLST, see the Oracle WebLogic Server Scripting Tool user guide.

    Important! In most circumstances, you should not use a text editor or other non-Oracle tools to modify a domain's configuration document. Instead, use the Administration Console, WLST, or one of the other tools described in the "Overview of Oracle WebLogic Server System Administration" in the Introduction to Oracle WebLogic Server.

  5. Use the Image Tool to inject the unpacked and updated domain into the VM image.

  6. From the directory where you unzipped the WebLogic Server on JRockit VE package, use the Image Tool to either create a new wlsve.xml configuration file or extract a copy of a wlsve.xml file from the original VM image:

    • To create a new wlsve.xml file:

      $java -jar wlsveimagetool.jar -c wlsve.xml <vm-name> 
      

      where vm-name is the name of the virtual image.

    • To extract a copy of the wlsve.xml file:

      $java -jar wlsveimagetool.jar -r vm.cfg get config wlsve.xml
      
  7. Point the virtual image to the domain you will be using by updating the <working-directory> tag in the wlsve.xml file. For example:

    <working-dir>/application/user_projects/domains/wlsve_domain</working-dir>
    
  8. Update the <java-arguments> tag in the wlsve.xml file by specifying the –cp argument with the CLASSPATH, server name, and the server access credentials. The following example shows the Java arguments that should be explicitly set for an Administration Server before booting the virtual machine.

    -cp $JAVA_HOME/lib/tools.jar:/jrockitve/lib/common.jar:
    /application/patch_wls1034/profiles/default/sys_manifest_classpath/
    weblogic_patch.jar:/application/wlserver_10.3/server/lib/weblogic.jar
    -Dweblogic.Name=adminServerName
    -Dweblogic.Domain=domainName weblogic.Server
    

    where domainName represents the name of the WebLogic Server domain (for example, wlsve_domain) and adminServerName is the name of the Administration Server (for example, WlsveAdminServer).

    Note: The CLASSPATH includes all existing WebLogic Server referenced JARs created by the Configuration Wizard startup scripts, except any JAR used by the Configuration Wizard or Pointbase. You can get the complete CLASSPATH list by starting the Administration Server using the startWeblogic.sh script on the development machine.

  9. If your environment requires static IP addresses, which is recommended in virtualized environments, you need to update the network settings in the wlsve.xml file; specifically, the configuration file must have the same IP address that used when you created the physical domain using Configuration Wizard (Step 2) or updated using WLST (Step 4).

    The other network information must match that of the virtual host where the WebLogic Server VM will be running must be added, including:

    • DNS server(s) and IP address

    • IP address for the virtual host

    • Gateway

    • Mask

    An updated <network> section in the wlsve.xml file should look similar to this example:

    <network>
       <dns>
         <server-order>
           <server ip="17.11.10.2"/>
         </server-order>
       <lookup-order>
         <name suffix="us.oracle.com"/>
       </lookup-order>
       </dns>
       <nics>
         <nic type="bridged">
           <ip>17.22.20.20</ip>
           <netmask>255.255.255.0</netmask>
           <gateway>17.22.20.1</gateway>
           <mac>12:ab:34:cd:56:ef</mac>
         </nic>
       </nics>
    </network>
    

    Note: If any <nic> network tag is not specified, the hypervisor will attempt to retrieve any unspecified network configuration using DHCP, if available.

    If your network does use DHCP, you do not need to update the network settings.

    Tip: When working in a virtualized environment, Oracle recommends using static IPs for virtual machines and letting DHCP handle the other network parameters. This makes it easier to find your server and is required when working with clusters. Please work with your network administrator and have them configure the DHCP server to lock an IP number to your specific MAC address. For more information, see "Creating a Guest Using a Template" in the Oracle VM Server User's Guide.

  10. If necessary, update the disk size, memory amount, and number of CPUs needed for the virtual image.

  11. For each new virtual machine in a domain, you must update the vm-name tag for the virtual image in the wlsve.xml file.

    <vm-name>wlsve-name</vm-name>
    

    This name represents the name of the WebLogic Server VM seen by the Oracle VM frameworks and must be unique.

  12. Use the Image Tool to inject the updated wlsve.xml file inside the VM image with the following command:

    $java -jar wlsveimagetool.jar -r vm.cfg set config wlsve.xml
    
  13. Transfer the VM image to your Oracle VM environment, and then start the virtual machine, as described in Table 1-1, "Roadmap for Starting and Running WebLogic Server VMs on Oracle VM".

    For more detailed directions on how to deploy, register, and start a virtual machine on Oracle VM, see the Oracle VM Server Documentation.

  14. If you created Manage Servers in your domain with the Configuration Wizard (see step 2), then repeat steps 6–12 for each Managed Server template image in the domain.

  15. Starting the WebLogic Server VM starts an Administration Server. To connect to the Administration Server using the Administration Console:

    1. From a browser, connect to the server address at this URL:

      http://virtual.host.ip.address:7001/console
      

      where virtual.host.ip.address is the IP address assigned to your virtual machine

    2. When prompted for your credentials, enter the username and password that you specified when you created the domain using the Configuration Wizard.

      Once you are logged in to WebLogic Server, you can change these credentials. For more information, see Section 6.2, "Starting a WebLogic Server VM Domain With the boot.properties File."

  16. You can use the Administration Console on the running Administration Server VM to add any Managed Server VMs to your domain. For more information, see Section 5.1, "Adding Managed Servers to a Domain on a Running Administration Server VM."

  17. After you have added Managed Server VMs to your domain, you can also use the Administration Console to create a cluster to add the Managed Server VMs to. for more information, see Section 5.2, "Creating a Virtual WebLogic Server Cluster."

3.4 Transforming a Physical WebLogic Server Environment Into a Virtual Machine

On your development machine, you can use the Image Tool to transform a physical, Unix-based, multi-server WebLogic Server 11g Release 10.3.4 environment into a WebLogic Server VM. This will require updating the wlsve.xml file, which represents the configuration file for the virtual image.

Notes:

Physical-to-virtual domain migrations are not supported on Windows platforms. Users should instead use a Unix-based physical WebLogic Server installation for physical-to-virtual domain migrations.

Oracle does not support directly editing the wlsve.xml configuration file, and instead recommends using the corresponding Image Tool commands.

  1. On your development machine, install WebLogic Server 11g Release 10.3.4 into a MW_Home directory. You can create a MW_Home directory named /application/ to match the default MW_Home directory in the image template, or you can create a MW_Home using a name of your choice.

  2. Use the Configuration Wizard Create to create a WebLogic Server domain in your MW_HOME directory.

  3. From the directory where you unzipped the WebLogic Server on JRockit VE package, use the Image Tool to either create a new wlsve.xml configuration file or extract a copy of a wlsve.xml file from the original VM image:

    To create a new wlsve.xml file:

    $java -jar wlsveimagetool.jar -c wlsve.xml <vm-name> 
    

    where vm-name is the name of the virtual image.

    To extract a copy of the wlsve.xml file:

    $java -jar wlsveimagetool.jar -r vm.cfg get config wlsve.xml
    
  4. Using a text editor, update the <jrockitve-filesystem-imports> tag in the wlsve.xml file to copy files from the location where WebLogic Server has been installed in the physical file system to the virtual file system. For example:

    <jrockitve-filesystem-imports>
       <copy from="/scratch/user/WLS-PS3/*" todir="/scratch/user/WLS-PS3/"/>
    </jrockitve-filesystem-imports>
    

    For more information about the <jrockitve-filesystem-imports> tag, see the User's Guide for Oracle JRockit Virtual Edition

  5. Extract the jrockitve.bin file from the downloaded virtual image (system.img) and point the virtual image to this file by updating the wlsve.xml file, as follows:

    1. To access the jrockitve.bin file, disassemble the system.img file using the following command:

      java -jar wlsveimagetool.jar -d vm.cfg output_dir
      
    2. Point the virtual image to the jrockitve.bin file by updating the <jrockitve-binary-url> tag in the wlsve.xml file. For example:

      <jrockitve-binary-url>file:../jrockitve.bin</jrockitve-binary-url>
      

    Note: If you do not specify this element, when the Image Tool assembles the application, it looks for the jrockitve.bin file in the directory in which the configuration XML file resides.

  6. Point the virtual image to the domain you will be using by updating the <working-directory> tag in the wlsve.xml file. For example:

    <working-dir>/scratch/user/WLS-PS3/user_projects/domains/wlsve_domain</working-dir>
    
  7. Update the <java-arguments> tag in the wlsve.xml file by specifying the –cp argument with the CLASSPATH, server name, and the server access credentials. The following example shows the Java arguments that should be explicitly set for an Administration Server before booting the virtual machine.

    -cp $JAVA_HOME/lib/tools.jar:/jrockitve/lib/common.jar:
    /scratch/user/WLS-PS3/patch_wls1034/profiles/default/sys_manifest_classpath
    /weblogic_patch.jar:/scratch/user/WLS-PS3/wlserver_10.3/server
    /lib/weblogic.jar
    -Dweblogic.management.username=username
    -Dweblogic.management.password=password
    -Dweblogic.Name=adminServerName
    -Dweblogic.Domain=domainName weblogic.Server
    

    where domainName represents the name of the WebLogic Server domain (for example, base_domain) and adminServerName is the name of the Administration Server (for example, AdminServer).

    Note: The CLASSPATH includes all existing WebLogic Server referenced JARs created by the Configuration Wizard startup scripts, except any JAR used by the Configuration Wizard or Pointbase. You can get the complete CLASSPATH list by starting the Administration Server using the startWeblogic.sh script on the development machine.

  8. If your environment requires static IP addresses, which is recommended in virtualized environments, you need to update the network settings in the wlsve.xml file; specifically, the configuration file must have the same IP address that used when you created the physical domain using the Configuration Wizard in Step 2.

    The other network information must match that of the virtual host where the WebLogic Server VM will be running must be added, including:

    • DNS server(s) and IP address

    • IP address for the virtual host

    • Gateway

    • Mask

    An updated <network> section in the wlsve.xml file should look similar to this example:

    <network>
       <dns>
         <server-order>
           <server ip="17.11.10.2"/>
         </server-order>
       <lookup-order>
         <name suffix="us.oracle.com"/>
       </lookup-order>
       </dns>
       <nics>
         <nic type="bridged">
           <ip>17.22.20.20</ip>
           <netmask>255.255.255.0</netmask>
           <gateway>17.22.20.1</gateway>
           <mac>12:ab:34:cd:56:ef</mac>
         </nic>
       </nics>
    </network>
    

    Note: If any <nic> network tag is not specified, the hypervisor will attempt to retrieve any unspecified network configuration using DHCP, if available.

    If your network does use DHCP, you do not need to update the network settings.

    Tip: When working in a virtualized environment, Oracle recommends using static IPs for virtual machines and letting DHCP handle the other network parameters. This makes it easier to find your server and is required when working with clusters. Please work with your network administrator and have them configure the DHCP server to lock an IP number to your specific MAC address. For more information, see "Creating a Guest Using a Template" in the Oracle VM Server User's Guide.

  9. If necessary, update the wlsve.xml file with the disk size, memory amount, and number of CPUs needed for the virtual image.

  10. For each new virtual machine in a domain, you must update the vm-name tag for the virtual image in the wlsve.xml file.

    <vm-name>wlsve-name</vm-name>
    

    This name represents the name of the WebLogic Server VM seen by the Oracle VM frameworks and must be unique.

  11. Use the Image Tool to create the P2V virtual machine by using the following command:

    $java -jar wlsveimagetool.jar -a wlsve.xml <output_dir>/
    

    where <output_dir>/ is the directory where the WebLogic Server VM will be created and stored.

    Important! WebLogic Server must not be running while creating the virtual machine.

    The output of this command is two files: system.img and vm.cfg. The vm.cfg file is used by Oracle VM to start up the image and holds a reference to the absolute path of the system.img on the target Oracle VM machine.

  12. Transfer the VM image to your Oracle VM environment, and then start the virtual machine, as described in Table 1-1, "Roadmap for Starting and Running WebLogic Server VMs on Oracle VM".

    For more detailed directions on how to deploy, register, and start a virtual machine on Oracle VM, see the Oracle VM Server Documentation.

  13. Starting the WebLogic Server VM starts an Administration Server. To connect to the Administration Server using the Administration Console:

    1. From a browser, connect to the server address at this URL:

      http://virtual.host.ip.address:7001/console
      

      where virtual.host.ip.address is the IP address assigned to your virtual machine

    2. When prompted for your credentials, enter the username and password that you specified when you created the domain using the Configuration Wizard.

      Once you are logged in to WebLogic Server, you can change these credentials. For more information, see Section 6.2, "Starting a WebLogic Server VM Domain With the boot.properties File."

  14. You can use the Administration Console on the running Administration Server VM to add any Managed Server VMs to your domain. For more information, see Section 5.1, "Adding Managed Servers to a Domain on a Running Administration Server VM."

  15. After you have added Managed Server VMs to your domain, you can also use the Administration Console to create a cluster to add the Managed Server VMs to. for more information, see Section 5.2, "Creating a Virtual WebLogic Server Cluster."