Forum Discussion

bill_eighmie's avatar
bill_eighmie
Novice I
2 years ago

Hi all. I have recently started using Cody's script

I have recently started using Cody's script PureStorageVMwareStorageTool.ps1 for mass VM recovery in our DR site. The script is amazing. I do have one issue when powering up all the new registered copies of the servers from the snapshots. When each VM is powered on vCenter prompts if the VM was moved or copied. I understand the question and reason for it, but trying to come up with a way to automate answering that question rather than having to click on the button for each VM in vCenter. Thank you

  • wow im surprised this still works lol, wrote it so long ago. but this is a good link. i dont know if this is perfect but i know the get-vmquestion |set-vmquestion is the way to do it https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/powershell-start-vm-I-copied-it/td-p/2647643
  • Thank you Cody. Yeah, the script still works great! In the long run we need to get some other tool to quarterback the volume creation from snapshots and registering the VMs for our DR tests. The script may in fact be to good. With the price of $0, it is going to be hard to convince Mgmt that we need to buy some other application to do the same thing. Cheers!
  • Looks like in the .vmx file you can configure an always keep or always create setting: https://kb.vmware.com/s/article/1541
  • We use this powercli function to register the vms. Works great. https://vcloudvision.com/2019/04/30/powercli-function-to-import-vmx-files-from-a-datastore/|https://vcloudvision.com/2019/04/30/powercli-function-to-import-vmx-files-from-a-datastore/