2 Replies Latest reply on Oct 22, 2019 2:52 PM by LucD

    Move-Template Question

    Vitality1 Lurker

      Is Move-Template more for moving templates within a single vCenter? Not so much Moving Templates to another vCenter?

       

       

      I tried all combinations below:

       

      $template = Get-Template -Server $svr -Name "Template-1"

       

      $destination = Get-Datacenter -Server $dst

      $destination = Get-VMHost -Location $cluster -Server $dst | ?{$_.ConnectionState -eq "Connected"} | Get-Random

      $destination = Get-Folder -Server $dst -Name "Templates"

       

      Move-Template -Server $svr -Template $template -Destination $destination

       

      When I tried with VMHost:

      Template location can only be Datacenter or VM Folder. You passed: VMHostImpl

       

      When I tried with a VM Folder and Datacenter:

      "When migrating a VM to a different vCenter Server both Destination and Datastore need to be specified. No other destination types but

      VMHost/Resource Pool and Datastore are supported for Cross vCenter vMotion"

       

      There is no -Datastore parameter for Move-Template so what am I missing?

       

      Or is the only way to do this right is New-VM from template then Move-VM, then convert back to template? What is the point then of Move-Template?