Search in sources :

Example 1 with VirtualCdrom

use of com.vmware.vim25.VirtualCdrom in project CloudStack-archive by CloudStack-extras.

the class VirtualMachineMO method attachIso.

// isoDatastorePath: [datastore name] isoFilePath
public void attachIso(String isoDatastorePath, ManagedObjectReference morDs, boolean connect, boolean connectAtBoot) throws Exception {
    if (s_logger.isTraceEnabled())
        s_logger.trace("vCenter API trace - detachIso(). target MOR: " + _mor.get_value() + ", isoDatastorePath: " + isoDatastorePath + ", datastore: " + morDs.get_value() + ", connect: " + connect + ", connectAtBoot: " + connectAtBoot);
    assert (isoDatastorePath != null);
    assert (morDs != null);
    boolean newCdRom = false;
    VirtualCdrom cdRom = (VirtualCdrom) getIsoDevice();
    if (cdRom == null) {
        newCdRom = true;
        cdRom = new VirtualCdrom();
        cdRom.setControllerKey(getIDEDeviceControllerKey());
        int deviceNumber = getNextIDEDeviceNumber();
        cdRom.setUnitNumber(deviceNumber);
        cdRom.setKey(-deviceNumber);
    }
    VirtualDeviceConnectInfo cInfo = new VirtualDeviceConnectInfo();
    cInfo.setConnected(connect);
    cInfo.setStartConnected(connectAtBoot);
    cdRom.setConnectable(cInfo);
    VirtualCdromIsoBackingInfo backingInfo = new VirtualCdromIsoBackingInfo();
    backingInfo.setFileName(isoDatastorePath);
    backingInfo.setDatastore(morDs);
    cdRom.setBacking(backingInfo);
    VirtualMachineConfigSpec reConfigSpec = new VirtualMachineConfigSpec();
    VirtualDeviceConfigSpec[] deviceConfigSpecArray = new VirtualDeviceConfigSpec[1];
    VirtualDeviceConfigSpec deviceConfigSpec = new VirtualDeviceConfigSpec();
    deviceConfigSpec.setDevice(cdRom);
    if (newCdRom) {
        deviceConfigSpec.setOperation(VirtualDeviceConfigSpecOperation.add);
    } else {
        deviceConfigSpec.setOperation(VirtualDeviceConfigSpecOperation.edit);
    }
    deviceConfigSpecArray[0] = deviceConfigSpec;
    reConfigSpec.setDeviceChange(deviceConfigSpecArray);
    ManagedObjectReference morTask = _context.getService().reconfigVM_Task(_mor, reConfigSpec);
    String result = _context.getServiceUtil().waitForTask(morTask);
    if (!result.equals("sucess")) {
        if (s_logger.isTraceEnabled())
            s_logger.trace("vCenter API trace - detachIso() done(failed)");
        throw new Exception("Failed to attach ISO due to " + TaskMO.getTaskFailureInfo(_context, morTask));
    }
    _context.waitForTaskProgressDone(morTask);
    if (s_logger.isTraceEnabled())
        s_logger.trace("vCenter API trace - detachIso() done(successfully)");
}
Also used : VirtualMachineConfigSpec(com.vmware.vim25.VirtualMachineConfigSpec) VirtualCdromIsoBackingInfo(com.vmware.vim25.VirtualCdromIsoBackingInfo) VirtualDeviceConfigSpec(com.vmware.vim25.VirtualDeviceConfigSpec) VirtualCdrom(com.vmware.vim25.VirtualCdrom) VirtualDeviceConnectInfo(com.vmware.vim25.VirtualDeviceConnectInfo) ArrayOfManagedObjectReference(com.vmware.vim25.ArrayOfManagedObjectReference) ManagedObjectReference(com.vmware.vim25.ManagedObjectReference)

Example 2 with VirtualCdrom

use of com.vmware.vim25.VirtualCdrom in project photon-model by vmware.

