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

5 Managing WebLogic Virtual Machines

These sections explain how to manage WebLogic Server VM s running on Oracle VM, in both running and non-running mode, as described in the following sections.

5.1 Adding Managed Servers to a Domain on a Running Administration Server VM

On your development machine, you can use the original WebLogic Server image template image as a base to make the desired number of copies of VM images, and then use the Image Tool to modify each VM image copy to correspond to each Managed Server in your domain, before uploading them to your Oracle VM environment.

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

  1. From your production machine, use the Administration Console to access the online VM running the Administration Server domain. Open a browser and enter the following URL:

    http://admin.server.ip.address:7001/console
    

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

  2. From the Administration Console, add the desired number of Managed Servers to your domain.

  3. Create and add a Machine for each Managed Server in order for the VMM Node Manager client to be able to manage them while deployed on Oracle VM.

    1. Navigate to the Domain > Environment > Machines page.

    2. On the General tab, click New.

    3. Provide a name for the new Machine, select Virtual for the Machine OS, and then click Next.

    4. On the Virtual Manager tab, define the Virtual Manager properties for the Machine:

      Table 5-1 Virtual Manager Tab Properties

      Property Definition

      Type

      The VMM Node Manage client type: either VMM (Insecure) or VMMS (Secure).

      Listen Address

      The host name or IP address where the VMM Node Manager client listens for connection requests.

      Listen Port

      The port where the Oracle VM Manager listens for connection requests (either Secure or inSecure).

      Adapter

      Defaults to OracleVM(2.2.1), which is the only supported adapter.

      User

      User name use by the VMM Node Manager client.

      Password/Confirm Password

      Password used by the VMM Node Manager client.


    5. Click Save.

    6. Return to the Managed Server page and add the Machine to the Managed Server.

    7. Repeat this step for each Managed Server in the domain.

  4. Configure health monitoring capability for each Managed Server in the domain to improve reliability and availability of each server:

    1. Navigate to the Domain > Environment > Servers page.

    2. Select a server from the Summary of Servers table to open the Settings for Servers page, and then select the Health Monitoring tab.

    3. Select the Auto Restart check box so the VMM Node Manager client can automatically restart the server if it crashes or goes down unexpectedly.

    4. In the Max Restarts Within Interval field, specify the number of times the VMM Node Manager client can restart the server.

    5. In the Restart Delay Seconds field, specify the number of seconds the VMM Node Manager client should wait before restarting the server.

    6. Click Save.

    Note: Such restarts only relate to server health state checks that WebLogic Servers performs and not to external Oracle VM actions, such as xm destroy.

  5. Using the original WebLogic Server VM image as a base, make the desired number of copies of VM images that will represent your virtual Managed Servers.

  6. Use the Image Tool to configure these VM image copies to correspond to each Managed Server, as follows:

    1. Update the <java-arguments> to start up the Managed Servers on the virtual machine.

      $java -jar wlsveimagetool.jar -r vm.cfg set java-arguments <new arguments>
      

      The new arguments must include the domain name, the Managed Server name, the username and password, and the Administration Server it connects to:

      -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.management.username=username
      -Dweblogic.management.password=password
      -Dweblogic.Domain=domainName
      -Dweblogic.Name=managedServerName
      -Dweblogic.management.server=admin.server.ip.address:7001 weblogic.Server
      

      where admin.server.ip.address is the IP address assigned to your virtual machine, and username and password are the user name and password for the Administration Server.

    2. Update the vm-name for each added Managed Server.

      $java -jar wlsveimagetool.jar -r vm.cfg set vm-name <new vm-name>
      

      Each VM image requires a different name, which represents the name of the WebLogic Server virtual machine seen by the management frameworks.

      Tip: To more easily manage your VM's using the VMM Node Manager client, Oracle suggests following the naming convention for Virtual Machine Name, which is <domain_name>_<Server_Name>. However, if you need to change the VM name to something else, you can use either WLST to set the virtualMachineName attribute on the MachineMBean, or you can use the Administration Console to modify the Virtual Machine Name field on the Server Settings > Configuration tab (under Advanced entries).

    3. If your network is not using DHCP, modify the network configuration parameters in the wlsve.xml for each Managed Server, as explained in Step 2 of Section 3.2, "Deploying the Base VM Image With a New Single-Server Domain".

    4. Repeat these steps as necessary for each Managed Server VM image.

  7. Transfer the Managed Server VMs to an Oracle VM server under the /OVS/running_pool/<vm-name>/ directory.

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

  8. In order to manage your Administration and Managed Server VM images using the VMM Node Manager client, you must import the images to the Oracle VM Manager using the Oracle VM Manager console.

    1. Log in to the OVM Manager.

    2. Select the Resources tab.

    3. Open the Virtual Machine Images page and click Import.

    4. Click the Select from Server Pool (Discover and register) option, and then click Next.

    5. Complete the following options:

      – Select the Server Pool Name.

      – Select Virtual Machine Image Name from the selected server pool.

      – Enable High Availability.

      – Select the Operating System.

      – Complete the remaining VM username and password parameters.

    6. Click Next, and then click Confirm.

    7. After the VM import status completes (the status will be Pending), select the VM name and click Approve.

      Return to the Virtual Machine Images page, and verify that the imported VM's name appears in list of VM images.

  9. After all the Managed Servers VMs have been started, they will show up in the Administration Console as running, where you can now manage them as described in Section 5.3, "Managing Virtual Servers on Oracle VM."

