Good afternoon all,
We've been scripting the migration of VM's from an older 5.5 vCenter to 6.5 vCenter
Using PowerShell we've created a way to copy all of the folders into the new Datastore and want to automate the import as well.
Cannot use the Migration fling as our source environment is 5.5 and the fling requires 6.0u3 vCenter
The command in question is
new-vm -VMFilePath "[Datastore] MigrationVMs/EDE-900##/EDE-900##.vmx" -VMHost ourhost1.domain.com -Location MigratedVMs
When this is run from script or command line the error is:
"new-vm : 5/23/2019 1:45:16 PM New-VM The operation for the entity "MigratedVMs" failed with the following message: "A specified parameter was not correct: path"
This blog was where I took the code sample.
Thanks in advance
I understand.
Not sure if a restart of either could solve the issue, but if it is allowed, why not.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
So we rebooted the vCenter but not the hosts (yet) as the client was not comfortable bouncing the hosts.
We also tried connecting directly to hosts instead of the vCenter with the same results.
Calling it a weekend for now. I appreciate the help thus far! Thanks Luc.
Oh.My.Goodness
So we looked and looked again at all the items of the command and finally after 'Quadruple' checking we found a Typo in the parent folder where the VM's live
Good name "MigrationVMs"
Name in the command "MigrationVM" it was missing the damn 'S' :smileyshocked:
We're working again! Have a great weekend
#DarnTypos
All's well that ends well :smileygrin:
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference