apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
  annotations:
    chains.tekton.dev/signed: 'true'
    operator-sdk/primary-resource: openshift-cnv/ssp-kubevirt-hyperconverged
    operator-sdk/primary-resource-type: SSP.ssp.kubevirt.io
    pipeline.openshift.io/started-by: 'kube:admin'
  resourceVersion: '8735145'
  name: windows-efi-installer-ncjo71
  uid: 8fcc576f-e58b-4399-bf32-b7a8d90f3b41
  creationTimestamp: '2023-07-18T09:05:21Z'
  generation: 1
  managedFields:
    - apiVersion: tekton.dev/v1
      fieldsType: FieldsV1
      fieldsV1:
        'f:metadata':
          'f:annotations':
            .: {}
            'f:operator-sdk/primary-resource': {}
            'f:operator-sdk/primary-resource-type': {}
            'f:pipeline.openshift.io/started-by': {}
          'f:labels':
            .: {}
            'f:app.kubernetes.io/component': {}
            'f:app.kubernetes.io/managed-by': {}
            'f:app.kubernetes.io/name': {}
            'f:app.kubernetes.io/part-of': {}
            'f:app.kubernetes.io/version': {}
            'f:tekton.dev/pipeline': {}
        'f:spec':
          .: {}
          'f:params': {}
          'f:pipelineRef':
            .: {}
            'f:name': {}
          'f:status': {}
          'f:workspaces': {}
      manager: Mozilla
      operation: Update
      time: '2023-07-18T09:05:21Z'
    - apiVersion: tekton.dev/v1beta1
      fieldsType: FieldsV1
      fieldsV1:
        'f:metadata':
          'f:annotations':
            'f:chains.tekton.dev/signed': {}
          'f:finalizers':
            .: {}
            'v:"chains.tekton.dev/pipelinerun"': {}
      manager: openshift-pipelines-chains-controller
      operation: Update
      time: '2023-07-18T10:05:21Z'
    - apiVersion: tekton.dev/v1beta1
      fieldsType: FieldsV1
      fieldsV1:
        'f:status':
          'f:childReferences': {}
          'f:completionTime': {}
          'f:conditions': {}
          'f:finallyStartTime': {}
          'f:pipelineSpec':
            .: {}
            'f:finally': {}
            'f:params': {}
            'f:results': {}
            'f:tasks': {}
          'f:skippedTasks': {}
          'f:startTime': {}
      manager: openshift-pipelines-controller
      operation: Update
      subresource: status
      time: '2023-07-18T10:05:21Z'
  namespace: openshift-cnv
  finalizers:
    - chains.tekton.dev/pipelinerun
  labels:
    app.kubernetes.io/component: tektonPipelines
    app.kubernetes.io/managed-by: ssp-operator
    app.kubernetes.io/name: tekton-pipelines
    app.kubernetes.io/part-of: hyperconverged-cluster
    app.kubernetes.io/version: 4.14.0
    tekton.dev/pipeline: windows-efi-installer
spec:
  params:
    - name: winImageDownloadURL
      value: >-
        http://cnv-qe-server.rhos-psi.cnv-qe.rhood.us/files/cnv-tests/windows-images/install_iso/win11/en-us_windows_11_business_editions_version_22h2_x64_dvd_17a08ce3.iso
    - name: instanceTypeName
      value: u1.large
    - name: instanceTypeKind
      value: VirtualMachineClusterInstancetype
    - name: preferenceName
      value: windows.11
    - name: virtualMachinePreferenceKind
      value: VirtualMachineClusterPreference
    - name: autounattendConfigMapName
      value: windows11-autounattend
    - name: virtioContainerDiskName
      value: >-
        registry.redhat.io/container-native-virtualization/virtio-win-rhel9@sha256:45d3c7258490fcc9aaf03ef9e0b122fb78a957dbe2128771da529fdc338ab52a
    - name: baseDvName
      value: win11
    - name: baseDvNamespace
      value: openshift-virtualization-os-images
    - name: isoDVName
      value: win11
  pipelineRef:
    name: windows-efi-installer
  taskRunTemplate:
    serviceAccountName: pipeline
  timeouts:
    pipeline: 1h0m0s