the class ClientUtils method attachDiskToVM.

public static String attachDiskToVM(ArrayOfVirtualDevice devices, ManagedObjectReference vm, DiskService.DiskStateExpanded diskState, ManagedObjectReference diskDatastore, Connection connection, VimPortType vimPort) throws Exception {
    String diskPath = VimUtils.uriToDatastorePath(diskState.sourceImageReference);
    String diskFullPath = CustomProperties.of(diskState).getString(DISK_FULL_PATH, null);
    Boolean insertCdRom = CustomProperties.of(diskState).getBoolean(INSERT_CDROM, false);
    VirtualDeviceConfigSpec deviceConfigSpec = null;
    if (diskState.type == DiskService.DiskType.HDD) {
        VirtualSCSIController scsiController = getFirstScsiController(devices);
        // Get available free unit numbers for the given scsi controller.
        Integer[] scsiUnits = findFreeScsiUnit(scsiController, devices.getVirtualDevice());
        List<VirtualMachineDefinedProfileSpec> pbmSpec = getPbmProfileSpec(diskState);
        deviceConfigSpec = createHdd(scsiController.getKey(), scsiUnits[0], diskState, diskFullPath, diskDatastore, pbmSpec, false);
    } else if (diskState.type == DiskService.DiskType.CDROM) {
        if (insertCdRom) {
            if (diskPath == null) {
                throw new IllegalStateException(String.format("Cannot insert empty iso file into CD-ROM"));
            }
            // Find first available CD ROM to insert the iso file
            VirtualCdrom cdrom = devices.getVirtualDevice().stream().filter(d -> d instanceof VirtualCdrom).map(d -> (VirtualCdrom) d).findFirst().orElse(null);
            if (cdrom == null) {
                throw new IllegalStateException(String.format("Could not find Virtual CD ROM to insert %s.", diskPath));
            }
            insertCdrom(cdrom, diskPath);
            deviceConfigSpec = new VirtualDeviceConfigSpec();
            deviceConfigSpec.setDevice(cdrom);
            deviceConfigSpec.setOperation(VirtualDeviceConfigSpecOperation.EDIT);
        } else {
            VirtualDevice ideController = getFirstIdeController(devices);
            int ideUnit = findFreeUnit(ideController, devices.getVirtualDevice());
            int availableUnitNumber = nextUnitNumber(ideUnit);
            deviceConfigSpec = createCdrom(ideController, availableUnitNumber);
            fillInControllerUnitNumber(diskState, availableUnitNumber);
            if (diskPath != null) {
                // mount iso image
                insertCdrom((VirtualCdrom) deviceConfigSpec.getDevice(), diskPath);
            }
            // Live add of cd-rom is not possible. Hence it needs to be powered off
            // Power off is needed to ADD cd-rom
            powerOffVm(connection, vimPort, vm);
        }
    } else if (diskState.type == DiskService.DiskType.FLOPPY) {
        VirtualDevice sioController = getFirstSioController(devices);
        int sioUnit = findFreeUnit(sioController, devices.getVirtualDevice());
        int availableUnitNumber = nextUnitNumber(sioUnit);
        deviceConfigSpec = createFloppy(sioController, availableUnitNumber);
        fillInControllerUnitNumber(diskState, availableUnitNumber);
        if (diskPath != null) {
            insertFloppy((VirtualFloppy) deviceConfigSpec.getDevice(), diskPath);
        }
        // Power off is needed to ADD floppy
        powerOffVm(connection, vimPort, vm);
    }
    VirtualMachineConfigSpec spec = new VirtualMachineConfigSpec();
    spec.getDeviceChange().add(deviceConfigSpec);
    ManagedObjectReference reconfigureTask = vimPort.reconfigVMTask(vm, spec);
    TaskInfo info = VimUtils.waitTaskEnd(connection, reconfigureTask);
    if (info.getState() == TaskInfoState.ERROR) {
        VimUtils.rethrow(info.getError());
    }
    if (!insertCdRom && diskState.type != DiskService.DiskType.HDD) {
        // This means it is CDROM or Floppy. Hence power on the VM as it is powered off to
        // perform the operation
        powerOnVM(connection, vimPort, vm);
    }
    return diskFullPath;
}
Also used : PbmPlacementHub(com.vmware.pbm.PbmPlacementHub) SSLContext(javax.net.ssl.SSLContext) VirtualMachineConfigSpec(com.vmware.vim25.VirtualMachineConfigSpec) InvalidDatastoreFaultMsg(com.vmware.vim25.InvalidDatastoreFaultMsg) ArrayOfVirtualDevice(com.vmware.vim25.ArrayOfVirtualDevice) StringUtils(org.apache.commons.lang3.StringUtils) FileNotFoundFaultMsg(com.vmware.vim25.FileNotFoundFaultMsg) VirtualDeviceConnectInfo(com.vmware.vim25.VirtualDeviceConnectInfo) Utils(com.vmware.xenon.common.Utils) Map(java.util.Map) PbmProfileId(com.vmware.pbm.PbmProfileId) VirtualDeviceConfigSpecFileOperation(com.vmware.vim25.VirtualDeviceConfigSpecFileOperation) VimPortType(com.vmware.vim25.VimPortType) ServiceDocumentQueryResult(com.vmware.xenon.common.ServiceDocumentQueryResult) VirtualDevice(com.vmware.vim25.VirtualDevice) EnumSet(java.util.EnumSet) FinderException(com.vmware.photon.controller.model.adapters.vsphere.util.finders.FinderException) VirtualDiskFlatVer1BackingInfo(com.vmware.vim25.VirtualDiskFlatVer1BackingInfo) LIMIT_IOPS(com.vmware.photon.controller.model.adapters.vsphere.CustomProperties.LIMIT_IOPS) GregorianCalendar(java.util.GregorianCalendar) KeyManagementException(java.security.KeyManagementException) ServiceClient(com.vmware.xenon.common.ServiceClient) Executors(java.util.concurrent.Executors) NettyHttpServiceClient(com.vmware.xenon.common.http.netty.NettyHttpServiceClient) PERSISTENT(com.vmware.vim25.VirtualDiskMode.PERSISTENT) StorageDescriptionService(com.vmware.photon.controller.model.resources.StorageDescriptionService) NoSuchAlgorithmException(java.security.NoSuchAlgorithmException) UriUtils(com.vmware.xenon.common.UriUtils) VirtualFloppy(com.vmware.vim25.VirtualFloppy) Finder(com.vmware.photon.controller.model.adapters.vsphere.util.finders.Finder) INSERT_CDROM(com.vmware.photon.controller.model.constants.PhotonModelConstants.INSERT_CDROM) RuntimeFaultFaultMsg(com.vmware.vim25.RuntimeFaultFaultMsg) VirtualCdromAtapiBackingInfo(com.vmware.vim25.VirtualCdromAtapiBackingInfo) ArrayList(java.util.ArrayList) VirtualCdrom(com.vmware.vim25.VirtualCdrom) DISK_FULL_PATH(com.vmware.photon.controller.model.adapters.vsphere.CustomProperties.DISK_FULL_PATH) Calendar(java.util.Calendar) DEVICE_STATUS(com.vmware.photon.controller.model.adapters.vsphere.CustomProperties.DEVICE_STATUS) ScheduledExecutorService(java.util.concurrent.ScheduledExecutorService) FileFaultFaultMsg(com.vmware.vim25.FileFaultFaultMsg) AdapterUtils(com.vmware.photon.controller.model.adapters.util.AdapterUtils) VirtualDeviceConfigSpec(com.vmware.vim25.VirtualDeviceConfigSpec) QueryUtils(com.vmware.photon.controller.model.query.QueryUtils) VirtualDeviceBackingInfo(com.vmware.vim25.VirtualDeviceBackingInfo) PROVIDER_DISK_UNIQUE_ID(com.vmware.photon.controller.model.adapters.vsphere.CustomProperties.PROVIDER_DISK_UNIQUE_ID) ManagedObjectReference(com.vmware.vim25.ManagedObjectReference) VirtualDisk(com.vmware.vim25.VirtualDisk) Paths(java.nio.file.Paths) SHARES_LEVEL(com.vmware.photon.controller.model.adapters.vsphere.CustomProperties.SHARES_LEVEL) X509TrustManager(javax.net.ssl.X509TrustManager) StorageIOAllocationInfo(com.vmware.vim25.StorageIOAllocationInfo) VirtualDiskType(com.vmware.vim25.VirtualDiskType) Service(com.vmware.xenon.common.Service) SHARES(com.vmware.photon.controller.model.adapters.vsphere.CustomProperties.SHARES) URISyntaxException(java.net.URISyntaxException) QueryTask(com.vmware.xenon.services.common.QueryTask) LoggerFactory(org.slf4j.LoggerFactory) TrustManager(javax.net.ssl.TrustManager) DiskType(com.vmware.photon.controller.model.resources.DiskService.DiskType) VirtualDeviceFileBackingInfo(com.vmware.vim25.VirtualDeviceFileBackingInfo) Connection(com.vmware.photon.controller.model.adapters.vsphere.util.connection.Connection) URI(java.net.URI) TaskInfo(com.vmware.vim25.TaskInfo) VirtualDiskFlatVer2BackingInfo(com.vmware.vim25.VirtualDiskFlatVer2BackingInfo) SharesInfo(com.vmware.vim25.SharesInfo) VirtualCdromIsoBackingInfo(com.vmware.vim25.VirtualCdromIsoBackingInfo) DiskStateExpanded(com.vmware.photon.controller.model.resources.DiskService.DiskStateExpanded) Collectors(java.util.stream.Collectors) ServiceHost(com.vmware.xenon.common.ServiceHost) Objects(java.util.Objects) List(java.util.List) InvalidPropertyFaultMsg(com.vmware.vim25.InvalidPropertyFaultMsg) PROVISION_TYPE(com.vmware.photon.controller.model.adapters.vsphere.CustomProperties.PROVISION_TYPE) DiskService(com.vmware.photon.controller.model.resources.DiskService) DISK_MODE_INDEPENDENT(com.vmware.photon.controller.model.adapters.vsphere.CustomProperties.DISK_MODE_INDEPENDENT) PhotonModelUriUtils(com.vmware.photon.controller.model.util.PhotonModelUriUtils) HashMap(java.util.HashMap) DISK_MODE_PERSISTENT(com.vmware.photon.controller.model.adapters.vsphere.CustomProperties.DISK_MODE_PERSISTENT) Level(java.util.logging.Level) DEVICE_CONNECTED(com.vmware.photon.controller.model.adapters.vsphere.CustomProperties.DEVICE_CONNECTED) ComputeState(com.vmware.photon.controller.model.resources.ComputeService.ComputeState) InvalidDatastorePathFaultMsg(com.vmware.vim25.InvalidDatastorePathFaultMsg) SharesLevel(com.vmware.vim25.SharesLevel) Logger(org.slf4j.Logger) Element(com.vmware.photon.controller.model.adapters.vsphere.util.finders.Element) VirtualIDEController(com.vmware.vim25.VirtualIDEController) VirtualFloppyDeviceBackingInfo(com.vmware.vim25.VirtualFloppyDeviceBackingInfo) Operation(com.vmware.xenon.common.Operation) PbmFaultFaultMsg(com.vmware.pbm.PbmFaultFaultMsg) DISK_CONTROLLER_NUMBER(com.vmware.photon.controller.model.adapters.vsphere.CustomProperties.DISK_CONTROLLER_NUMBER) VirtualSCSIController(com.vmware.vim25.VirtualSCSIController) VirtualDiskMode(com.vmware.vim25.VirtualDiskMode) VimNames(com.vmware.photon.controller.model.adapters.vsphere.util.VimNames) Consumer(java.util.function.Consumer) VirtualDeviceConfigSpecOperation(com.vmware.vim25.VirtualDeviceConfigSpecOperation) VirtualFloppyImageBackingInfo(com.vmware.vim25.VirtualFloppyImageBackingInfo) VirtualMachineDefinedProfileSpec(com.vmware.vim25.VirtualMachineDefinedProfileSpec) VirtualSIOController(com.vmware.vim25.VirtualSIOController) VIRTUAL_MACHINE_LINK(com.vmware.photon.controller.model.adapters.vsphere.CustomProperties.VIRTUAL_MACHINE_LINK) TaskInfoState(com.vmware.vim25.TaskInfoState) VirtualDeviceConfigSpec(com.vmware.vim25.VirtualDeviceConfigSpec) VirtualSCSIController(com.vmware.vim25.VirtualSCSIController) VirtualCdrom(com.vmware.vim25.VirtualCdrom) ArrayOfVirtualDevice(com.vmware.vim25.ArrayOfVirtualDevice) VirtualDevice(com.vmware.vim25.VirtualDevice) VirtualMachineDefinedProfileSpec(com.vmware.vim25.VirtualMachineDefinedProfileSpec) TaskInfo(com.vmware.vim25.TaskInfo) VirtualMachineConfigSpec(com.vmware.vim25.VirtualMachineConfigSpec) ManagedObjectReference(com.vmware.vim25.ManagedObjectReference)

