Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixed networking dhcp problem

  • Loading branch information...
commit 95faa0f8979738dd5fd8bc65255afb6959c6bc41 1 parent 744543a
Patrick Debois authored
1  src/main/java/be/jedi/jvspherecontrol/commands/CreateVmCommand.java
View
@@ -337,6 +337,7 @@ public void validateArgs() throws MissingCLIArgumentException, InvalidCLIArgumen
//We need to check this against the available datacenter and datastores
vsphereDataCenterName=cmdLine.getOptionValue("datacenter");
vsphereDataStoreName=cmdLine.getOptionValue("datastore");
+ vsphereClusterName=cmdLine.getOptionValue("cluster");
/***** Disks *****/
9 src/main/java/be/jedi/jvspherecontrol/vsphere/VsphereServer.java
View
@@ -574,23 +574,24 @@ public VirtualMachine createVm(String vmName, long vmMemorySize, int vmCpuCount,
VmNic[] vmNics, String vmDataCenterName, String vmDataStoreName, String vmClusterName ) throws Exception {
// ManagedEntity[] mes = new InventoryNavigator(rootFolder).searchManagedEntities("VirtualMachine");
+ System.out.println("Datacenter:"+vmDataCenterName);
Datacenter dc = (Datacenter) new InventoryNavigator(rootFolder).searchManagedEntity("Datacenter", vmDataCenterName);
//Now find the correct resourcepool to create the vm
ManagedEntity[] resourcepools = new InventoryNavigator(rootFolder).searchManagedEntities("ResourcePool");
- ArrayList<String> resourcePoolList=new ArrayList<String>();
ResourcePool rp = null;
+
+ System.out.println("Cluster:"+vmClusterName);
for(int i=0; i<resourcepools.length; i++)
{
ResourcePool resourcepool = (ResourcePool) resourcepools[i];
- if (resourcepools[i].getName().equals(vmClusterName)) {
+ if (resourcepools[i].getParent().getName().equals(vmClusterName)) {
System.out.println("using cluster/resourcepool "+vmClusterName);
rp= (ResourcePool)resourcepools[i];
}
- resourcePoolList.add(resourcepool.getParent().getName());
}
Folder vmFolder = dc.getVmFolder();
@@ -674,7 +675,7 @@ public VirtualMachine createVm(String vmName, long vmMemorySize, int vmCpuCount,
System.out.println("VM could not be created. Error:");
if (task.getTaskInfo() != null && task.getTaskInfo().getError() != null)
{
- System.out.println("Task change ip detailed error :" + task.getTaskInfo().getError().getLocalizedMessage());
+ System.out.println("Task detailed error :" + task.getTaskInfo().getError().getLocalizedMessage());
}
System.exit(-1);
}
4 target/maven-archiver/pom.properties
View
@@ -1,5 +1,5 @@
#Generated by Maven
-#Tue Feb 15 14:29:15 CET 2011
-version=0.0.3-SNAPSHOT
+#Mon Feb 21 15:14:05 CET 2011
+version=0.0.4-SNAPSHOT
groupId=jvspherecontrol
artifactId=jvspherecontrol
Please sign in to comment.
Something went wrong with that request. Please try again.