5.2 Creating a Virtual WebLogic Server Cluster

After adding your Managed Server VMs to a domain that is running Administration Server VM, you can create a cluster, and then add your Managed Server VMs to it.

  1. From your development machine, open a browser and enter the following URL to access the online VM running the Administration Server domain.

    http://admin.server.ip.address:7001/console
    

    where admin.server.ip.address is the IP address assigned to your Administration Server virtual machine.

  2. From the Administration Console, navigate to the <domain> -> Environment -> Servers -> Summary of Servers page.

  3. Select the Control tab, and then stop the running Managed Server VMs.

  4. Navigate to the <domain> -> Environment -> Clusters page.

  5. Create a new cluster by providing the following information:

    • Name: demoCluster

    • Messaging Mode: Multicast

    • Multicast Address: 239.192.0.0 (default)

    • Multicast Port: 7050

  6. Navigate to the demoCluster -> Configuration -> Servers page.

  7. Add the Managed Servers to the cluster.

  8. Restart the Managed Server VMs, as described in Table 1-1, "Roadmap for Starting and Running WebLogic Server VMs on Oracle VM".

  9. Navigate to the <domain> -> Environment -> Servers page. Note that the Managed Servers are available as members of the demoCluster.

5.3 Managing Virtual Servers on Oracle VM

After you have added Managed Servers to your virtual domain, you can then manage their life cycle using either the Administration Console or WLST.

5.3.1 Managing Running Virtual Servers With the Administration Console

You can use the Administration Console to change the state of the Manage Servers in a running WebLogic Server domain.

  1. From your development machine, open a browser and enter the following URL to access the online VM running the Administration Server domain.

    http://admin.server.ip.address:7001/console
    

    where admin.server.ip.address is the IP address assigned to your Administration Server virtual machine.

  2. From the Administration Console, navigate to the <domain> -> Environment -> Servers -> Summary of Servers page.

  3. Select the Control tab.

  4. In the Server Status table, select the check box next to the name of the Managed Server(s) VM that you want to control, and then select one of the following options:

    • Start – Sends a request to the VMM Node Manager client to start the selected servers.

    • Stop – Sends a request to the VMM Node Manager client to stop the selected servers.

    • Suspend– Sends a request to the VMM Node Manager client to suspend the selected servers (either "When work completes" or "Force Suspend Now").

    • Shutdown – Sends a request to the VMM Node Manager client to shut down the selected servers (either "When work completes" or "Force Shutdown Now").

    • Restart SSL – Restarts the SSL listen sockets so that keystore changes take effect.

  5. Accept or reject your section on the Server Life Cycle Assistant page by clicking Yes or No.

  6. To view status information related to this task, click the Task link in the Status of Last Action column.