Example 3 with VirtualCdrom

use of com.vmware.vim25.VirtualCdrom in project photon-model by vmware.

the class VSphereAdapterInstanceService method updateDiskLinksAfterProvisionSuccess.

/**
 * Update the details of the disk into compute state after the provisioning is successful
 */
private void updateDiskLinksAfterProvisionSuccess(ComputeState state, List<VirtualDevice> disks, ProvisionContext ctx) {
    ArrayList<String> diskLinks = new ArrayList<>(disks.size());
    // Fill in the disk links from the input to the ComputeState, as it may contain non hdd
    // disk as well. For ex, Floppy or CD-Rom
    ctx.disks.stream().forEach(ds -> diskLinks.add(ds.documentSelfLink));
    // Handle all the HDD disk
    for (VirtualDevice disk : disks) {
        DiskStateExpanded matchedDs = findMatchingDiskState(disk, ctx.disks);
        if (disk instanceof VirtualDisk) {
            handleVirtualDiskUpdate(ctx.child.endpointLink, matchedDs, (VirtualDisk) disk, diskLinks, ctx.parent.description.regionId, this, CustomProperties.of(state).getString(CustomProperties.MOREF), CustomProperties.of(state).getString(CustomProperties.DATACENTER_SELF_LINK), null, null).sendWith(this);
        } else if (disk instanceof VirtualCdrom) {
            handleVirtualDeviceUpdate(ctx.child.endpointLink, matchedDs, DiskType.CDROM, disk, diskLinks, ctx.parent.description.regionId, this, true, CustomProperties.of(state).getString(CustomProperties.DATACENTER_SELF_LINK)).sendWith(this);
        } else if (disk instanceof VirtualFloppy) {
            handleVirtualDeviceUpdate(ctx.child.endpointLink, matchedDs, DiskType.FLOPPY, disk, diskLinks, ctx.parent.description.regionId, this, true, CustomProperties.of(state).getString(CustomProperties.DATACENTER_SELF_LINK)).sendWith(this);
        }
    }
    state.diskLinks = diskLinks;
}
Also used : VirtualCdrom(com.vmware.vim25.VirtualCdrom) ArrayList(java.util.ArrayList) VirtualDevice(com.vmware.vim25.VirtualDevice) DiskStateExpanded(com.vmware.photon.controller.model.resources.DiskService.DiskStateExpanded) VirtualFloppy(com.vmware.vim25.VirtualFloppy) VirtualDisk(com.vmware.vim25.VirtualDisk)

