Source:
<code>private void resizeRootDisk(VirtualMachineMO vmMo, DiskTO rootDiskTO, VmwareHypervisorHost hyperHost, VmwareContext context) throws Exception { Pair<VirtualDisk, String> vdisk = getVirtualDiskInfo(vmMo, rootDiskTO.getPath() + ".vmdk"); assert(vdisk != null); Long reqSize=((VolumeObjectTO)rootDiskTO.getData()).getSize()/1024; VirtualDisk disk = vdisk.first(); if(reqSize > disk.getCapacityInKB()) { VirtualMachineDiskInfo diskInfo = getMatchingExistingDisk(vmMo.getDiskInfoBuilder(), rootDiskTO, hyperHost, context); assert (diskInfo != null); String[] diskChain = diskInfo.getDiskChain(); if(diskChain!=null && diskChain.length>1) { s_logger.error("Unsupported Disk chain length "+ diskChain.length); throw new Exception("Unsupported Disk chain length "+ diskChain.length); } <START> if(diskInfo.getDiskDeviceBusName()==null || !diskInfo.getDiskDeviceBusName().toLowerCase().contains("scsi")) <END> { s_logger.error("Unsupported root disk device bus "+ diskInfo.getDiskDeviceBusName() ); throw new Exception("Unsupported root disk device bus "+ diskInfo.getDiskDeviceBusName()); } disk.setCapacityInKB(reqSize); VirtualMachineConfigSpec vmConfigSpec = new VirtualMachineConfigSpec(); VirtualDeviceConfigSpec deviceConfigSpec = new VirtualDeviceConfigSpec(); deviceConfigSpec.setDevice(disk); deviceConfigSpec.setOperation(VirtualDeviceConfigSpecOperation.EDIT); vmConfigSpec.getDeviceChange().add(deviceConfigSpec); if (!vmMo.configureVm(vmConfigSpec)) { throw new Exception("Failed to configure VM for given root disk size. vmName: " + vmMo.getName()); } } }</code><technical_language>startsWith("scsi")</technical_language>

Target:
private void resizeRootDisk(VirtualMachineMO vmMo, DiskTO rootDiskTO, VmwareHypervisorHost hyperHost, VmwareContext context) throws Exception { Pair<VirtualDisk, String> vdisk = getVirtualDiskInfo(vmMo, rootDiskTO.getPath() + ".vmdk"); assert(vdisk != null); Long reqSize=((VolumeObjectTO)rootDiskTO.getData()).getSize()/1024; VirtualDisk disk = vdisk.first(); if (reqSize > disk.getCapacityInKB()) { VirtualMachineDiskInfo diskInfo = getMatchingExistingDisk(vmMo.getDiskInfoBuilder(), rootDiskTO, hyperHost, context); assert (diskInfo != null); String[] diskChain = diskInfo.getDiskChain(); if (diskChain != null && diskChain.length>1) { s_logger.error("Unsupported Disk chain length "+ diskChain.length); throw new Exception("Unsupported Disk chain length "+ diskChain.length); } if (diskInfo.getDiskDeviceBusName() == null || !diskInfo.getDiskDeviceBusName().toLowerCase().startsWith("scsi")) { s_logger.error("Unsupported root disk device bus "+ diskInfo.getDiskDeviceBusName() ); throw new Exception("Unsupported root disk device bus "+ diskInfo.getDiskDeviceBusName()); } disk.setCapacityInKB(reqSize); VirtualMachineConfigSpec vmConfigSpec = new VirtualMachineConfigSpec(); VirtualDeviceConfigSpec deviceConfigSpec = new VirtualDeviceConfigSpec(); deviceConfigSpec.setDevice(disk); deviceConfigSpec.setOperation(VirtualDeviceConfigSpecOperation.EDIT); vmConfigSpec.getDeviceChange().add(deviceConfigSpec); if (!vmMo.configureVm(vmConfigSpec)) { throw new Exception("Failed to configure VM for given root disk size. vmName: " + vmMo.getName()); } } }