For more information about the states through which a WebLogic Server instance can transition, see "Understanding Server Life Cycle" in Managing Server Startup and Shutdown for Oracle WebLogic Server.

5.3.2 Managing Running Virtual Servers With WLST

You can use the WebLogic Scripting Tool (WLST) in online mode to change the state of the servers in a running WebLogic Server domain.

5.3.2.1 Setting Up the Classpath and Starting WLST

First, you need to make sure that your classpath is correct and contains the relevant WebLogic Server bits. The weblogic_patch.jar and the VMM Node Manager client and adapter modules need to be ahead of the usual WebLogic CLASSPATH JARs needed for WebLogic Server.

One way to set your classpath is to disassemble your image into an /application directory on your Linux development machine so you have everything you need on your local machine.

Set the Classpath

Set the classpath as follows:

. /application/wlserver_10.3/server/bin/setWLSEnv.sh

This command does not setup the classpath in $CLASSPATH, but instead in $WEBLOGIC_CLASSPATH, so you can either use that or set $CLASSPATH to the value of $WEBLOGIC_CLASSPATH.

Start Up WLST

java -cp $WEBLOGIC_CLASSPATH weblogic.WLST
Initializing WebLogic Scripting Tool (WLST) ...
Welcome to WebLogic Server Administration Scripting Shell
Type help() for help on available commands
wls:/offline>

5.3.2.2 Using the VMM Node Manager Client to Connect to the Oracle VM Manager

Use the following VMM Node Manager client command to connect Oracle VM Manager that is hosting the WLS on JRVE servers that you want to control.

wls:/offline> nmConnect('admin','oracle','<machine-name>','8888',
'wlsve_domain', '/application/user_projects/domains/wlsve_domain',
'VMM-OracleVM_2.2')
Connecting to Node Manager ...
Successfully Connected to Node Manager.
wls:/nm/wlsve_domain>

The available nmConnect properties are described in Table 5-2.

Table 5-2 nmConnect() Properties

Property Definition

username

User name used by the Oracle VM Manager to connect to the VMM Node Manager client.

password

Password used by the Oracle VM Manager to connect to the VMM Node Manager client.

host

The host name or IP address where Oracle VM Manager listens for connection requests from the VMM Node Manager client.

port

The port where the Oracle VM Manager listens for connection requests (either Secure or inSecure) from the VMM Node Manager client.

domain

WebLogic Server domain name.

domaindir

WebLogic Server domain directory.

nmType

A string with the following syntax:

