VMware Cloud Community
jamie20
Enthusiast
Enthusiast
Jump to solution

Error in cloning vm

Hi guys,

Am trying to clone a vm in a new vcenter which we configured two days back.

New-VM -Name clone-test -VM Windows10 -Datastore VOL-01 -vmhost 10.0.10.10

The error I got here is : exception has been thrown by the target of an invocation

But when I try this above command in other vcenters its working fine.

Any help?

1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

First remark, you should seriously consider upgrading your PowerCLI version.

Looks like you are still running the old MSI-based version.

See Welcome PowerCLI to the PowerShell Gallery – Install Process Updates for instructions.

The full error message would be handy.

Also, does any of those resources (datastore...) exist with same name on another vCenter?

Are you connected to only 1 vCenter, or multiple?

Check what is in $global:defaultVIServers.


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

View solution in original post

4 Replies
LucD
Leadership
Leadership
Jump to solution

Not really, seen the sparse information you provide.


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

0 Kudos
jamie20
Enthusiast
Enthusiast
Jump to solution

Hi LucD,

Thanks for the response.

Powercli Version is 6.5 Release 1 installed in Windows 2012 R2

Vcenter Version is 6.7 (Appliance)

Is any other information I am missing?

0 Kudos
LucD
Leadership
Leadership
Jump to solution

First remark, you should seriously consider upgrading your PowerCLI version.

Looks like you are still running the old MSI-based version.

See Welcome PowerCLI to the PowerShell Gallery – Install Process Updates for instructions.

The full error message would be handy.

Also, does any of those resources (datastore...) exist with same name on another vCenter?

Are you connected to only 1 vCenter, or multiple?

Check what is in $global:defaultVIServers.


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

jamie20
Enthusiast
Enthusiast
Jump to solution

Thanks Lucd,

Issue solved after updating powercli to current version.

0 Kudos