1. VirtualBox Configuration - The cluster nodes must have a working installation of VirtualBox. > VirtualBox 4.0 or higher - VirtualBox drivers are coded in ruby language, so we need to have installed Ruby in the cluster node. > Ruby 1.9 or higher - In order to save and restore VM's we need > TAR package The user with access to these remotes hosts (typically ) has to pertain to the VirtualBox groups in order to use the deaemon and be able to launch VMs. ------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------ 2. Migration The VirtualBox driver supports [cold] migration. This is achieved by... etc etc VirtualBox driver does not support live migration. ------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------ 3. Driver Files The driver consists on the following files: Once defined $ONE_LOCATION variable (usually /srv/cloud/one): - $ONE_LOCATION/etc/vmm_ssh/vmm_ssh_vbox.conf : set of default values for the VirtualBox domain definitions. Currently empty as no mandatory attributes are required in the VirtualBox templates. - $ONE_LOCATION/lib/remotes/vmm/vbox : commands executed to perform actions on virtual machines. - $ONE_LOCATION/lib/remotes/im/vbox.d : commands executed to perform fetch information from the remote hosts. - $ONE_LOCATION/share/examples/vbox : VirtualBox ttylinux image, template and some useful files (modified oned.conf, template squema...) If OpenNebula was installed in system-wide mode, instead of ONE_LOCATION, files can be found under /usr/lib/one and /etc/one. This guide refers to a self-contained install of OpenNebula under the $ONE_LOCATION directory. ------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------ 4. Configuration OpenNebula needs to know if it is going to use the VirtualBox driver. OpenNebula uses /etc/oned.conf to configure that. Therefore, it is necessary to set the appropiate VM_MAD and IM_MAD options to use the VirtualBox driver. IM_MAD = [ name = "im_vbox", executable = "one_im_ssh", arguments = "vbox" ] VM_MAD = [ name = "vmm_vbox", executable = "one_vmm_ssh", arguments = "vbox", default = "vmm_ssh/vmm_ssh_vbox.conf", type = "xml" ] The name of the driver needs to be provided at the time of adding a new host to OpenNebula (command onehost create) "executable" points to the path of the driver executable file. It can be an absolute path or relative to $ONE_LOCATION/lib/mads, if OpenNebula was installed in self-contained mode. "default" points to the configuration file for the driver. It can be an absolute path or relative to $ONE_LOCATION/etc. "type" identifies this driver as using the XML format for the domain file passed from OpenNebula to the VirtualBox driver. ------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------ 5. Installation In order to install the VirtualBox plugin, download it, untar and execute the install.sh script as oneadmin (or the owner of the OpenNebula installation). Note that it is neccesary to have the ONE_LOCATION environment variable defined. The install plugin will copy the driver files and examples to the OpenNebula installation under the $ONE_LOCATION folder. Once installed, remember to modify oned.conf ($ONE_LOCATION/etc/oned.conf) as described before. ------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------ 6. VirtualBox template configuration. * Mandatory attributes: The following are specific template attributes and mandatory to VirtualBox, please refer to the OpenNebula user guide for a complete list of the attributes supported to define a VM. - Disk: Type: Disk, DVD or floppy disk. Target: Device to map disk. Bus: Possible values: ide, scsi, sata, floppy or sas. - NIC: Bridge = Name of the bridge to bind if.**** * Optional attributes: - Graphics: Type: If we configure graphic options, type must be "vrdp". Listen: IP to listen on. Port: Por for VNC server. Default port used otherwise. *RAW All of them could be seen at $ONE_LOCATION/share/examples/vbox/vbox-template.squema once installed this driver. ------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------ 7. Example In this example we will create a host and a VM running the VirtualBox driver. In order to achieve this, the following commands can be run in the front node: $ one stop (if OpenNebula was running before installing the driver) $ one start # Note you will need passwordless ssh access to HOST before running the following command. $ onehost create HOST im_vbox vmm_vbox tm_ssh # Creates a host in HOST (can be localhost), with im drivers, vmm drivers, and ssh transfer manager. $ tail -f $ONE_LOCATION/var/oned.log Check if our host is succesfully monitored, if not, review the ssh connection and $ONE_LOCATION/etc/oned.conf. $ onevm create vbox-test.config # You can find the vbox-test.config template under $ONE_LOCATION/share/examples/vbox. The VM machine is created, now, and will be deployed by the OpenNebula scheduler. If preferred, it can be manually deployed by typing: $ onevm deploy The VirtualBox machine will be deployed on the host. To see possible errors, check $ONE_LOCATION/var/VM_ID/vm.log. You can check the state of the VM by typing: $ onevm list At this point, it is possible to execute the following commands: $ onevm cancel $ onevm shutdown $ onevm suspend $ onevm resume $ onevm migrate $ onevm show