VirtualBox Component
Available as of Camel 2.11.0
This component uses the web-service API of VirtualBox to execute vbox
commands and consume events from virtual machines.
Options
Div |
---|
class | confluenceTableSmall |
---|
|
Name | Default Value | Description |
---|
consumer.delay | 500 | Option for consumer only. Delay in millis between each poll. | consumer.initialDelay | 1000 | Option for consumer only. Millis before polling starts. | consumer.userFixedDelay | false | Option for consumer only. Set to true to use fixed delay between polls, otherwise fixed rate is used. See ScheduledExecutorService in JDK for details. |
|
VirtualBox consumer
VirtualBox consumer is dedicated to poll events generated by the virtual machines. In order to connect to the given machine instance use the following route:
Code Block |
---|
|
from("virtualbox:targetMachineName?url=http://myhost:18034&user=test&passwd=test").
to("mock:virtualBoxEvents);
|
VirtualBox consumer is a polling consumer, as it relays on the concept of the passive listener to collect the virtual machine events.
VirtualBox producer
VirtualBox producer sends commands to the VirtualBox manager. It may be used to interact with and control the behavior of the virtual machines. The following commands are supported by the current version of the component:
Div |
---|
class | confluenceTableSmall |
---|
|
Name | Description |
---|
GetState | Returns String indicating the current state of the target virtual machine. | GetVersion | Returns String indicating the version of VirtualBoxManager. | PowerDown | Stops target virtual machine. | RestoreCurrentSnapshot | Restores current snapshot. | SetBiosSystemTimeOffset | Sets offset to the BIOS system time of the target virtual machine. | StartVm | Starts target virtual machine. |
|
To create producer endpoint follow the syntax demonstrated below:
Code Block |
---|
|
from("direct:vboxCommands").
to("virtualbox:targetMachineName?url=http://myhost:18034&user=test&passwd=test");
|
Maven usage
Maven users will need to add the following dependency to their pom.xml
for this component:
Code Block |
---|
|
<dependency>
<groupId>org.apache-extras.camel-extra</groupId>
<artifactId>camel-virtualbox</artifactId>
<version>${camel-version}</version>
<!-- use the same version as your Camel core version -->
</dependency>
|