Hi Everyone,
Can we take Snapshot for lists of Specific critical VM's from the lists and delete the snapshot after VM HW upgrade?
thanks
vmk
Taking a snapshot before the HW upgrade is quite straightforward.
Get-VM -Name $vmNames | New-Snapshot -Name "PreHWUpgrade" -Description "SNapshot taken before HW upgrade" -Confirm:$false
Cleaning up after the upgrade is also quite simple.
Get-VM -Name $vmNames | Get-Snapshot -Name "PreHWUpgrade" | Remove-Snapshot -Confirm:$false
But you will have to run the 2 script yourself.
There is no option to run the 2nd one for example, automatically after the HW upgrade.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Taking a snapshot before the HW upgrade is quite straightforward.
Get-VM -Name $vmNames | New-Snapshot -Name "PreHWUpgrade" -Description "SNapshot taken before HW upgrade" -Confirm:$false
Cleaning up after the upgrade is also quite simple.
Get-VM -Name $vmNames | Get-Snapshot -Name "PreHWUpgrade" | Remove-Snapshot -Confirm:$false
But you will have to run the 2 script yourself.
There is no option to run the 2nd one for example, automatically after the HW upgrade.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Yes, I'm looking to run the script manually post upgrade. Does the script take the snapshot with Memory?
No, but you can add that switch
Get-VM -Name $vmNames |
New-Snapshot -Name "PreHWUpgrade" -Description "SNapshot taken before HW upgrade" -Memory:$true -Confirm:$false
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
While deleting the snapshot with memory any change in your script?
No, that part stays the same
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
I tested the VM Snapshot and tt worked for me. I'm planning to take a snapshot for Critical prod VM's while upgrading the VM version.
LucD,
Post HW version upgrade, I'm unable to delete one of the snapshots. It failing with error "The operation is not allowed in the current state."
thanks
vmk
Did you change any of the HW settings between the snapshot and now?
For example, removed or changed a vNIC configuration.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
No, i didn't change any HW config. I'm able to fix it by restarting the management agent of the host.
That is strange.
Perhaps a 2nd restart of the VM after the HW upgrade could also fix the issue?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Yes, i was also thinking the same way but since I was not having downtime, hence went for management service restart.