status:
  childReferences:
    - apiVersion: tekton.dev/v1beta1
      kind: TaskRun
      name: windows-efi-installer-ncjo71-import-win-iso
      pipelineTaskName: import-win-iso
    - apiVersion: tekton.dev/v1beta1
      kind: TaskRun
      name: windows-efi-installer-ncjo71-modify-windows-iso-file
      pipelineTaskName: modify-windows-iso-file
    - apiVersion: tekton.dev/v1beta1
      kind: TaskRun
      name: windows-efi-installer-ncjo71-create-vm-root-disk
      pipelineTaskName: create-vm-root-disk
    - apiVersion: tekton.dev/v1beta1
      kind: TaskRun
      name: windows-efi-installer-ncjo71-create-vm
      pipelineTaskName: create-vm
    - apiVersion: tekton.dev/v1beta1
      kind: TaskRun
      name: windows-efi-installer-ncjo71-wait-for-vmi-status
      pipelineTaskName: wait-for-vmi-status
  completionTime: '2023-07-18T10:05:21Z'
  conditions:
    - lastTransitionTime: '2023-07-18T10:05:21Z'
      message: >-
        PipelineRun "windows-efi-installer-ncjo71" failed to finish within
        "1h0m0s"
      reason: PipelineRunTimeout
      status: 'False'
      type: Succeeded
  finallyStartTime: '2023-07-18T10:05:21Z'
  pipelineSpec:
    finally:
      - name: cleanup-vm
        params:
          - name: vmName
            value: $(tasks.create-vm.results.name)
          - name: vmNamespace
            value: $(tasks.create-vm.results.namespace)
          - name: delete
            value: 'true'
        taskRef:
          kind: Task
          name: cleanup-vm
        timeout: 10m0s
        status:
          reason: Skipped
      - name: delete-imported-iso
        params:
          - name: deleteObject
            value: 'true'
          - name: deleteObjectKind
            value: PersistentVolumeClaim
          - name: deleteObjectName
            value: $(tasks.import-win-iso.results.name)
          - name: namespace
            value: $(tasks.import-win-iso.results.namespace)
        taskRef:
          kind: Task
          name: modify-data-object
        status:
          reason: Skipped
      - name: delete-vm-rootdisk
        params:
          - name: deleteObject
            value: 'true'
          - name: deleteObjectKind
            value: PersistentVolumeClaim
          - name: deleteObjectName
            value: $(tasks.create-vm-root-disk.results.name)
          - name: namespace
            value: $(tasks.create-vm-root-disk.results.namespace)
        taskRef:
          kind: Task
          name: modify-data-object
        status:
          reason: Skipped
    params:
      - description: >-
          Download URL to Windows 11 or server 2022 installation ISO (English
          United States x64 version is needed). You can follow
          https://www.microsoft.com/en-us/software-download/windows11 or
          https://www.microsoft.com/en-us/evalcenter/evaluate-windows-server-2022
          to get one.
        name: winImageDownloadURL
        type: string
      - default: u1.large
        description: Name of VirtualMachineClusterInstancetype object
        name: instanceTypeName
        type: string
      - default: VirtualMachineClusterInstancetype
        description: Kind of VirtualMachineInstancetype object
        name: instanceTypeKind
        type: string
      - default: windows.11
        description: Name of VirtualMachineClusterPreference object
        name: preferenceName
        type: string
      - default: VirtualMachineClusterPreference
        description: Kind of virtualMachinePreference object
        name: virtualMachinePreferenceKind
        type: string
      - default: windows11-autounattend
        description: >-
          Name of the ConfigMap containing the sysprep configuration files
          (autounattend.xml, etc.). For example windows11-autounattend or
          windows2022-autounattend. It is possible to provide customize
          ConfigMaps created by the user too.
        name: autounattendConfigMapName
        type: string
      - default: >-
          registry.redhat.io/container-native-virtualization/virtio-win-rhel9@sha256:45d3c7258490fcc9aaf03ef9e0b122fb78a957dbe2128771da529fdc338ab52a
        description: Reference to the containerdisk containing the virtio-win drivers ISO.
        name: virtioContainerDiskName
        type: string
      - default: win11
        description: >-
          Name of the base DataVolume which is created. Pre-installed Windows
          VMs can be created from this DataVolume.
        name: baseDvName
        type: string
      - default: openshift-virtualization-os-images
        description: Namespace of the base DataVolume which is created.
        name: baseDvNamespace
        type: string
      - default: win11
        description: Name of Windows ISO datavolume
        name: isoDVName
        type: string
    results:
      - description: Name of the created base DataVolume
        name: baseDvName
        value: $(tasks.create-base-dv.results.name)
      - description: Namespace of the created base DataVolume
        name: baseDvNamespace
        value: $(tasks.create-base-dv.results.namespace)
    tasks:
      - name: import-win-iso
        params:
          - name: manifest
            value: |-
              apiVersion: cdi.kubevirt.io/v1beta1
              kind: DataVolume
              metadata:
                annotations:
                  "cdi.kubevirt.io/storage.bind.immediate.requested": "true"
                generateName: win11-
              spec:
                source:
                  http:
                    url: http://cnv-qe-server.rhos-psi.cnv-qe.rhood.us/files/cnv-tests/windows-images/install_iso/win11/en-us_windows_11_business_editions_version_22h2_x64_dvd_17a08ce3.iso
                storage:
                  volumeMode: Filesystem
                  resources:
                    requests:
                      storage: 9Gi
          - name: waitForSuccess
            value: 'true'
          - name: allowReplace
            value: 'true'
        taskRef:
          kind: Task
          name: modify-data-object
        status:
          completionTime: '2023-07-18T09:06:33Z'
          conditions:
            - lastTransitionTime: '2023-07-18T09:06:33Z'
              message: All Steps have completed executing
              reason: Succeeded
              status: 'True'
              type: Succeeded
          podName: windows-efi-installer-ncjo71-import-win-iso-pod
          results:
            - name: name
              type: string
              value: win11-kn5t8
            - name: namespace
              type: string
              value: openshift-cnv
          startTime: '2023-07-18T09:05:21Z'
          steps:
            - container: step-modify-data-object
              imageID: >-
                registry.redhat.io/container-native-virtualization/kubevirt-tekton-tasks-create-datavolume-rhel9@sha256:3752efaa2fe6226528d8bce90c82e589bee0bf455b1fa3264109dbc6beac5e85
              name: modify-data-object
              terminated:
                containerID: >-
                  cri-o://84648e16183d448fc0ed066021dbedc737ef45d5ab7c76cc09b3c01f055ab0ac
                exitCode: 0
                finishedAt: '2023-07-18T09:06:32Z'
                message: >-
                  [{"key":"name","value":"win11-kn5t8","type":1},{"key":"namespace","value":"openshift-cnv","type":1}]
                reason: Completed
                startedAt: '2023-07-18T09:05:24Z'
          taskSpec:
            description: >-
              This task modifies a data object (DataVolume or DataSource). It
              can optionally wait until CDI imports finish.
            params:
              - default: ''
                description: YAML manifest of a data object to be created.
                name: manifest
                type: string
              - default: ''
                description: >-
                  Namespace where to create the data object. (defaults to
                  manifest namespace or active namespace)
                name: namespace
                type: string
              - default: 'false'
                description: >-
                  Set to "true" or "false" if container should wait for Ready
                  condition of the data object.
                name: waitForSuccess
                type: string
              - default: 'false'
                description: >-
                  Allow replacing an already existing data object (same
                  combination name/namespace). Allowed values true/false
                name: allowReplace
                type: string
              - default: 'false'
                description: >-
                  Set to `true` or `false` if task should delete the specified
                  DataVolume, DataSource or PersistentVolumeClaim. If set to
                  'true' the ds/dv/pvc will be deleted and all other parameters
                  are ignored.
                name: deleteObject
                type: string
              - default: ''
                description: >-
                  Kind of the data object to delete. This parameter is used only
                  for Delete operation.
                name: deleteObjectKind
                type: string
              - default: ''
                description: >-
                  Name of the data object to delete. This parameter is used only
                  for Delete operation.
                name: deleteObjectName
                type: string
            results:
              - description: The name of the data object that was created.
                name: name
                type: string
              - description: The namespace of the data object that was created.
                name: namespace
                type: string
            steps:
              - args:
                  - '--output=yaml'
                command:
                  - modify-data-object
                computeResources: {}
                env:
                  - name: DATA_OBJECT_MANIFEST
                    value: |-
                      apiVersion: cdi.kubevirt.io/v1beta1
                      kind: DataVolume
                      metadata:
                        annotations:
                          "cdi.kubevirt.io/storage.bind.immediate.requested": "true"
                        generateName: win11-
                      spec:
                        source:
                          http:
                            url: http://cnv-qe-server.rhos-psi.cnv-qe.rhood.us/files/cnv-tests/windows-images/install_iso/win11/en-us_windows_11_business_editions_version_22h2_x64_dvd_17a08ce3.iso
                        storage:
                          volumeMode: Filesystem
                          resources:
                            requests:
                              storage: 9Gi
                  - name: DATA_OBJECT_NAMESPACE
                  - name: WAIT_FOR_SUCCESS
                    value: 'true'
                  - name: ALLOW_REPLACE
                    value: 'true'
                  - name: DELETE_OBJECT
                    value: 'false'
                  - name: DELETE_OBJECT_KIND
                  - name: DELETE_OBJECT_NAME
                image: >-
                  registry.redhat.io/container-native-virtualization/kubevirt-tekton-tasks-create-datavolume-rhel9@sha256:f48b1d11113e74589af94d90108eab0cd80512279e2c4974a90407a1a91b55b7
                name: modify-data-object
          duration: 1m 12s
          reason: Succeeded
      - name: modify-windows-iso-file
        params:
          - name: pvcName
            value: $(tasks.import-win-iso.results.name)
        runAfter:
          - import-win-iso
          - create-vm-root-disk
        taskRef:
          kind: Task
          name: modify-windows-iso-file
        status:
          completionTime: '2023-07-18T09:07:39Z'
          conditions:
            - lastTransitionTime: '2023-07-18T09:07:39Z'
              message: All Steps have completed executing
              reason: Succeeded
              status: 'True'
              type: Succeeded
          podName: windows-efi-installer-ncjo71-modify-windows-iso-file-pod
          startTime: '2023-07-18T09:06:34Z'
          steps:
            - container: step-modify-iso-file
              imageID: >-
                registry.redhat.io/container-native-virtualization/kubevirt-tekton-tasks-disk-virt-customize-rhel9@sha256:7cdcae2545290265515af4c4c070c10509c67c3df90008f33529b624fd30b373
              name: modify-iso-file
              terminated:
                containerID: >-
                  cri-o://6fc13fcba735ba96c0accf6a535caa5c7f7a405c0a322c1fe45bdc7b15a08fd7
                exitCode: 0
                finishedAt: '2023-07-18T09:07:15Z'
                reason: Completed
                startedAt: '2023-07-18T09:06:39Z'
            - container: step-create-iso-file
              imageID: >-
                registry.redhat.io/container-native-virtualization/kubevirt-tekton-tasks-create-datavolume-rhel9@sha256:3752efaa2fe6226528d8bce90c82e589bee0bf455b1fa3264109dbc6beac5e85
              name: create-iso-file
              terminated:
                containerID: >-
                  cri-o://45550386d3bd2279cb4d898f5f38e6155d3017302c9a4a197d8f169ce87cfcc8
                exitCode: 0
                finishedAt: '2023-07-18T09:07:26Z'
                reason: Completed
                startedAt: '2023-07-18T09:07:16Z'
            - container: step-convert-iso-file
              imageID: >-
                registry.redhat.io/container-native-virtualization/kubevirt-tekton-tasks-disk-virt-customize-rhel9@sha256:7cdcae2545290265515af4c4c070c10509c67c3df90008f33529b624fd30b373
              name: convert-iso-file
              terminated:
                containerID: >-
                  cri-o://a410f891d83e8e6943d6b9155c11d59ea77f964a0b9e95ba6b5d15b2da2b4962
                exitCode: 0
                finishedAt: '2023-07-18T09:07:38Z'
                reason: Completed
                startedAt: '2023-07-18T09:07:26Z'
          taskSpec:
            params:
              - default: ''
                description: PersistentVolumeClaim which contains windows iso.
                name: pvcName
                type: string
            steps:
              - computeResources:
                  limits:
                    devices.kubevirt.io/kvm: '1'
                  requests:
                    devices.kubevirt.io/kvm: '1'
                env:
                  - name: LIBGUESTFS_BACKEND
                    value: direct
                  - name: HOME
                    value: /usr/local/lib/guestfs/appliance
                image: >-
                  registry.redhat.io/container-native-virtualization/kubevirt-tekton-tasks-disk-virt-customize-rhel9@sha256:7cdcae2545290265515af4c4c070c10509c67c3df90008f33529b624fd30b373
                name: modify-iso-file
                script: >
                  #!/bin/bash

                  set -x


                  export LIBGUESTFS_PATH=/usr/local/lib/guestfs/appliance

                  export ISO_FILES_PATH="/tmp/extracted-iso-files"

                  export EFI_BOOT="${ISO_FILES_PATH}/efi/microsoft/boot"

                  export TARGET_IMG_FILE_PATH="tmp/target-pvc/disk.img"


                  guestfish -a ${TARGET_IMG_FILE_PATH} -m /dev/sda tar-out / - |
                  tar xvf - -C ${ISO_FILES_PATH} -m --no-overwrite-dir
                  --owner=$(id -u) --group=$(id -g) --no-same-permissions


                  if [ ! -f ${EFI_BOOT}/efisys_noprompt.bin ] || [ ! -f
                  ${EFI_BOOT}/cdboot_noprompt.efi ]; then
                    echo "${EFI_BOOT}/efisys_noprompt.bin or ${EFI_BOOT}/cdboot_noprompt.efi not found in the iso file! Exiting"
                    exit 1
                  fi


                  chmod u+w "${ISO_FILES_PATH}/efi"
                  "${ISO_FILES_PATH}/efi/microsoft"
                  "${ISO_FILES_PATH}/efi/microsoft/boot"

                  chmod u+w "${EFI_BOOT}/efisys.bin" "${EFI_BOOT}/cdboot.efi"
                  "${EFI_BOOT}/efisys_noprompt.bin"
                  "${EFI_BOOT}/cdboot_noprompt.efi"


                  rm "${EFI_BOOT}/efisys.bin" "${EFI_BOOT}/cdboot.efi"


                  mv "${EFI_BOOT}/efisys_noprompt.bin" "${EFI_BOOT}/efisys.bin"

                  mv "${EFI_BOOT}/cdboot_noprompt.efi" "${EFI_BOOT}/cdboot.efi"
                securityContext:
                  allowPrivilegeEscalation: false
                  capabilities:
                    drop:
                      - ALL
                volumeMounts:
                  - mountPath: /tmp/target-pvc/
                    name: target-pvc
                  - mountPath: /tmp/extracted-iso-files/
                    name: extracted-iso-files
              - computeResources: {}
                image: >-
                  registry.redhat.io/container-native-virtualization/kubevirt-tekton-tasks-create-datavolume-rhel9@sha256:f48b1d11113e74589af94d90108eab0cd80512279e2c4974a90407a1a91b55b7
                name: create-iso-file
                script: |
                  #!/bin/bash
                  set -ex
                  export ISO_FILES_PATH="/tmp/extracted-iso-files"
                  export ISO_FILE_PATH="/tmp/iso-file/disk.iso"

                  xorriso -as mkisofs -no-emul-boot \
                      -e "efi/microsoft/boot/efisys.bin" \
                      -boot-load-size 1 \
                      -iso-level 4 \
                      -J -l -D -N \
                      -joliet-long \
                      -relaxed-filenames \
                      -V "WINDOWS" \
                      -o ${ISO_FILE_PATH} ${ISO_FILES_PATH}
                securityContext:
                  allowPrivilegeEscalation: false
                  capabilities:
                    drop:
                      - ALL
                volumeMounts:
                  - mountPath: /tmp/extracted-iso-files/
                    name: extracted-iso-files
                  - mountPath: /tmp/iso-file/
                    name: iso-file
              - computeResources: {}
                image: >-
                  registry.redhat.io/container-native-virtualization/kubevirt-tekton-tasks-disk-virt-customize-rhel9@sha256:7cdcae2545290265515af4c4c070c10509c67c3df90008f33529b624fd30b373
                name: convert-iso-file
                script: >
                  #!/bin/bash

                  set -x

                  export ISO_FILE_PATH="/tmp/iso-file/disk.iso"

                  export TARGET_IMG_FILE_PATH="/tmp/target-pvc/disk.img"


                  rm ${TARGET_IMG_FILE_PATH}

                  qemu-img convert -t writeback -p -O raw ${ISO_FILE_PATH}
                  ${TARGET_IMG_FILE_PATH}
                securityContext:
                  allowPrivilegeEscalation: false
                  capabilities:
                    drop:
                      - ALL
                volumeMounts:
                  - mountPath: /tmp/target-pvc/
                    name: target-pvc
                  - mountPath: /tmp/iso-file/
                    name: iso-file
            volumes:
              - name: target-pvc
                persistentVolumeClaim:
                  claimName: win11-kn5t8
              - emptyDir:
                  sizeLimit: 12Gi
                name: extracted-iso-files
              - emptyDir:
                  sizeLimit: 12Gi
                name: iso-file
          duration: 1m 5s
          reason: Succeeded
      - name: create-vm-root-disk
        params:
          - name: manifest
            value: |-
              apiVersion: cdi.kubevirt.io/v1beta1
              kind: DataVolume
              metadata:
                annotations:
                  "cdi.kubevirt.io/storage.bind.immediate.requested": "true"
                generateName: windows-efi-root-disk-
              spec:
                storage:
                  resources:
                    requests:
                      storage: 20Gi
                source:
                  blank: {}
          - name: waitForSuccess
            value: 'true'
        taskRef:
          kind: Task
          name: modify-data-object
        status:
          completionTime: '2023-07-18T09:06:33Z'
          conditions:
            - lastTransitionTime: '2023-07-18T09:06:33Z'
              message: All Steps have completed executing
              reason: Succeeded
              status: 'True'
              type: Succeeded
          podName: windows-efi-installer-ncjo71-create-vm-root-disk-pod
          results:
            - name: name
              type: string
              value: windows-efi-root-disk-5wpc9
            - name: namespace
              type: string
              value: openshift-cnv
          startTime: '2023-07-18T09:05:21Z'
          steps:
            - container: step-modify-data-object
              imageID: >-
                registry.redhat.io/container-native-virtualization/kubevirt-tekton-tasks-create-datavolume-rhel9@sha256:3752efaa2fe6226528d8bce90c82e589bee0bf455b1fa3264109dbc6beac5e85
              name: modify-data-object
              terminated:
                containerID: >-
                  cri-o://52f763d69b01f804b5430cd46c6881cf81ad1239a9b97c59c6a7543b1bd9bc66
                exitCode: 0
                finishedAt: '2023-07-18T09:06:33Z'
                message: >-
                  [{"key":"name","value":"windows-efi-root-disk-5wpc9","type":1},{"key":"namespace","value":"openshift-cnv","type":1}]
                reason: Completed
                startedAt: '2023-07-18T09:05:25Z'
          taskSpec:
            description: >-
              This task modifies a data object (DataVolume or DataSource). It
              can optionally wait until CDI imports finish.
            params:
              - default: ''
                description: YAML manifest of a data object to be created.
                name: manifest
                type: string
              - default: ''
                description: >-
                  Namespace where to create the data object. (defaults to
                  manifest namespace or active namespace)
                name: namespace
                type: string
              - default: 'false'
                description: >-
                  Set to "true" or "false" if container should wait for Ready
                  condition of the data object.
                name: waitForSuccess
                type: string
              - default: 'false'
                description: >-
                  Allow replacing an already existing data object (same
                  combination name/namespace). Allowed values true/false
                name: allowReplace
                type: string
              - default: 'false'
                description: >-
                  Set to `true` or `false` if task should delete the specified
                  DataVolume, DataSource or PersistentVolumeClaim. If set to
                  'true' the ds/dv/pvc will be deleted and all other parameters
                  are ignored.
                name: deleteObject
                type: string
              - default: ''
                description: >-
                  Kind of the data object to delete. This parameter is used only
                  for Delete operation.
                name: deleteObjectKind
                type: string
              - default: ''
                description: >-
                  Name of the data object to delete. This parameter is used only
                  for Delete operation.
                name: deleteObjectName
                type: string
            results:
              - description: The name of the data object that was created.
                name: name
                type: string
              - description: The namespace of the data object that was created.
                name: namespace
                type: string
            steps:
              - args:
                  - '--output=yaml'
                command:
                  - modify-data-object
                computeResources: {}
                env:
                  - name: DATA_OBJECT_MANIFEST
                    value: |-
                      apiVersion: cdi.kubevirt.io/v1beta1
                      kind: DataVolume
                      metadata:
                        annotations:
                          "cdi.kubevirt.io/storage.bind.immediate.requested": "true"
                        generateName: windows-efi-root-disk-
                      spec:
                        storage:
                          resources:
                            requests:
                              storage: 20Gi
                        source:
                          blank: {}
                  - name: DATA_OBJECT_NAMESPACE
                  - name: WAIT_FOR_SUCCESS
                    value: 'true'
                  - name: ALLOW_REPLACE
                    value: 'false'
                  - name: DELETE_OBJECT
                    value: 'false'
                  - name: DELETE_OBJECT_KIND
                  - name: DELETE_OBJECT_NAME
                image: >-
                  registry.redhat.io/container-native-virtualization/kubevirt-tekton-tasks-create-datavolume-rhel9@sha256:f48b1d11113e74589af94d90108eab0cd80512279e2c4974a90407a1a91b55b7
                name: modify-data-object
          duration: 1m 12s
          reason: Succeeded
      - name: create-vm
        params:
          - name: runStrategy
            value: RerunOnFailure
          - name: manifest
            value: |-
              apiVersion: kubevirt.io/v1
              kind: VirtualMachine
              metadata:
                generateName: windows-efi-
              spec:
                instancetype:
                  kind: VirtualMachineClusterInstancetype
                  name: u1.large
                preference:
                  kind: VirtualMachineClusterPreference
                  name: windows.11
                template:
                  spec:
                    domain:
                      devices:
                        disks:
                          - cdrom:
                              bus: sata
                            name: installcdrom
                            bootOrder: 2
                          - disk:
                              bus: virtio
                            name: rootdisk
                            bootOrder: 1
                          - cdrom:
                              bus: sata
                            name: virtiocontainerdisk
                          - cdrom:
                              bus: sata
                            name: sysprep
                    volumes:
                    - name: installcdrom
                      persistentVolumeClaim:
                        claimName: $(tasks.import-win-iso.results.name)
                    - name: virtiocontainerdisk
                      containerDisk:
                        image: registry.redhat.io/container-native-virtualization/virtio-win-rhel9@sha256:45d3c7258490fcc9aaf03ef9e0b122fb78a957dbe2128771da529fdc338ab52a
                    - name: sysprep
                      sysprep:
                        configMap: 
                          name: windows11-autounattend
                    - dataVolume:
                        name:  $(tasks.create-vm-root-disk.results.name)
                      name: rootdisk
        runAfter:
          - modify-windows-iso-file
        taskRef:
          kind: Task
          name: create-vm-from-manifest
        status:
          completionTime: '2023-07-18T09:07:43Z'
          conditions:
            - lastTransitionTime: '2023-07-18T09:07:43Z'
              message: All Steps have completed executing
              reason: Succeeded
              status: 'True'
              type: Succeeded
          podName: windows-efi-installer-ncjo71-create-vm-pod
          results:
            - name: name
              type: string
              value: windows-efi-jfzvr
            - name: namespace
              type: string
              value: openshift-cnv
          startTime: '2023-07-18T09:07:39Z'
          steps:
            - container: step-createvm
              imageID: >-
                registry.redhat.io/container-native-virtualization/kubevirt-tekton-tasks-create-datavolume-rhel9@sha256:3752efaa2fe6226528d8bce90c82e589bee0bf455b1fa3264109dbc6beac5e85
              name: createvm
              terminated:
                containerID: >-
                  cri-o://7f43155aa62e0a73233c8e1a3a3f6d53a643a21a49b001ca9ffb479c0dd7ef3c
                exitCode: 0
                finishedAt: '2023-07-18T09:07:42Z'
                message: >-
                  [{"key":"name","value":"windows-efi-jfzvr","type":1},{"key":"namespace","value":"openshift-cnv","type":1}]
                reason: Completed
                startedAt: '2023-07-18T09:07:42Z'
          taskSpec:
            params:
              - default: ''
                description: YAML manifest of a VirtualMachine resource to be created.
                name: manifest
                type: string
              - default: ''
                description: >-
                  Parameters for virtctl create vm command that will be used to
                  create VirtualMachine.
                name: virtctl
                type: string
              - default: ''
                description: >-
                  Namespace where to create the VM. (defaults to manifest
                  namespace or active namespace)
                name: namespace
                type: string
              - default: ''
                description: >-
                  Set to true or false to start / not start vm after creation.
                  In case of runStrategy is set to Always, startVM flag is
                  ignored.
                name: startVM
                type: string
              - default: ''
                description: >-
                  Set runStrategy to VM. If runStrategy is set, vm.spec.running
                  attribute is set to nil.
                name: runStrategy
                type: string
            results:
              - description: The name of a VM that was created.
                name: name
                type: string
              - description: The namespace of a VM that was created.
                name: namespace
                type: string
            steps:
              - args:
                  - '--output=yaml'
                command:
                  - create-vm
                computeResources: {}
                env:
                  - name: VM_MANIFEST
                    value: |-
                      apiVersion: kubevirt.io/v1
                      kind: VirtualMachine
                      metadata:
                        generateName: windows-efi-
                      spec:
                        instancetype:
                          kind: VirtualMachineClusterInstancetype
                          name: u1.large
                        preference:
                          kind: VirtualMachineClusterPreference
                          name: windows.11
                        template:
                          spec:
                            domain:
                              devices:
                                disks:
                                  - cdrom:
                                      bus: sata
                                    name: installcdrom
                                    bootOrder: 2
                                  - disk:
                                      bus: virtio
                                    name: rootdisk
                                    bootOrder: 1
                                  - cdrom:
                                      bus: sata
                                    name: virtiocontainerdisk
                                  - cdrom:
                                      bus: sata
                                    name: sysprep
                            volumes:
                            - name: installcdrom
                              persistentVolumeClaim:
                                claimName: win11-kn5t8
                            - name: virtiocontainerdisk
                              containerDisk:
                                image: registry.redhat.io/container-native-virtualization/virtio-win-rhel9@sha256:45d3c7258490fcc9aaf03ef9e0b122fb78a957dbe2128771da529fdc338ab52a
                            - name: sysprep
                              sysprep:
                                configMap: 
                                  name: windows11-autounattend
                            - dataVolume:
                                name:  windows-efi-root-disk-5wpc9
                              name: rootdisk
                  - name: VM_NAMESPACE
                  - name: VIRTCTL
                  - name: START_VM
                  - name: RUN_STRATEGY
                    value: RerunOnFailure
                image: >-
                  registry.redhat.io/container-native-virtualization/kubevirt-tekton-tasks-create-datavolume-rhel9@sha256:f48b1d11113e74589af94d90108eab0cd80512279e2c4974a90407a1a91b55b7
                name: createvm
          duration: 4s
          reason: Succeeded
      - name: wait-for-vmi-status
        params:
          - name: vmiName
            value: $(tasks.create-vm.results.name)
          - name: vmiNamespace
            value: $(tasks.create-vm.results.namespace)
          - name: successCondition
            value: status.phase == Succeeded
          - name: failureCondition
            value: 'status.phase in (Failed, Unknown)'
        runAfter:
          - create-vm
        taskRef:
          kind: Task
          name: wait-for-vmi-status
        timeout: 2h0m0s
        status:
          completionTime: '2023-07-18T10:05:21Z'
          conditions:
            - lastTransitionTime: '2023-07-18T10:05:21Z'
              message: >-
                TaskRun "windows-efi-installer-ncjo71-wait-for-vmi-status" was
                cancelled. TaskRun cancelled as the PipelineRun it belongs to
                has timed out.
              reason: TaskRunCancelled
              status: 'False'
              type: Succeeded
          podName: windows-efi-installer-ncjo71-wait-for-vmi-status-pod
          startTime: '2023-07-18T09:07:43Z'
          steps:
            - container: step-wait-for-vmi-status
              imageID: >-
                registry.redhat.io/container-native-virtualization/kubevirt-tekton-tasks-create-datavolume-rhel9@sha256:3752efaa2fe6226528d8bce90c82e589bee0bf455b1fa3264109dbc6beac5e85
              name: wait-for-vmi-status
              terminated:
                exitCode: 1
                finishedAt: '2023-07-18T10:05:21Z'
                reason: TaskRunCancelled
                startedAt: '2023-07-18T09:07:45Z'
          taskSpec:
            params:
              - description: Name of a VirtualMachineInstance to wait for.
                name: vmiName
                type: string
              - default: ''
                description: >-
                  Namespace of a VirtualMachineInstance to wait for. (defaults
                  to manifest namespace or active namespace)
                name: vmiNamespace
                type: string
              - default: ''
                description: >-
                  A label selector expression to decide if the
                  VirtualMachineInstance (VMI) is in a success state. Eg.
                  "status.phase == Succeeded". It is evaluated on each VMI
                  update and will result in this task succeeding if true.
                name: successCondition
                type: string
              - default: ''
                description: >-
                  A label selector expression to decide if the
                  VirtualMachineInstance (VMI) is in a failed state. Eg.
                  "status.phase in (Failed, Unknown)". It is evaluated on each
                  VMI update and will result in this task failing if true.
                name: failureCondition
                type: string
            steps:
              - command:
                  - entrypoint
                computeResources: {}
                env:
                  - name: COMMAND
                    value: wait-for-vmi-status
                  - name: VMI_NAME
                    value: windows-efi-jfzvr
                  - name: VMI_NAMESPACE
                    value: openshift-cnv
                  - name: SUCCESS_CONDITION
                    value: status.phase == Succeeded
                  - name: FAILURE_CONDITION
                    value: 'status.phase in (Failed, Unknown)'
                image: >-
                  registry.redhat.io/container-native-virtualization/kubevirt-tekton-tasks-create-datavolume-rhel9@sha256:f48b1d11113e74589af94d90108eab0cd80512279e2c4974a90407a1a91b55b7
                name: wait-for-vmi-status
          duration: 57m 38s
          reason: Cancelled
      - name: create-base-dv
        params:
          - name: manifest
            value: |
              apiVersion: cdi.kubevirt.io/v1beta1
              kind: DataVolume
              metadata:
                name: win11
                namespace: openshift-virtualization-os-images
                annotations:
                  "cdi.kubevirt.io/storage.bind.immediate.requested": "true"
              spec:
                storage: {}
                source:
                  pvc:
                    name: $(tasks.create-vm-root-disk.results.name)
                    namespace: $(tasks.create-vm-root-disk.results.namespace)
          - name: waitForSuccess
            value: 'true'
          - name: allowReplace
            value: 'true'
        runAfter:
          - wait-for-vmi-status
        taskRef:
          kind: Task
          name: modify-data-object
        status:
          reason: Skipped
  skippedTasks:
    - name: create-base-dv
      reason: PipelineRun was stopping
    - name: cleanup-vm
      reason: PipelineRun timeout has been reached
    - name: delete-imported-iso
      reason: PipelineRun timeout has been reached
    - name: delete-vm-rootdisk
      reason: PipelineRun timeout has been reached
  startTime: '2023-07-18T09:05:21Z'
