VMware Cloud Community
guywood
Contributor
Contributor
Jump to solution

Move-VM or Move-Inventory won't move VM to another folder - "The request refers to an unexpected or unknown type."

Move-VM with -destination produces generic error

Move-VM with -inventorylocation appears to work but VM stays in the same location

Move-Inventory produces generic error

Really frustrating this one and no idea of how to troubleshoot this error further.  Tried many variations of both commands piping and not piping and nothing works.  Anyone seen this before?

Get-VM & Get-Folder work fine on those variables.

Folder is top level.

VM is powered off but same results on a powered on VM.

movevmfail.JPG

Can anyone reproduce this?  PowerCLI version on screeny.  VC version 6.5.0, build 5973321.


Thx
Guy

1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

That is a known issue, you will have to use Destination and InventoryLocation together.
When you provide the ESXi node on which the VM is already hosted for the Destination parameter, the VM will be moved to the folder specified on InventoryLocation.

See also Re: Script error when trying to move vms to their dedicated folders and Re: move-vm is not working as expected with PowerCLI 6.4 or higher


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

2 Replies
LucD
Leadership
Leadership
Jump to solution

That is a known issue, you will have to use Destination and InventoryLocation together.
When you provide the ESXi node on which the VM is already hosted for the Destination parameter, the VM will be moved to the folder specified on InventoryLocation.

See also Re: Script error when trying to move vms to their dedicated folders and Re: move-vm is not working as expected with PowerCLI 6.4 or higher


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

guywood
Contributor
Contributor
Jump to solution

I was hoping you'd reply...

Works perfectly now.  Thank you.

0 Kudos