Skip Headers
Oracle® Fusion Middleware User's Guide for Oracle JRockit Virtual Edition
11g Release 1 (11.1.1.3.1)

Part Number E15206-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

-r (--reconfigure)

The -r option enables you to view, add, change, and remove configuration settings for a virtual machine by modifying the virtual machine configuration directly.

Note:

If required, you can extract a configuration XML file corresponding to the modified virtual machine configuration by using the -r vm.cfg get config option.

Syntax

java -jar jrockitve-imagetool.jar -r vm_cfg operation field [parameter]*

Note:

For information about the syntax conventions, see Documentation Conventions for Command-Line Syntax.

Arguments

Argument Description
vm_cfg Path and name of the configuration file (vm.cfg) of the virtual machine to be reconfigured.
operation The operation to be performed on the specified field:
  • get: Display the current configuration settings of the specified field.

  • set: Set or change the value of the specified field.

  • add: Add the specified field to the configuration.

  • remove: Remove the specified field from the configuration.

  • enable: Enable the specified service.

  • disable: Disable the specified service.

Table A-3 shows the operations that are supported for each configurable field.

field The field to be reconfigured.

Table A-3 lists the values that you can specify for this argument.

parameter Parameters for the specified field.

The values that you should specify for this argument vary depending on the field to be reconfigured and the operation you want to perform.

Note: When you run -r set for a field without specifying any parameter, all the parameters relevant for operations supported for that field are displayed.

For more information, see Detailed Syntax for Operations of --reconfigure.


Table A-3 lists the fields that you can reconfigure and the reconfiguration operations that you can perform. Most fields correspond to either an element or an attribute in the configuration XML file.

Table A-3 Fields and Operations of the -r Option

Field Supported Operations Affected XML Element Name (Attribute)

config

get, set

jrockitve-config (mandatory)

console-log

get, remove

None

console-log-path

get, set

console-log-path (optional)

cpus

get, set

jrockitve-config (mandatory) (attribute: cpus)

disk-size

set

disks (mandatory) (attribute: size)

disks

get

disks (mandatory)

enabled-services

get

services (optional)

free-disk-size

get

None

installed-services

get

services (optional)

java-arguments

get, set

java-arguments (mandatory)

locale

get, set

locale (optional)

locale-encoding

set

encoding (optional)

locale-timezone

set

timezone (optional)

memory

get, set

jrockitve-config (mandatory) (attribute: memory)

mount

add, remove, set

mounts (mandatory)

mounts

get

mounts (mandatory)

network-dns-host

add, remove

dns (optional)

network-dns-hosts

get, remove

 

network-dns-name

add, get, remove, set

lookup-order (optional) (attribute: suffix)

network-dns-names

get

lookup-order (optional) (attribute: suffix)

network-dns-server

add, get, remove, set

server-order (optional) (attribute: ip)

network-dns-servers

get

server-order (optional) (attribute: ip)

network-hostname

get, remove, set

network (mandatory) (attribute: hostname)

network-nic

add, get, remove, set

nics (mandatory)

network-nics

get

nics (mandatory)

service

disable, enable

service (optional)

service-argument

add, remove

arguments (optional)

service-arguments

get

arguments (optional)

vm-name

get, set

vm-name (mandatory)

working-dir

get, set

working-dir (optional)


Detailed Syntax for Operations of --reconfigure

Note:

For information about the syntax conventions, see Documentation Conventions for Command-Line Syntax.

config

get config [destination.xml]
set config source.xml

View or change the configuration of a virtual machine.

Parameter Description
destination Name of the XML file in which the extracted configuration information should be stored.

If you do not specify this parameter, the command displays the configuration details in XML format on the screen.

source Name of the XML file that contains the configuration settings to be defined for the virtual machine.

Examples

console-log

get console-log
remove console-log

View or remove the log file of a virtual machine.

Examples

console-log-path

get console-log-path
set console-log-path logfile_path-and-name

View or change the directory and file in which log messages are stored. The default log file is /jrockitve/log/jrockitve.log.

Parameter Description
logfile_path-and-name The path and name of the file to which console log messages should be written.

Do not specify a directory as the value of this parameter.


Examples

cpus

get cpus
set cpus number

View or change the number of CPUs available to a virtual machine.

The number specified must be greater than zero. You can specify a maximum of eight virtual CPUs.

Note:

In the current release, Oracle recommends that you configure a single CPU, because configuring the virtual machine for multiple virtual CPUs affects performance.

Examples

disk-size

set disk-size index size

