diff --git a/src/im_mad/vmware/GetProperty.java b/src/im_mad/vmware/GetProperty.java deleted file mode 100644 index 18da7c4067..0000000000 --- a/src/im_mad/vmware/GetProperty.java +++ /dev/null @@ -1,304 +0,0 @@ -/* -------------------------------------------------------------------------- */ -/* Copyright 2002-2010, OpenNebula Project Leads (OpenNebula.org) */ -/* */ -/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ -/* not use this file except in compliance with the License. You may obtain */ -/* a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ -/* See the License for the specific language governing permissions and */ -/* limitations under the License. */ -/* -------------------------------------------------------------------------- */ - - -import com.vmware.vim.*; -import com.vmware.apputils.*; -import com.vmware.apputils.vim.*; - -import java.util.*; -import java.io.*; - -import java.lang.*; - -import java.rmi.RemoteException; - - -/* - * Used to obtain properties from Managed Object Reference from ESXi - */ - -public class GetProperty -{ - String[] args; - String entity; - String entityName; - - // Helpers from VI samples - private static ServiceContent content; - private static AppUtil cb = null; - private static VimPortType service; - private ManagedObjectReference moRef; - - // Measure of the property - private double measure; - - /* - * Gets first property that matches propertyName - * @param moRef, objet to get property from - * @param propertyName, name of the property - * @return representation of the property - */ - Object getObjectProperty(String propertyName) - throws RuntimeFault, RemoteException - { - return getProperties(new String[] { propertyName })[0]; - } - - /* - * Gets properties that matches any of the strings - * @param moRef, objet to get properties from - * @param propertyName, name of the property - * @return representation of the properties - */ - Object[] getProperties(String[] properties) - throws RuntimeFault, RemoteException - { - // PropertySpec specifies what properties to - // retrieve and from type of Managed Object - PropertySpec pSpec = new PropertySpec(); - pSpec.setType(moRef.getType()); - pSpec.setPathSet(properties); - - // ObjectSpec specifies the starting object and - // any TraversalSpecs used to specify other objects - // for consideration - ObjectSpec oSpec = new ObjectSpec(); - oSpec.setObj(moRef); - - // PropertyFilterSpec is used to hold the ObjectSpec and - // PropertySpec for the call - PropertyFilterSpec pfSpec = new PropertyFilterSpec(); - pfSpec.setPropSet(new PropertySpec[] {pSpec}); - pfSpec.setObjectSet(new ObjectSpec[] {oSpec}); - - // retrieveProperties() returns the properties - // selected from the PropertyFilterSpec - ObjectContent[] ocs = service.retrieveProperties( - content.getPropertyCollector(), - new PropertyFilterSpec[] {pfSpec}); - - // Return value, one object for each property specified - Object[] ret = new Object[properties.length]; - - if(ocs != null) - { - for(int i=0; i=1) - { - measure = longs[(longs.length-1)]; - return true; - } - } - } - } - } - } - } - } - else - { - return false; - } - } - return false; - } - - - private PerfEntityMetricBase[] getPerfIdsAvailable(PerfQuerySpec[] querySpecs, - ManagedObjectReference entityMoRef) throws Exception - { - PerfEntityMetricBase[] perfEntity = null; - - if (entityMoRef != null) - { - try - { - perfEntity - = cb.getConnection().getService().queryPerf(entityMoRef, querySpecs); - } - catch (Exception e) - { - - } - } - return perfEntity; - } - - public double getMeasure() - { - return measure; - } - - public boolean connect() - { - try - { - cb = AppUtil.initialize("GetProperty", null, args); - cb.connect(); - moRef = cb.getServiceUtil().getDecendentMoRef(null,entity, - entityName); - - com.vmware.apputils.vim.ServiceConnection sc = cb.getConnection(); - content = sc.getServiceContent(); - service = sc.getService(); - return true; - } - catch(Exception e) - { - return false; - } - - } - - public void disconnect() - { - try - { - cb.disConnect(); - } - catch(Exception e){} - } - - GetProperty(String[] arguments, String _entity, String _entityName) - { - args = arguments; - entity = _entity; - entityName = _entityName; - } -} diff --git a/src/im_mad/vmware/OneImVmware.java b/src/im_mad/vmware/OneImVmware.java deleted file mode 100644 index 403c325b7b..0000000000 --- a/src/im_mad/vmware/OneImVmware.java +++ /dev/null @@ -1,321 +0,0 @@ -/* -# -------------------------------------------------------------------------# -# Copyright 2002-2010, OpenNebula Project Leads (OpenNebula.org) # -# # -# Licensed under the Apache License, Version 2.0 (the "License"); you may # -# not use this file except in compliance with the License. You may obtain # -# a copy of the License at # -# # -# http://www.apache.org/licenses/LICENSE-2.0 # -# # -# Unless required by applicable law or agreed to in writing, software # -# distributed under the License is distributed on an "AS IS" BASIS, # -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # -# See the License for the specific language governing permissions and # -# limitations under the License. # -#--------------------------------------------------------------------------# -*/ - - -import java.io.*; -import java.text.*; -import java.util.*; - -import com.vmware.vim.*; -import com.vmware.apputils.*; -import com.vmware.apputils.vim.*; - - -/************************************ - * Monitors physical VMware hosts * - * through the VI API * - ************************************/ -class OneImVmware extends Thread -{ - - private String[] arguments; - - boolean debug; - - PrintStream stdout; - PrintStream stderr; - - // Entry point - main procedure - public static void main(String[] args) - { - boolean debug_flag; - - if (System.getProperty("debug").equals("1")) - { - debug_flag=true; - } - else - { - debug_flag=false; - } - - OneImVmware oiv = new OneImVmware(args,debug_flag); - oiv.loop(); - } - - // Constructor - OneImVmware(String[] args,boolean _debug) - { - debug = _debug; - arguments = args; - - // Get out and err descriptors - stdout = System.out; - stderr = System.err; - - // No VMware library output to standard out - // or err. This will be activated when needed - disable_standard_output(); - disable_standard_error(); - } - - - // Main loop - void loop() - { - String str = null; - String action = null; - String host; - String hid_str = null; - String hostToMonitor; - boolean end = false; - - BufferedReader in = new BufferedReader( - new InputStreamReader(System.in)); - - while (!end) - { - // Read a line a parse it - try - { - str = in.readLine(); - } - catch (IOException e) - { - String message = e.getMessage().replace('\n', ' '); - send_message(action + " FAILURE " + hid_str + " " + message); - send_error (action + " FAILURE " + hid_str + - " Action malformed. Reason: " + message); - } - - String str_split[] = str.split(" ", 4); - action = str_split[0].toUpperCase(); - - // Perform the action - if (action.equals("INIT")) - { - init(); - } - else if (action.equals("FINALIZE")) - { - finalize_mad(); - end = true; - } else if (str_split.length != 3) - { - send_message("FAILURE Unknown command"); - } - else - { - action = str_split[0].toUpperCase(); - hid_str = str_split[1]; - hostToMonitor = str_split[2]; - - if (action.equals("MONITOR")) - { - // Let's gather data from the host - - GetProperty gP; - boolean rf; - String response = "HYPERVISOR=vmware"; - - String[] argsWithHost = - new String[arguments.length+2]; - - for(int i=0;i - -# Uncomment the following line to active MAD debug -#ONE_MAD_DEBUG=1 - diff --git a/src/im_mad/vmware/one_im_vmware b/src/im_mad/vmware/one_im_vmware deleted file mode 100755 index 93ea86abea..0000000000 --- a/src/im_mad/vmware/one_im_vmware +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/bash - -# -------------------------------------------------------------------------- # -# Copyright 2002-2010, OpenNebula Project Leads (OpenNebula.org) # -# # -# Licensed under the Apache License, Version 2.0 (the "License"); you may # -# not use this file except in compliance with the License. You may obtain # -# a copy of the License at # -# # -# http://www.apache.org/licenses/LICENSE-2.0 # -# # -# Unless required by applicable law or agreed to in writing, software # -# distributed under the License is distributed on an "AS IS" BASIS, # -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # -# See the License for the specific language governing permissions and # -# limitations under the License. # -#--------------------------------------------------------------------------- # - - -#Setup driver variables -DRIVER_NAME="im_vmware" - -if [ -z "${ONE_LOCATION}" ]; then - DRIVERRC=/etc/one/${DRIVER_NAME}/${DRIVER_NAME}rc - MADCOMMON=/usr/lib/one/mads/madcommon.sh -else - DRIVERRC=$ONE_LOCATION/etc/${DRIVER_NAME}/${DRIVER_NAME}rc - MADCOMMON=$ONE_LOCATION/lib/mads/madcommon.sh -fi - -. $MADCOMMON - -# Export the im_mad specific rc - -export_rc_vars $DRIVERRC - -LOG_FILE=$DRIVER_NAME - -MAD_FILE="OneImVmware" - -if [ -z "${ONE_LOCATION}" ]; then - MAD_LOG_PATH=/var/log/one/$LOG_FILE.log -else - MAD_LOG_PATH=$ONE_LOCATION/var/$LOG_FILE.log -fi - -# Execute the actual MAD -if [ -n "${ONE_MAD_DEBUG}" ]; then - exec nice -n $PRIORITY java -cp $ONE_LOCATION/lib/mads:$CLASSPATH -Ddebug=$ONE_MAD_DEBUG -Djavax.net.ssl.trustStore=$VMWARE_TRUSTORE -Xmx1024M $MAD_FILE $* 2>> $MAD_LOG_PATH -else - exec nice -n $PRIORITY java -cp $ONE_LOCATION/lib/mads:$CLASSPATH -Ddebug=$ONE_MAD_DEBUG -Djavax.net.ssl.trustStore=$VMWARE_TRUSTORE -Xmx1024M $MAD_FILE $* 2> /dev/null -fi - - - diff --git a/src/tm_mad/vmware/tm_clone.sh b/src/tm_mad/vmware/tm_clone.sh deleted file mode 100755 index d099beb7b3..0000000000 --- a/src/tm_mad/vmware/tm_clone.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/bash - -# -------------------------------------------------------------------------- # -# Copyright 2002-2010, OpenNebula Project Leads (OpenNebula.org) # -# # -# Licensed under the Apache License, Version 2.0 (the "License"); you may # -# not use this file except in compliance with the License. You may obtain # -# a copy of the License at # -# # -# http://www.apache.org/licenses/LICENSE-2.0 # -# # -# Unless required by applicable law or agreed to in writing, software # -# distributed under the License is distributed on an "AS IS" BASIS, # -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # -# See the License for the specific language governing permissions and # -# limitations under the License. # -#--------------------------------------------------------------------------- # - -SRC=$1 -DST=$2 - -if [ -z "${ONE_LOCATION}" ]; then - TMCOMMON=/usr/lib/one/mads/tm_common.sh -else - TMCOMMON=$ONE_LOCATION/lib/mads/tm_common.sh -fi - -. $TMCOMMON - -SRC_PATH=`arg_path $SRC` - -log "$1 $2" - -case $SRC in -http://*) - log "Downloading $SRC" - exec_and_log "$SSH $DST_HOST $WGET -O $DST_PATH $SRC_PATH" - ;; - -*) - log "Cloning $SRC" - VM_ID=`echo $DST | $SED -e 's/.*\/\([0-9]\+\)\/images\/.*/\1/'` - cp -r $SRC_PATH $DATASTORE_PATH/one-$VM_ID &>/dev/null - mv $DATASTORE_PATH/one-$VM_ID/*.vmx $DATASTORE_PATH/one-$VM_ID/one-$VM_ID.vmx - ;; -esac - - diff --git a/src/tm_mad/vmware/tm_delete.sh b/src/tm_mad/vmware/tm_delete.sh deleted file mode 100755 index 2e6306f04d..0000000000 --- a/src/tm_mad/vmware/tm_delete.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash - -# -------------------------------------------------------------------------- # -# Copyright 2002-2010, OpenNebula Project Leads (OpenNebula.org) # -# # -# Licensed under the Apache License, Version 2.0 (the "License"); you may # -# not use this file except in compliance with the License. You may obtain # -# a copy of the License at # -# # -# http://www.apache.org/licenses/LICENSE-2.0 # -# # -# Unless required by applicable law or agreed to in writing, software # -# distributed under the License is distributed on an "AS IS" BASIS, # -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # -# See the License for the specific language governing permissions and # -# limitations under the License. # -#--------------------------------------------------------------------------- # - -if [ -z "${ONE_LOCATION}" ]; then - TMCOMMON=/usr/lib/one/mads/tm_common.sh -else - TMCOMMON=$ONE_LOCATION/lib/mads/tm_common.sh -fi - -. $TMCOMMON - -# We just need the bit -VM_ID=`echo $1 | $SED -e 's/.*\/\([0-9]\+\)\/images\/.*/\1/'` - -log "Deleting $SRC_PATH" -exec_and_log "rm -rf $DATASTORE_PATH/one-$VM_ID" diff --git a/src/tm_mad/vmware/tm_vmware.conf b/src/tm_mad/vmware/tm_vmware.conf deleted file mode 100644 index 7930a3b12f..0000000000 --- a/src/tm_mad/vmware/tm_vmware.conf +++ /dev/null @@ -1,6 +0,0 @@ -CLONE = vmware/tm_clone.sh -LN = dummy/tm_dummy.sh -MKSWAP = dummy/tm_dummy.sh -MKIMAGE = dummy/tm_dummy.sh -DELETE = vmware/tm_delete.sh -MV = dummy/tm_dummy.sh diff --git a/src/tm_mad/vmware/tm_vmwarerc b/src/tm_mad/vmware/tm_vmwarerc deleted file mode 100644 index b35183e2b8..0000000000 --- a/src/tm_mad/vmware/tm_vmwarerc +++ /dev/null @@ -1,21 +0,0 @@ -# -------------------------------------------------------------------------- # -# Copyright 2002-2010, OpenNebula Project Leads (OpenNebula.org) # -# # -# Licensed under the Apache License, Version 2.0 (the "License"); you may # -# not use this file except in compliance with the License. You may obtain # -# a copy of the License at # -# # -# http://www.apache.org/licenses/LICENSE-2.0 # -# # -# Unless required by applicable law or agreed to in writing, software # -# distributed under the License is distributed on an "AS IS" BASIS, # -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # -# See the License for the specific language governing permissions and # -# limitations under the License. # -#--------------------------------------------------------------------------- # - -# Uncomment the following line to active MAD debug -#ONE_MAD_DEBUG=1 - -# Local path of the datastore -DATASTORE_PATH=/images/vmware diff --git a/src/vmm_mad/vmware/DeployVM.java b/src/vmm_mad/vmware/DeployVM.java deleted file mode 100644 index 3b7135d9e6..0000000000 --- a/src/vmm_mad/vmware/DeployVM.java +++ /dev/null @@ -1,464 +0,0 @@ -/* -------------------------------------------------------------------------- */ -/* Copyright 2002-2010, OpenNebula Project Leads (OpenNebula.org) */ -/* */ -/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ -/* not use this file except in compliance with the License. You may obtain */ -/* a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ -/* See the License for the specific language governing permissions and */ -/* limitations under the License. */ -/* -------------------------------------------------------------------------- */ - - -import com.vmware.vim.*; -import com.vmware.apputils.*; -import com.vmware.apputils.vim.*; - -import java.util.*; -import java.io.*; - -import java.lang.*; - -import java.rmi.RemoteException; - - -/* - * Used to register a VM preloaded - */ - -public class DeployVM -{ - String[] args; - String hostName; - - // Helpers from VI samples - private static ServiceContent content; - static AppUtil cb = null; - private static VimPortType service; - - private String datacenterName = ""; - private String datastoreName = ""; - private String vmName = ""; - private String vmDiskName = ""; - private String vid = ""; - - - ParseXML pXML; - - // VM configuration objects - VirtualMachineConfigSpec vmConfigSpec; - VirtualMachineConfigInfo vmConfigInfo; - ManagedObjectReference virtualMachine; - - com.vmware.vim.ManagedObjectReference hostMor; - - public boolean registerVirtualMachine() throws Exception - { - boolean registered = false; - - ManagedObjectReference host = null; - - ManagedObjectReference dcmor - = cb.getServiceUtil().getDecendentMoRef(null, "Datacenter", getDataCenterName()); - - com.vmware.vim.ManagedObjectReference vmFolderMor - = (com.vmware.vim.ManagedObjectReference) - cb.getServiceUtil().getDynamicProperty(dcmor,"vmFolder"); - - // Default Host - com.vmware.vim.ManagedObjectReference hostFolderMor - = (com.vmware.vim.ManagedObjectReference) - cb.getServiceUtil().getDynamicProperty(dcmor,"hostFolder"); - - ArrayList hostList = (ArrayList)cb.getServiceUtil().getDecendentMoRefs( - hostFolderMor,"HostSystem"); - - if(hostList.size() < 1) - { - System.out.println("No host found in datacenter to" - +" register the Virtual Machine"); - return registered; - } - else - { - boolean hostFound = false; - for(int i=0; i 0) - { - ObjectContent snapobj = snaps[0]; - DynamicProperty[] snapary = snapobj.getPropSet(); - if (snapary != null && snapary.length > 0) - { - snapInfo = ((VirtualMachineSnapshotInfo)(snapary[0]).getVal()); - } - } - else - { - throw new Exception("No Snapshots found for VirtualMachine : " + vmName); - } - - VirtualMachineSnapshotTree[] snapTree = snapInfo.getRootSnapshotList(); - - if (snapTree == null) - { - throw new Exception("No Snapshots Tree found for VirtualMachine : " + vmName); - } - - snapmor = traverseSnapshotInTree(snapTree, vmName + ".checkpoint"); - - if (snapmor == null) - { - throw new Exception("No Snapshot named " + vmName + ".checkpoint" + - " found for VirtualMachine : " + vmName); - } - - ManagedObjectReference taskMor - = cb.getConnection().getService().revertToSnapshot_Task(snapmor,null); - String res = cb.getServiceUtil().waitForTask(taskMor); - - if(!res.equalsIgnoreCase("sucess")) // sic - { - throw new Exception("Unknown problem while creating the snapshot."); - } - - return true; - } - catch(Exception e) - { - System.out.println("Error restoring checkpoint of VirtualMachine " + vmName + ". Reason:" + e.getMessage()); - return false; - } - } - - private ManagedObjectReference traverseSnapshotInTree( - VirtualMachineSnapshotTree[] snapTree, - String checkpointName) - { - ManagedObjectReference snapmor = null; - if (snapTree == null) - { - return snapmor; - } - - for (int i = 0; i < snapTree.length && snapmor == null; i++) - { - VirtualMachineSnapshotTree node = snapTree[i]; - if ( checkpointName != null && node.getName().equals(checkpointName) ) - { - snapmor = node.getSnapshot(); - } - else - { - VirtualMachineSnapshotTree[] childTree = node.getChildSnapshotList(); - snapmor = traverseSnapshotInTree(childTree, checkpointName); - } - } - - return snapmor; - } - - - public boolean connect() - { - try - { - cb = AppUtil.initialize("OperationsOverVM", null, args); - cb.connect(); - - return true; - } - catch(Exception e) - { - return false; - } - - } - - public void disconnect() - { - try - { - cb.disConnect(); - } - catch(Exception e){} - } - - OperationsOverVM(String[] arguments, String hostName) throws Exception - { - args = new String[arguments.length+2]; - - for(int i=0;i home folder. -4. Install Apache Axis 1.4 [3] -5. Add all jars in $AXISHOME/lib and $SDKHOME/samples/Axis/java/lib/ to CLASSPATH -6. Go to OpenNebula source code directory and navigate to src/vmm_mad/vmware. Run the install-vmware.sh script. -7. Edit $ONE_LOCATION/etc/oned.conf and enable the tm_dummy TM MAD removing the leading # from each line. Also, add the following two MADs for VMWare: - -#------------------------------------------------------------------------------- -# VMWare Information Driver Manager sample configuration -#------------------------------------------------------------------------------- - IM_MAD = [ - name = "im_vmware", - executable = "one_im_vmware", - arguments = "--username --password ", - default = "im_vmware/im_vmware.conf" ] -#------------------------------------------------------------------------------- - -#------------------------------------------------------------------------------- -# VMWare Virtualization Driver Manager sample configuration -#------------------------------------------------------------------------------- - VM_MAD = [ - name = "vmm_vmware", - executable = "one_vmm_vmware", - arguments = "--username --password ", - default = "vmm_eh/vmm_eh.conf", - type = "xml" ] -#------------------------------------------------------------------------------- - -8. Add ESXi hosts using the following drivers: - -$ onehost add im_vmware vmm_vmware tm_dummy - -9. Create VMWare VM using the VI client. This can be created in an ESXi server and then shared among others using VMFS or (ideally) NFS. Be careful with the name of the datastore where the VMs are residing, at this stage of the VMWare drivers for OpenNebula it only supports "datastore1" for the datastore and "ha-datacenter" for the datacenter. This is hardcoded in the drivers, but also is the default installation for ESXi. - -10. Create a VM template using the name used for the VM in the VI client in step 9 as the Name of the OpenNebula VM. -11. Submit using "onevm create" - --- - -[1] http://www.vmware.com/support/developer/vc-sdk/ -[2] http://www.vmware.com/support/developer/vc-sdk/visdk25pubs/visdk25setupguide.pdf -[3] http://ws.apache.org/axis/ diff --git a/src/vmm_mad/vmware/install-vmware.sh b/src/vmm_mad/vmware/install-vmware.sh deleted file mode 100755 index efc8011dd2..0000000000 --- a/src/vmm_mad/vmware/install-vmware.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/bash - -if [ -z "${ONE_LOCATION}" ]; then - echo "ONE_LOCATION is not defined. Don't know where to copy, aborting." - exit -1 -fi - -echo -n "Installing VMWare drivers." - -if [ ! -f GetProperty.java ]; then - ln -s ../../im_mad/vmware/GetProperty.java GetProperty.java -fi - -javac *.java -cp *class $ONE_LOCATION/lib/mads -cp one_vmm_vmware $ONE_LOCATION/lib/mads -chmod +x $ONE_LOCATION/lib/mads/one_vmm_vmware - -echo -n "." - -cd ../../im_mad/vmware/ -javac *.java -cp *class $ONE_LOCATION/lib/mads -cp one_im_vmware $ONE_LOCATION/lib/mads -chmod +x $ONE_LOCATION/lib/mads/one_im_vmware -cd - &> /dev/null - -cd ../../tm_mad/vmware -mkdir -p $ONE_LOCATION/lib/tm_commands/vmware -cp *sh $ONE_LOCATION/lib/tm_commands/vmware - -echo -n "." - -mkdir -p $ONE_LOCATION/etc/im_vmware -mkdir -p $ONE_LOCATION/etc/vmm_vmware -mkdir -p $ONE_LOCATION/etc/tm_vmware - -cp tm_vmware.conf tm_vmwarerc $ONE_LOCATION/etc/tm_vmware -cp ../../vmm_mad/vmware/vmm_vmwarerc $ONE_LOCATION/etc/vmm_vmware -cp ../../im_mad/vmware/im_vmwarerc $ONE_LOCATION/etc/im_vmware - -echo "done" - - diff --git a/src/vmm_mad/vmware/one_vmm_vmware b/src/vmm_mad/vmware/one_vmm_vmware deleted file mode 100755 index 0193f21dee..0000000000 --- a/src/vmm_mad/vmware/one_vmm_vmware +++ /dev/null @@ -1,60 +0,0 @@ -#!/bin/bash - -# -------------------------------------------------------------------------- # -# Copyright 2002-2010, OpenNebula Project Leads (OpenNebula.org) # -# # -# Licensed under the Apache License, Version 2.0 (the "License"); you may # -# not use this file except in compliance with the License. You may obtain # -# a copy of the License at # -# # -# http://www.apache.org/licenses/LICENSE-2.0 # -# # -# Unless required by applicable law or agreed to in writing, software # -# distributed under the License is distributed on an "AS IS" BASIS, # -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # -# See the License for the specific language governing permissions and # -# limitations under the License. # -#--------------------------------------------------------------------------- # - - -#Setup driver variables -DRIVER_NAME="vmm_vmware" - -if [ -z "${ONE_LOCATION}" ]; then - DRIVERRC=/etc/one/${DRIVER_NAME}/${DRIVER_NAME}rc - MADCOMMON=/usr/lib/one/mads/madcommon.sh - VAR_LOCATION=/var/lib/one -else - DRIVERRC=$ONE_LOCATION/etc/${DRIVER_NAME}/${DRIVER_NAME}rc - MADCOMMON=$ONE_LOCATION/lib/mads/madcommon.sh - VAR_LOCATION=$ONE_LOCATION/var -fi - -. $MADCOMMON - -# Go to VAR_LOCATION -cd $VAR_LOCATION - -# Export the vmm_mad specific rc - -export_rc_vars $DRIVERRC - -LOG_FILE=$DRIVER_NAME - -MAD_FILE="OneVmmVmware" - -if [ -z "${ONE_LOCATION}" ]; then - MAD_LOG_PATH=/var/log/one/$LOG_FILE.log -else - MAD_LOG_PATH=$ONE_LOCATION/var/$LOG_FILE.log -fi - -# Execute the actual MAD -if [ -n "${ONE_MAD_DEBUG}" ]; then - exec nice -n $PRIORITY java -cp $ONE_LOCATION/lib/mads:$CLASSPATH -Ddatastore=$VMWARE_DATASTORE -Ddatacenter=$VMWARE_DATACENTER -Djavax.net.ssl.trustStore=$VMWARE_TRUSTORE -Ddebug=$ONE_MAD_DEBUG -Xmx1024M $MAD_FILE $* 2>> $MAD_LOG_PATH -else - exec nice -n $PRIORITY java -cp $ONE_LOCATION/lib/mads:$CLASSPATH -Ddatastore=$VMWARE_DATASTORE -Ddatacenter=$VMWARE_DATACENTER -Djavax.net.ssl.trustStore=$VMWARE_TRUSTORE -Xmx1024M $MAD_FILE $* 2> /dev/null -fi - - - diff --git a/src/vmm_mad/vmware/vmm_vmwarerc b/src/vmm_mad/vmware/vmm_vmwarerc deleted file mode 100644 index 99efd415cc..0000000000 --- a/src/vmm_mad/vmware/vmm_vmwarerc +++ /dev/null @@ -1,28 +0,0 @@ -# -------------------------------------------------------------------------- # -# Copyright 2002-2010, OpenNebula Project Leads (OpenNebula.org) # -# # -# Licensed under the Apache License, Version 2.0 (the "License"); you may # -# not use this file except in compliance with the License. You may obtain # -# a copy of the License at # -# # -# http://www.apache.org/licenses/LICENSE-2.0 # -# # -# Unless required by applicable law or agreed to in writing, software # -# distributed under the License is distributed on an "AS IS" BASIS, # -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # -# See the License for the specific language governing permissions and # -# limitations under the License. # -#--------------------------------------------------------------------------- # - -# This must point to a java keystore with appropriate certificates for accessing -# all the ESXi hosts -#VMWARE_TRUSTORE= - -# Uncomment the following line to active MAD debug -#ONE_MAD_DEBUG=1 - -# Datastore name -VMWARE_DATASTORE=datastore1 - -# Datacenter name -VMWARE_DATACENTER=ha-datacenter