'Uses cached image as a bootable virtual cdrom.'

def _use_iso_image(self, vm_ref, vi):

    self._attach_cdrom_to_vm(vm_ref, vi.instance, vi.datastore.ref, str(vi.cache_image_path))
    if (vi.root_gb > 0):
        instance_folder = vi.instance.uuid
        root_disk_name = ('%s.vmdk' % vi.instance.uuid)
        root_disk_ds_loc = vi.datastore.build_path(instance_folder, root_disk_name)
        linked_clone = False
        vm_util.create_virtual_disk(self._session, vi.dc_info.ref, vi.ii.adapter_type, vi.ii.disk_type, str(root_disk_ds_loc), (vi.root_gb * units.Mi))
        self._volumeops.attach_disk_to_vm(vm_ref, vi.instance, vi.ii.adapter_type, vi.ii.disk_type, str(root_disk_ds_loc), (vi.root_gb * units.Mi), linked_clone, disk_io_limits=vi._extra_specs.disk_io_limits)
