I'm looking into powercli solution to move vmdk file (second/third/... harddisk of existing vm) to new vm folder.
I was looking at the move-harddisk command but I only see datastore as destination but no option to specify folder?
Does anyone got solution?
thanks.
I'm afraid you will have to use the MoveVirtualDisk method.
See for example Solved: Re: Move, Remove, or Copy an orphaned VMDK all res... - VMware Technology Network VMTN
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Hello,
May be you can detach the disk, move it to the desired folder and then attach it back to the VM.
And isn't that "...move it to the desired folder ..." in fact the same as the original question in the thread?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
I mean move it using a utility such as WinSCP. @LucD
Really, you are going to enable SSH on the ESXi node, store the VMDK on your Windows box and then import it back into the ESXi node?
That is a rather cumbersome method to copy a VMDK between folders.
And I don't see where PowerCLI, as the user asked, comes into play in that scenario.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Hello @LucD ,
The datastores are all mounted in ESXI host , so you don't need to copy the vmdk into your computer, it can be done simply from WinSCP directly from folder to folder or by just using cp command if you connect to ESXI host using an SSH client.
As for the user's request, I don't know why he needs to do it by power shell command, so I was proposing a workaround.
I prefer scripted method instead of manual action. We are migrating multiple virtual guests to new os version and second disk is the shared data disk.