Get the dependency org.apache.jclouds.provider/cloudsigma-zrh using jclouds Installation.
Start coding
// get a context with ibm that offers the portable ComputeService apiComputeServiceContextcontext=ContextBuilder.newBuilder("cloudsigma-zrh").credentials(email,password).modules(ImmutableSet.<Module>of(newLog4JLoggingModule(),newSshjSshClientModule())).buildView(ComputeServiceContext.class);// run a couple nodes accessible via group webservernodes=context.getComputeService().client.runNodesInGroup("webserver",2);// While the portable context is easier, you can always perform the same commands manually,// using the provider-specific context.CloudSigmaClientclient=CloudSigmaClient.class.cast(context.getProviderSpecificContext().getApi());// clone a drive from another driveDriveInfodrive=client.cloneDrive("source-id","name",size(sizeInBytesYesBytes));// Note you'll have to block until the drive has no exclusive lock before starting your server. Here's how I do it:booleansuccess=newRetryablePredicate<DriveInfo>(Predicates.not(newDriveClaimed(client)),maxDriveImageTime,1,TimeUnit.SECONDS).apply(drive);// After your boot disk is up, you can create a server with it as below. Names needn't be unique.:ServertoCreate=Servers.small(name,drive.getUuid(),defaultVncPassword).mem(ramMB).cpu(mhz).build();ServerInfonewServer=client.createServer(toCreate);// release resourcescontext.close();