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
New Featurerequest, add parameter for Export-VM #34
Comments
@bacardischmal Hi there, thanks for mentioning this - I'll do some tests on my end. |
@bacardischmal I just tested this with the new additions and my tests all failed so I'm reluctant to make this change until I understand exactly what is going on. Since it's working well for you, that's great! Any more information you can provide about the VMs and their workload would be helpful. |
What did at your test fail? The freeze is at the moment the export starts, you can recognize it from the Hyper V-Manager, Open the VM and open the system clock in taskbar to see the seconds and watch it, it stops running for several seconds. Same problem happend when you export a VM from the Hyper V-Manager. Perhaps there should be a possibility to pass the three parameters to the export method and not a fixed in the script? |
@bacardischmal My testing fails at the Export-VM stage with the error: Export-Vm : [VM Name] failed to export. Failed to export virtual machine. Can not create an application consistent checkpoint. This is with a Windows Server 2022 VM. Creating Checkpoints works via the Hyper-V mmc. I did test with "-CaptureLiveState CaptureCrashConsistentState" and "-CaptureLiveState CaptureDataConsistentState" and they both worked. I'm going to add an option to the script so that the user and specify the -CaptureLiveState {CaptureCrashConsistentState | CaptureSavedState | CaptureDataConsistentState} option, as you suggested. |
Hi,
i had trouble to export some VMs, they had lags/freezes at the beginning from the exports, it took about 30 to 90 sec for the VM to be unavailable. I found out its because of the type of export of the VM
I added quick and dirty on this line the parameter CaptureLiveState and it worked like a charm.
Line 1400 $Vm | Export-VM -Path "$WorkDir" -ErrorAction 'Stop'
to
$Vm | Export-VM -Path "$WorkDir" -ErrorAction 'Stop' -CaptureLiveState CaptureDataConsistentState
Would it make sense to integrate the export selection into the script call or is it not a good idea to change the kind of export?
The text was updated successfully, but these errors were encountered: