kubev2v / forklift-console-plugin

OpenShift Console Plugin For Forklift, the plugin adds a web based user interface for Migration Toolkit for Virtualization inside Openshift web console.
Apache License 2.0
3 stars 15 forks source link

Support for Hooks for windows VMs #1266

Closed jsakil14 closed 1 month ago

jsakil14 commented 1 month ago

Discussed in https://github.com/kubev2v/forklift-console-plugin/discussions/1264

Originally posted by **jsakil14** July 9, 2024 Hello anyone has success with using pre / post hooks for windows vms? I am looking to capture network config and disk layout part of pre hook and run a condition check for nw and disks in post hook and apply them if they are not correct. Is this possible using ansible ? since I see only requirement is to have ssh enabled , for sake of windows I got winrm enabled. I am trying to achieve this by below: ``` yaml postHooks: - name: Bring all disks online type: Ansible image: quay.io/konveyor/hook-runner playbook: | --- - name: Bring all disks online hosts: all tasks: - name: Bring disks online win_shell: | $disks = Get-Disk | Where-Object IsOffline -eq $true foreach ($disk in $disks) { Set-Disk -Number $disk.Number -IsOffline $false Set-Disk -Number $disk.Number -IsReadOnly $false } become: yes ```
yaacov commented 1 month ago

hi, thank you for your quesion, this looks like a question for the controller side, see: https://github.com/kubev2v/forklift/issues

here are some hooks examples: https://github.com/kubev2v/forklift/blob/main/docs/hooks.md

jsakil14 commented 1 month ago