VirtualMachineConfigSpec vmConfigSpec = new VirtualMachineConfigSpec();
vmConfigSpec.setDeviceChange(new VirtualDeviceConfigSpec []{nicSpec});
Task task = vm.reconfigVM_Task(vmConfigSpec);
task.waitForTask(200, 100);
}
private VirtualDeviceConfigSpec createNicSpec( VirtualNetworkAdapterType adapterType, String networkName, String macAddress, boolean wakeOnLan, boolean startConnected, ConfigTarget configTarget)
{
VirtualDeviceConfigSpec result = null;