Example 4 with VirtualCdrom

use of com.vmware.vim25.VirtualCdrom in project photon-model by vmware.

the class InstanceClient method reconfigureCdrom.

private VirtualDeviceConfigSpec reconfigureCdrom(VirtualCdrom vcd) {
    VirtualCdrom cdrom = new VirtualCdrom();
    cdrom.setControllerKey(vcd.getControllerKey());
    cdrom.setKey(vcd.getKey());
    cdrom.setUnitNumber(vcd.getUnitNumber());
    VirtualDeviceConnectInfo info = new VirtualDeviceConnectInfo();
    info.setAllowGuestControl(true);
    info.setConnected(true);
    info.setStartConnected(true);
    cdrom.setConnectable(info);
    cdrom.setBacking(vcd.getBacking());
    VirtualDeviceConfigSpec spec = new VirtualDeviceConfigSpec();
    spec.setDevice(cdrom);
    spec.setOperation(VirtualDeviceConfigSpecOperation.EDIT);
    return spec;
}
Also used : VirtualDeviceConfigSpec(com.vmware.vim25.VirtualDeviceConfigSpec) VirtualCdrom(com.vmware.vim25.VirtualCdrom) VirtualDeviceConnectInfo(com.vmware.vim25.VirtualDeviceConnectInfo)

