7.11 Sending Messages to Virtual Machines

Sending a message to a virtual machine may be useful during certain situations, like developing or starting a virtual machine template. Messages are passed to the virtual machine operating system, and can be of any key/value pair that the operating system or template understands. For example, to set up a virtual machine template to use DHCP, you may want to send the following key/pairs to a virtual machine:

com.oracle.linux.network.device.0       eth0
com.oracle.linux.network.onboot.0       yes
com.oracle.linux.network.bootproto.0    dhcp
com.oracle.linux.root-password          password
Note

The root-password is always required as a parameter and should be sent as the final parameter for any message.

Any messages that are not understood are discarded and ignored by the operating system. You can hide the message for sensitive information such as passwords, so a series of asterisks are displayed in the user interface instead of the sensitive information.

You can optionally keep a log of the message. This feature is especially useful to template or application developers that want to send messages to virtual machines. Message logs are stored in the Oracle VM Manager API and are not available through any log file or database query. To gain access to these messages, you must use the API. Messages are limited to 1024 bytes when message logging is selected, or 8192 bytes when logging is not selected. They key is limited to 256 bytes.

Each message sent to a virtual machine is contained within its own job. If you send multiple messages to multiple virtual machines, each one has its own job, so 10 messages to 100 virtual machines produces 1,000 jobs.

When messages have been sent or you cancel out of the messaging dialog box, any messages you entered are not retained and are discarded.

You can select one or more virtual machines, an Oracle VM Server, or a server pool, to select which running virtual machines are populated in the dialog box used to send messages to virtual machines.

To send a virtual machine a message you must have first installed the Oracle VM Guest Additions in the virtual machine. For information on installing the Guest Additions, and a more detailed description of the virtual machine messaging mechanism and its uses, see the Oracle VM Utilities Guide.

To send messages to virtual machines:

  1. Click the Servers and VMs tab.

  2. Select the server pool on which the virtual machines reside in the navigation tree.

  3. Select Virtual Machines from the Perspective drop-down list. Select one or more virtual machines in the management pane, and click Send VM Messages... Send VM Messages... icon in the management pane toolbar.

    The Send Messages to Virtual Machines dialog box is displayed.

    This figure shows the Send Messages to Virtual Machine dialog box with the Messages tab displayed.
  4. To create a message, click Create Message... Create Message... icon in the management pane toolbar to display the Create VM Message dialog box.

    This figure shows the Create VM Message dialog box.

    Enter the message key value pair in the Key and Message fields. Check the Log Message field to retain a log of the message. Check the Hide Message field to hide the message of the key/value pair in the user interface. Click OK to save the message and return to the Send Messages to Virtual Machines dialog box.

  5. To edit a message, select the message and click Edit... Edit... icon in the dialog box toolbar. To delete a message, select it and click Delete Delete icon in the dialog box toolbar.

  6. Select the Virtual Machines tab to select which running virtual machines are to receive the messages.

    This figure shows the Create VM Message dialog box with the Virtual Machines tab displayed.

    Click OK to send the messages to the virtual machines.