Set the hard disk space available to a virtual machine.

Parameter Description
index Index number of the disk for which you want to set the size

Note: Only one file-based disk is supported in the current release.

size Disk size.

Specify a numerical value followed by one of the following units (not case sensitive)

  • K or KB: Kilobytes

  • M or MB: Megabytes

  • G or GB: Gigabytes

  • T or TB: Terabytes

If you do not specify any unit, megabytes is assumed.

If you leave a space between the size and the unit, enclose the number and the unit in quotes as shown in the example that follows.


Example: java -jar jrockitve-imagetool.jar -r app/vm.cfg set disk-size 1 "200 MB"

This command defines 200 MB as the size of the disk represented by index number 1.

Note:

When you change disk-size, the virtual machine image is resized (shrunk or expanded) depending on the new size specified. If the image cannot be expanded to the specified size due to insufficient disk space or if the new size specified is lower than the current size of the image, the command returns error messages.

disks

get disks

View the settings for the disk defined for a virtual machine.

Example: java -jar jrockitve-imagetool.jar -r app/vm.cfg get disks

The command displays the index number, ID, type, and size of each disk defined for the virtual machine, in the following format:

#1 id=root type=file 976 MB

enabled-services

get enabled-services

View the names of the installed services that are currently enabled.

Example: java -jar jrockitve-imagetool.jar -r app/vm.cfg get enabled-services

The command displays the names and descriptions of the services that are currently enabled, as shown in the following example output.

sshd (An SSH2 implementation with SCP and SFTP support)

free-disk-size

get free-disk-size id

View the free disk space on the specified disk ID.

Example: java -jar jrockitve-imagetool.jar -r app/vm.cfg get free-disk-size root

This command displays the amount of free space available on the disk with the ID root.

installed-services

get installed-services

View the names of the services that are currently installed in a virtual machine.

Example: java -jar jrockitve-imagetool.jar -r app/vm.cfg get installed-services

The command displays the names of the services that are currently installed and a brief description of each service, as shown in the following example output.

jmxstat (JRockitVE kernel statistics MBean)
sshd (An SSH2 implementation with SCP and SFTP support)
sysstat (JRockitVE kernel sysstat statistics)

java-arguments

get java-arguments
set java-arguments "arguments"

View or change Java arguments.

Examples

locale

get locale
set locale locale [timezone] [charset]

View or change the locale for the virtual machine.

Examples

locale-timezone

set locale-timezone new_timezone

Set the time zone for the locale.

Example: java -jar jrockitve-imagetool.jar -r app/vm.cfg set locale-timezone America/Phoenix

This command changes the timezone of the virtual machine to the specified value.

locale-encoding

set locale-encoding new_charset

Set the encoding character set for the locale.

Example: java -jar jrockitve-imagetool.jar -r app/vm.cfg set locale-encoding iso-8859-1

This command changes the character encoding of the virtual machine to the specified value.

memory

get memory
set memory size

View or change the memory available to a virtual machine.

Examples

mount

add mount type mount-point options...
set mount index type mount-point options...
remove mount index

Add, remove, or configure a mount point.

Parameter Description
index Index number of the mount point that you want view, change, remove.

You can find out the index number by using the get mounts operation.

type The type of mount that you want to add or configure. The following mount types are supported:
  • nfs

  • native

Note: Only one native mount (the root disk of the virtual machine) is supported in the current release.

mount-point The directory, within the virtual image, at which the external file system should be mounted.
options The options depend on the mount type.
  • nfs: server server-path option1 option2 ... optionN

  • native: device option1 option2 ... optionN


Examples

mounts

get mounts

View mount points.

Example: java -jar jrockitve-imagetool.jar -r app/vm.cfg get mounts

The command displays the index number, mount type, and other parameters of all the mount points currently defined for the virtual machine, as shown in the following example output.

#1 native /
#2 nfs /log logs.mycompany.com /logger/logs,uid=513,gid=502

The first line in the example output shows details of the native mount pointing to the root (/) directory of the virtual machine file system. The second line shows the directory /logger/logs on the logs.mycompany.com server mounted as an NFS mount point at the /log directory in the file system of the virtual machine.

network-dns-host

add network-dns-host ip-address host
remove network-dns-host ip-address host

Add or remove a static host entry in the DNS hosts table.

Examples

network-dns-hosts

get network-dns-hosts
remove network-dns-hosts ip-address

View all static host entries in the DNS hosts table or remove entries corresponding to the specified IP address.

Examples

network-dns-name