Example 5 with VirtualCdrom

use of com.vmware.vim25.VirtualCdrom in project cloudstack by apache.

the class VirtualMachineMO method attachIso.

// isoDatastorePath: [datastore name] isoFilePath
public void attachIso(String isoDatastorePath, ManagedObjectReference morDs, boolean connect, boolean connectAtBoot, Integer key, boolean force) throws Exception {
    if (s_logger.isTraceEnabled())
        s_logger.trace("vCenter API trace - attachIso(). target MOR: " + _mor.getValue() + ", isoDatastorePath: " + isoDatastorePath + ", datastore: " + morDs.getValue() + ", connect: " + connect + ", connectAtBoot: " + connectAtBoot);
    assert (isoDatastorePath != null);
    assert (morDs != null);
    boolean newCdRom = false;
    VirtualCdrom cdRom;
    if (key == null) {
        cdRom = (VirtualCdrom) getIsoDevice();
    } else {
        cdRom = (VirtualCdrom) getIsoDevice(key);
    }
    if (cdRom == null) {
        newCdRom = true;
        cdRom = new VirtualCdrom();
        cdRom.setControllerKey(getIDEDeviceControllerKey());
        int deviceNumber = getNextIDEDeviceNumber();
        cdRom.setUnitNumber(deviceNumber);
        cdRom.setKey(-deviceNumber);
    }
    VirtualDeviceConnectInfo cInfo = new VirtualDeviceConnectInfo();
    cInfo.setConnected(connect);
    cInfo.setStartConnected(connectAtBoot);
    cdRom.setConnectable(cInfo);
    VirtualCdromIsoBackingInfo backingInfo = new VirtualCdromIsoBackingInfo();
    backingInfo.setFileName(isoDatastorePath);
    backingInfo.setDatastore(morDs);
    cdRom.setBacking(backingInfo);
    VirtualMachineConfigSpec reConfigSpec = new VirtualMachineConfigSpec();
    // VirtualDeviceConfigSpec[] deviceConfigSpecArray = new VirtualDeviceConfigSpec[1];
    VirtualDeviceConfigSpec deviceConfigSpec = new VirtualDeviceConfigSpec();
    deviceConfigSpec.setDevice(cdRom);
    if (newCdRom) {
        deviceConfigSpec.setOperation(VirtualDeviceConfigSpecOperation.ADD);
    } else {
        deviceConfigSpec.setOperation(VirtualDeviceConfigSpecOperation.EDIT);
    }
    // deviceConfigSpecArray[0] = deviceConfigSpec;
    reConfigSpec.getDeviceChange().add(deviceConfigSpec);
    ManagedObjectReference morTask = _context.getService().reconfigVMTask(_mor, reConfigSpec);
    final Boolean[] flags = { false };
    final VirtualMachineMO vmMo = this;
    Future<?> future = answerVmwareQuestion(flags, vmMo, force);
    try {
        boolean result = _context.getVimClient().waitForTask(morTask);
        if (!result) {
            if (s_logger.isTraceEnabled())
                s_logger.trace("vCenter API trace - attachIso() done(failed)");
            throw new Exception("Failed to attach ISO due to " + TaskMO.getTaskFailureInfo(_context, morTask));
        }
        _context.waitForTaskProgressDone(morTask);
        if (s_logger.isTraceEnabled())
            s_logger.trace("vCenter API trace - attachIso() done(successfully)");
    } finally {
        flags[0] = true;
        future.cancel(true);
    }
}
Also used : VirtualCdromIsoBackingInfo(com.vmware.vim25.VirtualCdromIsoBackingInfo) VirtualDeviceConfigSpec(com.vmware.vim25.VirtualDeviceConfigSpec) VirtualCdrom(com.vmware.vim25.VirtualCdrom) VirtualDeviceConnectInfo(com.vmware.vim25.VirtualDeviceConnectInfo) CloudRuntimeException(com.cloud.utils.exception.CloudRuntimeException) VirtualMachineConfigSpec(com.vmware.vim25.VirtualMachineConfigSpec) ArrayOfManagedObjectReference(com.vmware.vim25.ArrayOfManagedObjectReference) ManagedObjectReference(com.vmware.vim25.ManagedObjectReference)

