2.5. Using Oracle VM Virtual Machine Messaging

2.5.1. Command Line Options and Parameters of ovm_vmmessage
2.5.2. Examples of ovm_vmmessage Usage

The ovm_vmmessage utility lets you send a message to a running virtual machine, or to query the value of a message sent from within a virtual machine to Oracle VM Manager via the Oracle VM API messaging interface. These values are basic key/value pairs such as foo=bar.

New Oracle VM templates released by Oracle will contain a configuration utility called ovmd. This utility is used to perform first-boot installation configuration either locally from the virtual machine console or remotely through the messaging interface provided by this utility. The ovmd utility also allows the owner of the virtual machine to send messages back to Oracle VM Manager. For more information about ovmd, and the Oracle VM Guest Additions in general, see Chapter 3, Using the Oracle VM Guest Additions.

2.5.1. Command Line Options and Parameters of ovm_vmmessage

The ovm_vmmessage utility has the following command line options:

  • -u user name of an Oracle VM Manager admin user (required)

  • -p password corresponding with the admin user name (required)

  • -h host name of the server running Oracle VM Manager (required)

  • -X use SSL to connect to Oracle VM Manager

  • -v virtual machine name

  • -U virtual machine UUID

  • -k key to send

  • -V value to send along with the key (required when using -k)

  • -q key to query

Note that ovm_vmmessage only works on a running virtual machine. To send messages you combine -k <key> and -V <value>. To retrieve messages, use -q <key>.

Caution

The virtual machine name is the name you assign during the creation of the VM. However, the same name could be assigned to several different VMs. If that is the case, you must use the -U option and provide the unique identifier (UUID) of the VM.

2.5.2. Examples of ovm_vmmessage Usage

Below are examples of ovm_vmmessage commands and their respective output.

  • Send a message key/value pair to a virtual machine:

    # ./ovm_vmmessage -u admin -p password -h localhost -v MyVM02 -k foo -V bar 
    Oracle VM VM Message utility 0.5.2. 
    Connected. 
    VM : 'MyVM02' has status :  Running. 
    Sending message. 
    Message sent successfully.
  • Send a message key/value pair to a virtual machine, identifying the VM by its UUID:

    # ./ovm_vmmessage -u admin -p password -h localhost \
      -U 0004fb00000600001c925eac2ad5d328 -k foo -V bar 
    Oracle VM VM Message utility 0.5.2.
    Connected. 
    VM : 'MyVM02' has status :  Running. 
    Sending message. 
    Message sent successfully.
  • Retrieve a message from a virtual machine, identifying the VM by its UUID:

    # ./ovm_vmmessage -u admin -p password -h localhost \
      -U 0004fb00000600001c925eac2ad5d328 -q foo 
    Oracle VM VM Message utility 0.5.2. 
    Connected. 
    VM : 'MyVM02' has status :  Running. 
    Querying for key 'foo'. 
    Query successful. 
    Query for Key : 'foo' returned value 'bar'. 
    Key set 27 minutes ago.