Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Hooks for windows VMs #1266

Closed
jsakil14 opened this issue Jul 11, 2024 Discussed in #1264 · 2 comments
Closed

Support for Hooks for windows VMs #1266

jsakil14 opened this issue Jul 11, 2024 Discussed in #1264 · 2 comments
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. question
Milestone

Comments

@jsakil14
Copy link

jsakil14 commented Jul 11, 2024

Discussed in #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:

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
Copy link
Member

yaacov commented Jul 11, 2024

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

@yaacov yaacov added this to the next milestone Jul 11, 2024
@yaacov yaacov added help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. question labels Jul 11, 2024
@jsakil14 jsakil14 closed this as not planned Won't fix, can't repro, duplicate, stale Jul 11, 2024
@jsakil14
Copy link
Author

jsakil14 commented Jul 11, 2024

kubev2v/forklift#956

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. question
Projects
None yet
Development

No branches or pull requests

2 participants