Aggregations

VirtualCdrom (com.vmware.vim25.VirtualCdrom)11 VirtualDeviceConnectInfo (com.vmware.vim25.VirtualDeviceConnectInfo)10 VirtualDeviceConfigSpec (com.vmware.vim25.VirtualDeviceConfigSpec)8 VirtualCdromIsoBackingInfo (com.vmware.vim25.VirtualCdromIsoBackingInfo)7 ManagedObjectReference (com.vmware.vim25.ManagedObjectReference)6 VirtualMachineConfigSpec (com.vmware.vim25.VirtualMachineConfigSpec)6 ArrayOfManagedObjectReference (com.vmware.vim25.ArrayOfManagedObjectReference)5 DiskService (com.vmware.photon.controller.model.resources.DiskService)4 DISK_CONTROLLER_NUMBER (com.vmware.photon.controller.model.adapters.vsphere.CustomProperties.DISK_CONTROLLER_NUMBER)3 VirtualDeviceConfigSpecOperation (com.vmware.vim25.VirtualDeviceConfigSpecOperation)3 Operation (com.vmware.xenon.common.Operation)3 Pair (com.cloud.utils.Pair)2 ObjectNode (com.fasterxml.jackson.databind.node.ObjectNode)2 RESOURCE_GROUP_NAME (com.vmware.photon.controller.model.ComputeProperties.RESOURCE_GROUP_NAME)2 ComputeInstanceRequest (com.vmware.photon.controller.model.adapterapi.ComputeInstanceRequest)2 VM_PATH_FORMAT (com.vmware.photon.controller.model.adapters.vsphere.ClientUtils.VM_PATH_FORMAT)2 ClientUtils.createCdrom (com.vmware.photon.controller.model.adapters.vsphere.ClientUtils.createCdrom)2 ClientUtils.createFloppy (com.vmware.photon.controller.model.adapters.vsphere.ClientUtils.createFloppy)2 ClientUtils.createHdd (com.vmware.photon.controller.model.adapters.vsphere.ClientUtils.createHdd)2 ClientUtils.detachDisk (com.vmware.photon.controller.model.adapters.vsphere.ClientUtils.detachDisk)2