add network-dns-name domain-name
get network-dns-name index
remove network-dns-name index
set network-dns-name index domain-name

Add, view, remove, or change a DNS domain name.

Note:

The DNS domain names are tried in the order in which they are defined in the lookup table. Make sure that the primary domain names are defined first.
Parameter Description
index Index number of the entry (in the DNS server name lookup table) that you want to view, change, or remove.

For example, if you run get network-dns-name for a virtual machine for which two DNS server names are defined, the output of the command would be as shown below:

#1 one.example.com
#2 two.example.com

The number shown at the beginning of each line in the output indicates the index number of the entry in the DNS server name lookup table.

domain-name Domain name for the DNS server entry to be changed or added (example: mycompany.com).

Examples

network-dns-names

get network-dns-names

View DNS domain names.

Example: java -jar jrockitve-imagetool.jar -r app/vm.cfg get network-dns-names

The command displays the entries in the DNS server name lookup table.

network-dns-server

add network-dns-server ip-address
get network-dns-server index
remove network-dns-server index
set network-dns-server index ip-address

Add, view, remove, or change a DNS IP address.

Note:

The DNS servers are queried in the order in which they are defined in the lookup table. Make sure that the primary DNS servers are defined first.
Parameter Description
index Index number of the entry (in the DNS server lookup table) that you want to view, change, or remove.

For example, if you run get network-dns-server for a virtual machine for which two DNS servers are defined, the output of the command would be as shown below:

#1 172.22.23.24
#2 172.22.23.25

The number shown at the beginning of each line in the output is the index number of the entry in the DNS server lookup table.

ip-address IP address for the DNS server to be changed or added.

Examples

network-dns-servers

get network-dns-servers

View DNS server IP addresses.

Example: java -jar jrockitve-imagetool.jar -r app/vm.cfg get network-dns-servers

The command displays the entries in the DNS server name lookup table.

network-hostname

get network-hostname
remove network-hostname
set network-hostname hostname

View, remove, or change the network host name.

Examples

network-nic

add network-nic network nic-type
add network-nic network nic-type ip-address netmask gateway mac
add network-nic nic-type
add network-nic nic-type ip-address
add network-nic nic-type ip-address netmask gateway mac
get network-nic index
set network-nic index network nic-type
set network-nic index network nic-type ip-address netmask gateway mac
set network-nic index nic-type
set network-nic index nic-type ip-address
set network-nic index nic-type ip-address netmask gateway mac
remove network-nic index

Add, view, remove, or change a network interface card (NIC).

Parameter Description
index Index number of the entry (in the NICs table) to be displayed or changed.

Note: Only one NIC is supported in the current release.

network Name for the NIC entry to be changed or added.
nic-type Network type: nat or bridged.
ip-address IP address for the NIC entry to be changed or added (required only if you want to use a static IP address).

If you do not specify the IP address, the NIC attempts to use DHCP to find its configuration.

netmask Net mask for the NIC entry to be changed or added (required only if you want to use a static IP address).
gateway Gateway for the NIC entry to be changed or added (required only if you want to use a static IP address).
mac MAC address for the NIC entry to be changed or added (required only if you want to use a static IP address)

Note:

Any parameters that you do not specify (ip-address, netmask, or gateway) will be determined by using DHCP.

Examples

network-nics

get network-nics

View settings of network interface cards (NICs).

Example: java -jar jrockitve-imagetool.jar -r app/vm.cfg get network-nics

The command displays the index number, network name, and NIC type of the NICs defined for the virtual machine.

service

enable service service-name
disable service service-name

Disable or enable a service.

Examples

service-argument

add service-argument service-name argument
remove service-argument service-name index

Add or remove an argument for a service that is enabled in a virtual machine.

Note:

If an argument contains spaces or other special characters, prefix each space and special character with an escape character: backslash (\) on UNIX-like systems and caret (^) on Windows.

Examples

service-arguments

get service-arguments service-name

View the names of arguments specified for a service.

Example: java -jar jrockitve-imagetool.jar -r app/vm.cfg get service-arguments sshd

The command displays all the arguments that are currently defined for the sshd service.

vm-name

get vm-name
set vm-name name

View or change the name of a virtual machine.

Examples

working-dir

get working-dir
set working-dir path

View or change the name of the current working directory for a virtual machine. Relative paths are assumed to be in relation to the root (/) directory.

Examples

Related Topics

Appendix B, "Configuration File Element Reference"

Section 4.1.3, "Disassembling and Re-Creating Virtual Machine Images"