[VMM[S][-<adapter-name>][_<adapter-version>
]

where,

  • -<adapter-name> is OracleVM (the default) for WLS on JRVE

  • _<adapter-version> is 2.2.1 (the default) for WLS on JRVE

  • S if present, indicates a secure connection

For example, if you want to use a secure connection, you would substitute VMMS for VMM in the Node Manager type field, VMMS-OracleVM_2.2, and change to the secure port.


5.3.2.3 Using the Virtual Machine Manager to Start the Administration Server

To use a VMM (Virtual Machine Manager) Node Manager client with WLST, you do not have to have one configured in the Administration Console. This is because the VMM (or secure VMMS) Node Manager client does not use a Node Manager service/process like non-virtual WebLogic Server Node Managers, but is, instead, a Web service interface with the Oracle VM Manager being used to host WebLogic Server VMs.

When you want to control a server using the VMM Node Manager client and the nm commands, you need to use the virtual machine name instead of the server name. For example, when starting an Administration Server with the default VirtualMachineName. In the VM image template, the default VirtualMachineName for the Administration Server is WlsveAdmin, so you should issue the nmStart() command to start the Administration Server.

To check the Administration Server's status, enter:

wls:/nm/wlsve_domain> nmServerStatus('wlsve_domain_WlsveAdmin')

POWEREDOFF

To start the Administration Server, enter:

wls:/nm/wlsve_domain> nmStart('wlsve_domain_WlsveAdmin')
Starting server wlsve_domain_WlsveAdmin ...
Successfully started server wlsve_domain_WlsveAdmin ...

To re-check the Administration Server's status, enter:

wls:/nm/wlsve_domain> nmServerStatus('wlsve_domain_WlsveAdmin')
RUNNING

To stop the Administration Server, enter:

wls:/nm/wlsve_domain> nmKill('wlsve_domain_WlsveAdmin')
Killing server wlsve_domain_WlsveAdmin ...
Successfully killed server wlsve_domain_WlsveAdmin

5.3.2.4 Connecting to the Administration Server and Controlling the Managed Servers

After you have started the Administration Server, you can connect to it and then simply use the non-nm server control commands to control your managed servers using just the WLS server names without have to use the potentially very long VM names. The reason that you don't need to know the VM names at this point is that the Administration Server knows what they are and can do the mapping from WLS server name to VM name for you.

To connect to the Administration Server, enter:

wls:/nm/wlsve_domain> connect('weblogic','welcome1', 't3://<host>:7001')
Connecting to t3://paia:7001 with userid weblogic ...
Successfully connected to Admin Server 'WlsveAdmin' that belongs to domain 'wlsve_domain'.

wls:/wlsve_domain/serverConfig> state('WlsveMgd1','Server')
Current state of 'WlsveMgd1' : POWEREDOFF

To start a Managed Server, enter:

wls:/wlsve_domain/serverConfig> start('WlsveMgd1','Server')
Starting server WlsveMgd1 .........................................

Server with name WlsveMgd1 started successfully
wls:/wlsve_domain/serverConfig> state('WlsveMgd1','Server')
Current state of 'WlsveMgd1' : RUNNING

If you have a cluster defined, you can use the state() command as follows:

wls:/wlsve_domain/serverConfig> state('WlsveCluster','Cluster')

There are 2 server(s) in cluster: WlsveCluster

States of the servers are
WlsveMgd1---RUNNING
WlsveMgd2---SHUTDOWN

You can also control Managed Servers without connecting to the Administration Server. However, it is not as convenient because you have to use the nm commands and have to know and use the virtual machine names. However, this method works best if you are using the default VirtualMachineName, and not the potentially long VM names.

5.3.2.5 Shutting Down the Administration Server

To stop the Administration Server, enter:

wls:/nm/wlsve_domain> nmKill('wlsve_domain_WlsveAdmin')
Killing server wlsve_domain_WlsveAdmin ...
Successfully killed server wlsve_domain_WlsveAdmin

To check the Administration Server status and after shutting it down, enter:

wls:/nm/wlsve_domain> nmServerStatus('wlsve_domain_WlsveAdmin')
POWEREDOFF

5.4 Modifying a WebLogic Server Configuration Using WLST Online

You can use the WebLogic Scripting Tool (WLST) in online mode to modify the domain configuration of a running WebLogic Server virtual machine.

Note:

WLST in offline mode is not supported on the VM image directly but it is supported with the physical WebLogic installation on WebLogic Server VMs.
  1. On your Linux development machine for the online WebLogic Server VM, set up the WLST environment, as follows:

    • Run the setWLSEnv.sh script in WL_HOME\server\bin.

    • Adds WebLogic Server classes to the CLASSPATH and WL_HOME\server\bin to the PATH.

  2. Invoke WLST from the development WebLogic Server environment, as follows:

    java weblogic.WLST
    

    WLST starts in Offline mode.

  3. Connect to the running WebLogic Server VM domain. For example:

    wls:/offline> connect('weblogic','welcome1', 'admin.server.ip.address:7001')
    

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

  4. Once connected you can perform WLST configuration management options on virtual machines. The following table describes some common WLST operations that are available in Online mode:

    Table 5-3 Common WLST Online Commands

    WLST Command What it does...

    Change to the edit tree

    wls:/wl_server/domainConfig> edit()

    Get an edit lock

    wls:/wl_server/edit> startEdit()

    Make changes

    wls:/wl_server/edit!> svr = cmo.createServer("managedServer")

    wls:/wl_server/edit!> svr.setListenPort(8001)

    wls:/wl_server/edit!> svr.setListenAddress("my-address")

    Note: Replace my-address with the IP address of your VM.

    Save (and implicitly validate) your changes

    wls:/wl_server/edit!> save()

    Activate/distribute, release lock

    wls:/wl_server/edit!> activate()


5.5 Patching Virtual Machines

You can apply patches to WebLogic Server VMs by using SmartUpdate to leverage the Image Tool's "profile properties" file to perform profile-based updates of the WebLogic Server installation in the VM:

Note:

Using the Image Tool to disassemble and re-assemble VM images is not supported on Windows platforms. Windows users should instead use a Linux machine for virtual machine disassembly and assembly operations.

For more information, see Section 5.8, "Using the Image Tool to Extract or Insert Files With Profile-based Support".

  1. Download the virtual machine onto the file system of your development machine.

  2. On your development machine, run the following command as the root user, to extract the directories required for patching from the image.

    java -jar wlsveimagetool.jar -e vm.cfg wls
    

    Tip: Add -force to the command-line if the /application directory is not empty.

  3. Before running the Smart Update tool, change the JAVA_HOME in the /application/utils/bsu/bsu.sh file to your development machine's JAVA_HOME.

  4. Run the Smart Update tool:

    sh bsu.sh
    
  5. In the Smart Update GUI, select File -> Target Installation-> Find Other BEA home -> Patch/application. Now Patch/application serves as the BEA_HOME where patches will be downloaded and applied.

  6. Get the patches that are listed by Smart Update or by using the patch ID and password.

  7. Apply the patches.

  8. Use profile-based insertion to insert the patched image back into the VM:

    java -jar wlsveimagetool.jar -i vm.cfg wls
    
  9. Transfer the patched VM 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.

  10. Verify the patched VM running on the Oracle VM server.

5.6 Configuring a Shared Disk On NFS to Store Server Log Files

You can use the Network File System (NFS) to automount and transparently access a read-only shared disk on your network. This way, you can output the WebLogic Server logs to the shared disk to save disk space on your VMs.

  1. Follow the directions in Section 4.3.1, "Configure the NFS Server and Mounting Points In a Virtual Machine" to configure the NFS server export directory.

  2. Create a /logs directory in the NFS location.

    For example, <Export dir>/logs.

  3. Using the Image tool, create the mounting point in the wlsve.xml configuration file for the upload directories for the VM.

    java -jar wlsveimagetool.jar --reconfigure vm.cfg add mount nfs
    <WLSVE server's log file location> <nfs server> <nfs server-path>
    <option1> <...> <optionN>
    

    Here's how to create it using the default domain names in the VM template:

    java -jar wlsveimagetool.jar --reconfigure vm.cfg add mount nfs
    /application/user_projects/domains/wlsve_domain/servers/WlsveAdmin/logs/
    <nfs server> <nfs  server-path> <option1> <option2> <...> <optionN>
    

    For example:

    java -jar wlsveimagetool.jar --reconfigure vm.cfg add mount nfs
    /application/user_projects/domains/wlsve_domain/servers/WlsveAdmin/logs/
    /scratch/userdir/nfs/logs uid=11735 gid=900
    

    In this example, the logs directory is created in the NFS Server location (/scratch/userdir/nfs/) for the mounting point in the VM /application/user_projects/domains/wlsve_domain/servers/WlsveAdmin/logs.

  4. After starting the VM, the logs are created under the NFS Server shared location <nfs server-path>.

  5. Tail the log file to see the logs, or you can read the logs.

Note: In this release, log files are read-only, and so should not be modified. Therefore, if you attempt to overwrite the log files at the shared location, the following information will appear in the VM console output:

Handler: '/<path>/WlsveAdmin.log' raised exception when flushing.
Handler: '/<path>/WlsveAdmin.log' raised exception when flushing.
Handler: '/<path>/WlsveAdmin.log' raised exception when flushing.
Handler: '/<path>/WlsveAdmin.log' reported critical error(s). Shutting it down.

Tip: If some reason, a user does modify the log files at a shared location, see "Section 7.2, "Using WLST to Reopen a Closed Log File."

5.7 Creating a Root Domain Directory Other Then the Default "/application" Domain Directory

To simplify the domain creation process, the wlsve.xml file in the packaged WebLogic Server virtual image has placeholders for a new domain to be created in Development mode under the /application/user_projects/domains/wlsve_domain/ directory. However, you can also use the Image Tool to create new single-server domain in the VM image outside the default /application directory, using a name of your choice.

  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
    
  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>/other_than_application_dir/domain_name</working-dir>
    

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

  3. Complete the process for creating a new domain, transfer the VM to Oracle VM, and starting the new VM by following steps 3–8 in Section 3.2, "Deploying the Base VM Image With a New Single-Server Domain"

    Note: Newly created domains are always created in Development mode.

  4. After logging in to WebLogic Server, use the Administration Console to make the following directory location changes:

5.7.1 Changing the Deployment and Applications Directory Location Other Than /application

After specifying your domain application directory in the VM's configuration file, you need to make parallel changes to the server. To change these directories using the Administration Console, follow these steps:

  1. Navigate to the Environments > Servers page.

  2. Select the server whose directory locations you are going to change to match the directory locations in the VM.

  3. Click the Deployment tab.

  4. Enter the new location of the staging directory and the new location of the upload directory. For example:

    Staging Directory Name: /stage_directory/WlsveAdmin/stage

    Upload Directory Name: /upload_directory//WlsveAdmin/upload

  5. Click Save.

  6. Click Activate Changes.

  7. Restart the server for the changes to get affected fully.

5.7.2 Changing the Server Log Directory Location Other Than /application

After specifying your log directory in the VM's configuration file, you need to make parallel changes to the server. To change the this directory using the Administration Console, follow these steps:

  1. Navigate to the Environments > Servers page.

  2. Select the server whose directory locations you are going to change to match the locations in the VM.

  3. Click the Logging tab.

  4. Enter the new location of the server log directory. For example:

    Log File Name: /new_serverlog_location/WlsveAdmin.log

  5. Click Save.

  6. Click Activate Changes.

  7. Restart the server for the changes to get affected fully.

5.8 Using the Image Tool to Extract or Insert Files With Profile-based Support

The Image Tool provides a profile (or properties) file that allows you to define a subset of the VM virtual file system to be extracted or inserted by name. The default profile supports the extraction and reinsertion of the files that constitute the WebLogic Server installation within a WebLogic Server VM for the purpose of using SmartUpdate to perform updating of the WebLogic Server installation in the VM

5.8.1 Creating a Profile

The profile properties file defines which files or entire directories are extracted or inserted. To create a profile (myprofile.properties) for insertion and extraction, use this command:

subset=<source file/directory>,<target file/directory>

The Image Tool checks whether the profile directive refers to a directory or a single file. If it refers to a directory, only the top-level files in that directory are moved unless the r option (for recursive) is appended to the subset name for the line in question.

Here's an example of the built-in profile when using default /application domain:

wls.description=WebLogic Server files needed for running Smart Update
wls.1=/application/*,/application/
wls.2.r=/application/modules/*,/application/modules/
wls.3.r=/application/patch_wls1034/*,/application/patch_wls1034/
wls.4.r=/application/utils/*,/application/utils/
wls.5.r=/application/wlserver_10.3/*,/application/wlserver_10.3/

A recommended pattern to move all top-level files from /src to /target is:

a.1=/src/*,/target/

(Make sure there is a trailing slash after target or the Image Tool will not recognize it as a directory.)

a.2.r=/src/*,/target/

This is similar to the first line, but the r option directs the Image Tool to descend into the /src directory and recursively copy everything in it.

5.8.2 Performing Profile-based File Extraction On an Image

Before executing the extract command, you can preview the command output.

java -jar wlsveimagetool.jar --extract vm.cfg <subset> --profile <my.properties>  --preview

Then execute the extract command:

java -jar wlsveimagetool.jar --extract vm.cfg <subset> --profile <my.properties> 

If a destination directory already exists with files, the extraction will fail. In this case, you have to use the force command, which overwrites files that already exist in the destination location.

java -jar wlsveimagetool.jar --extract vm.cfg <subset> --profile <my.properties>  --force

Example: Extracting Files From an Image:

This section provides an example profile, textprofile.properties, used for file extraction.

testprofile.description=WebLogic Server files needed for running Smart Update
testprofile.1=/application/modules,/home/userdir/modules
testprofile.2.r=/application/utils/,/home/userdir/utils/
testprofile.3.r=/application/patch_wls1034,/home/userdir/patch_wls1034

Execute the extract command:

$java -jar wlsveimagetool.jar --extract vm.cfg testprofile --profile  testprofile.properties --preview

testprofile - WebLogic Server files needed for running Smart Update
Will execute the following cmd: -f vm.cfg get /application/modules /home/userdir/modules
Will execute the following cmd: -f vm.cfg rget /application/utils/ /home/userdir/utils/
Will execute the following cmd: -f vm.cfg rget /application/patch_wls1034 /home/userdir/patch_wls1034
Done

5.8.3 Performing Profile-based File Insertion On an Image

Before executing the insert command, you can preview the command output.

java -jar wlsveimagetool.jar --insert vm.cfg <subset> --profile <my.properties>  --preview

Then execute the insert command:

java -jar wlsveimagetool.jar --insert vm.cfg <subset> --profile <my.properties> 

Example: Inserting Files Into an Image:

This section provides an example profile, textprofile.properties, used for file insertion.

testprofile.description - WebLogic Server files needed for running Smart Update
testprofile.1=/application/modules,/home/userdir/modules
testprofile.2.r=/application/utils/,/home/userdir/utils/
testprofile.3.r=/application/patch_wls1034,/home/userdir/patch_wls1034

Execute the insert command:

$java -jar wlsveimagetool.jar --insert vm.cfg testprofile --profile  testprofile.properties --preview

testprofile - WebLogic Server files needed for running Smart Update
Will execute the following cmd: -f vm.cfg put /application/modules /home/userdir/modules
Will execute the following cmd: -f vm.cfg rput /application/utils/ /home/userdir/utils/
Will execute the following cmd: -f vm.cfg rput /application/patch_wls1034 /home/userdir/patch_wls1034
Done

5.9 Injecting an Upgraded Domain into a WebLogic Server VM Image

On your development machine, you can use the Image Tool to inject an upgraded 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.

  1. On your development machine, use the Configuration Wizard to create a WebLogic Server domain in your MW_HOME directory.

  2. 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.

  3. Upgrade the domain using Domain Upgrade Wizard, as follows:

    sh $BEA_HOME/wlserver_10.3/common/bin/upgrade.sh
    
  4. Inject the domain into the WebLogic Server VM image using the following command:

    java -jar wlsveimagetool.jar -f vm.cfg rput $BEA_HOME/user_projects
    /domains/domain_name /applicationn/user_projects/domains/
    
  5. Use the Image Tool to extract the wlsve.xml configuration file from the image:

    $java -jar wlsveimagetool.jar -r vm.cfg get config wlsve.xml
    
  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>/application/user_projects/domains/wlsve_domain</working-dir>
    
  7. Update the <java-arguments> tag in the wlsve.xml file as follows:

    -Dweblogic.Name=serverName
    -Dweblogic.Domain=domainName weblogic.Server
    

    where domainName represents the name of the WebLogic Server domain (for example, wlsve_domain) and ServerName is the name of the server (for example, WlsveServer).

  8. 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
    
  9. 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.