Java Example of
Powering On a Virtual Machine
This example is
based on the code in the
EthernetConfiguration.java
sample file.
For a complete and up-to-date version of the Java
sample code, see the
vsphere-automation-sdk-java
VMware
repository at GitHub. ... private String vmName; private String vmId; private Power powerService; ... this.powerService = vapiAuthHelper.getStubFactory().createStub( Power.class, this.sessionStubConfig); this.vmId = VmHelper.getVM(vapiAuthHelper.getStubFactory(), sessionStubConfig, vmName); this.powerService.start(this.vmId); ...