I want to migrate a VM which is poweroff state to another datastore. i tried using move-vm, but it is giving error sating , "operation is not valid due to the cirrent state of the object". can someone provide solution how do i move VM between datastore when VM is in poweroff state.
Can you provide some more details?
Which PowerShell version, which PowerCLI version, which vSphere version?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
@LucD am using 12.4 version of powerCLI and vsphere version is 8.0
And are you using PSv5.* or PSv7.*?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
And can you show the actual command you used, and the full error message you are getting?
A screenshot is fine
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
attached screenshot of the error.
What does the following return?
Get-VM -Name 3-VM
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
3-VM PoweredOff 24 8.000
Did you already stop/start your PS/PowerCLI session in between?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
No i just tried move-VM command it failed with attached screenshot error. just to check, do we allow move-VM in poweroff state to different datastore?
Yes, that should work.
Can you try stopping/starting your PS/PowerCLI session?
Sometimes there are some glitches in the PS session.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
@LucD thanks it worked. i closed session and retried in new session. it worked am able to migrate a poweroff VM. thanks alot for your inputs.