if (iMedium.getDeviceType().equals(DeviceType.HardDisk)) {
storageControllerBuilder.attachHardDisk(HardDisk.builder().diskpath(iMedium.getLocation())
.autoDelete(true).controllerPort(iMediumAttachment.getPort())
.deviceSlot(iMediumAttachment.getDevice().intValue()).build());
} else if (iMedium.getDeviceType().equals(DeviceType.DVD)) {
storageControllerBuilder.attachISO(iMediumAttachment.getPort(), iMediumAttachment.getDevice().intValue(),
iMedium.getLocation());
}
}
}
controllers.add(storageControllerBuilder.name(iStorageController.getName()).bus(iStorageController.getBus())